ID:               49866
 Updated by:       [email protected]
 Reported By:      doctorrock83 at gmail dot com
-Status:           Open
+Status:           Assigned
 Bug Type:         Scripting Engine problem
 Operating System: Linux
 PHP Version:      5.3.0
-Assigned To:      
+Assigned To:      dmitry
 New Comment:

Dmitry, this is related to rev.251187 and rev.244680 (fix for #35163)


Previous Comments:
------------------------------------------------------------------------

[2009-10-13 16:08:41] doctorrock83 at gmail dot com

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 this bug report at http://bugs.php.net/?id=49866&edit=1

Reply via email to