PHP 4.0 Bug #7061: assigning a reference to a member of string

From: Date: Sat, 07 Oct 2000 03:36:19 +0000
Subject: PHP 4.0 Bug #7061: assigning a reference to a member of string
Groups: php.dev 
Request: Send a blank email to php-dev+get-34369@lists.php.net to get a copy of this message
From: panu.kalliokoski@giro.fi Operating system: Debian GNU/Linux stable PHP version: 4.0 Latest CVS (06/10/2000) PHP Bug Type: Reproduceable crash Bug description: assigning a reference to a member of string This has also been tested with php-4.0.2. The simplest script I could come up with to produce the core dump is like this: $a = 'string'; $str = 'another one'; $a[0] =& $str; This will cause a core dump. String indexing, IMO, is a misfeature only causing harm. What I find especially irritating is that if I index a string by string index, by accident, it automagically casts the string index to a numeric one. None of my business, of course. Panu Kalliokoski

« previous php.dev (#34369) next »