From: cpuidle at gmx dot de Operating system: WinXP PHP version: 5CVS-2004-06-12 (dev) PHP Bug Type: Scripting Engine problem Bug description: $$var references not behaving correctly
Description: ------------ Two issues exist with php5rc3 when using indirect variables: Reproduce code: --------------- <?php $test = ''; $var = 'test'; if (empty($test)) { echo 'test empty'; } // excepted & actual: test empty if (empty($$var)) { echo 'test empty'; } // expected result: test empty // actual result: <-------!! $test = 'doo'; echo trim($$var); // excepted & actual: doo if (empty(trim($$var)); // Fatal error: Can't use function return value in write // context in C:\htdocs\test4.php on line 8 // where is the write context here? <-------!! ?> Expected result: ---------------- see above Actual result: -------------- see above -- Edit bug report at http://bugs.php.net/?id=28752&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=28752&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=28752&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=28752&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=28752&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=28752&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=28752&r=needscript Try newer version: http://bugs.php.net/fix.php?id=28752&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=28752&r=support Expected behavior: http://bugs.php.net/fix.php?id=28752&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=28752&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=28752&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=28752&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=28752&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=28752&r=dst IIS Stability: http://bugs.php.net/fix.php?id=28752&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=28752&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=28752&r=float