From: hervecaussinus at yahoo dot ca
Operating system: Windows 2000
PHP version: 5.0.0b2 (beta2)
PHP Bug Type: Zend Engine 2 problem
Bug description: Unable to define a variable in a class
Description:
------------
I am not able to use the class examples in your Web site. In fact it seems
that it is impossible to declare a variable when defining a class.
I am very new to PHP (3 days). Sorry if I am doing something wrong.
I look at the bug database and I also download and install the last binary
(php5-win32-200311281530.zip).
Reproduce code:
---------------
<?php
class MyClass {
$Hello = "Hello, World!\n";
}
print 1;
?>
Expected result:
----------------
Should parse and display 1 .
Actual result:
--------------
Gives this error:
Parse error: parse error, unexpected T_VARIABLE, expecting T_OLD_FUNCTION
or T_FUNCTION or T_VAR or '}' in c:\inetpub\wwwroot\CorePHP\6-1.php on
line 3
--
Edit bug report at http://bugs.php.net/?id=26448&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=26448&r=trysnapshot4
Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=26448&r=trysnapshot5
Fixed in CVS: http://bugs.php.net/fix.php?id=26448&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=26448&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=26448&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=26448&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=26448&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=26448&r=support
Expected behavior: http://bugs.php.net/fix.php?id=26448&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=26448&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=26448&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=26448&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=26448&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=26448&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=26448&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=26448&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=26448&r=float