From: siggi at junesystems dot com Operating system: RedHat 9, Linux 2.4.20-27.9smp PHP version: 4.3.4 PHP Bug Type: Class/Object related Bug description: $this->$Variable[] crashes PHP, no output
Description: ------------ When creating a class that contains a class variable array being filled (in this case in the wrong way) like: $this->$Variable[] = "whatever"; (!! notice second $ ) PHP produces no output and no error message ($Variable is empty BTW, does not exist). In a script with a couple of hundred of lines of code it is a nightmare trying to locate a typo like this with no help from PHP. Reproduce code: --------------- class Test { var $Variable = Array(); function Test(){ $this->$Variable[] = "Test string"; } } $object = new Test(); Expected result: ---------------- Error message. Actual result: -------------- No output (this comes from PHP): <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META http-equiv=Content-Type content="text/html; charset=windows-1252"></HEAD> <BODY></BODY></HTML> -- Edit bug report at http://bugs.php.net/?id=27044&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=27044&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=27044&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=27044&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=27044&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=27044&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=27044&r=needscript Try newer version: http://bugs.php.net/fix.php?id=27044&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=27044&r=support Expected behavior: http://bugs.php.net/fix.php?id=27044&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=27044&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=27044&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=27044&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=27044&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=27044&r=dst IIS Stability: http://bugs.php.net/fix.php?id=27044&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=27044&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=27044&r=float