From: doctorrock83 at gmail dot com Operating system: Linux PHP version: 5.3.0 PHP Bug Type: Scripting Engine problem Bug description: Making reference on string offsets crashes PHP
Description: ------------ When making a reference on a string offset and changing it, PHP5.3 crashes with segfault, but PHP 5.2, 5.1 and 5.0 throws errors. I know that it's a bad PHP programming than thinking PHP is C, the fact is that this behavior gives PHP errors in 5.2/5.1/5.0 branches, but segfaults 5.3.0 release. Reproduce code: --------------- <?php $a = "string"; $b = &$a[1]; $b = "f"; echo $a; Expected result: ---------------- sfring But PHP5.2.0 and 5.0.0 tell : "Fatal error: Cannot create references to/from string offsets nor overloaded objects in XXX" PHP 5.1.0 tells: "Fatal error: fatal flex scanner internal error--end of buffer missed in XXX" PHP5.3 segfaults Actual result: -------------- segmentation faults -- Edit bug report at http://bugs.php.net/?id=49866&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=49866&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=49866&r=trysnapshot53 Try a snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=49866&r=trysnapshot60 Fixed in SVN: http://bugs.php.net/fix.php?id=49866&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=49866&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=49866&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=49866&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=49866&r=needscript Try newer version: http://bugs.php.net/fix.php?id=49866&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=49866&r=support Expected behavior: http://bugs.php.net/fix.php?id=49866&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=49866&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=49866&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=49866&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=49866&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=49866&r=dst IIS Stability: http://bugs.php.net/fix.php?id=49866&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=49866&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=49866&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=49866&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=49866&r=mysqlcfg
