From: myle34 at hotmail dot com
Operating system: Windows XP
PHP version: 5CVS-2003-10-31 (dev)
PHP Bug Type: Reproducible crash
Bug description: Call to __set() crashes Apache when setting array element!

Description:
------------
I am using PHP5-b2 and Apache 2.0.47 with Windows XP. Apache crashes when
the below code is run.

Reproduce code:
---------------
class Foo {
private $bar = array();
function __get($var) {
return(isset($this->bar[$var]) ? $this->bar[$var] : NULL);
}
function __set($var,$val) {
$this->bar[$var] = $val;
}
}

$foo = new Foo();

// Works
// $foo->test = array('testing'=>'testing, 1...2...3...');

// Doesn't work, crashes Apache
$foo->test = array();
$foo->test['testing'] = 'testing, 1...2...3...';

print_r($foo->test);

Expected result:
----------------
Array
(
[testing] => testing, 1...2...3...
)

Actual result:
--------------
Apache crashes! No output.

--
Edit bug report at [url]http://bugs.php.net/?id=26059&edit=1[/url]
--
Try a CVS snapshot (php4): [url]http://bugs.php.net/fix.php?id=26059&r=trysnapshot4[/url]
Try a CVS snapshot (php5): [url]http://bugs.php.net/fix.php?id=26059&r=trysnapshot5[/url]
Fixed in CVS: [url]http://bugs.php.net/fix.php?id=26059&r=fixedcvs[/url]
Fixed in release: [url]http://bugs.php.net/fix.php?id=26059&r=alreadyfixed[/url]
Need backtrace: [url]http://bugs.php.net/fix.php?id=26059&r=needtrace[/url]
Try newer version: [url]http://bugs.php.net/fix.php?id=26059&r=oldversion[/url]
Not developer issue: [url]http://bugs.php.net/fix.php?id=26059&r=support[/url]
Expected behavior: [url]http://bugs.php.net/fix.php?id=26059&r=notwrong[/url]
Not enough info: [url]http://bugs.php.net/fix.php?id=26059&r=notenoughinfo[/url]
Submitted twice: [url]http://bugs.php.net/fix.php?id=26059&r=submittedtwice[/url]
register_globals: [url]http://bugs.php.net/fix.php?id=26059&r=globals[/url]
PHP 3 support discontinued: [url]http://bugs.php.net/fix.php?id=26059&r=php3[/url]
Daylight Savings: [url]http://bugs.php.net/fix.php?id=26059&r=dst[/url]
IIS Stability: [url]http://bugs.php.net/fix.php?id=26059&r=isapi[/url]
Install GNU Sed: [url]http://bugs.php.net/fix.php?id=26059&r=gnused[/url]
Floating point limitations: [url]http://bugs.php.net/fix.php?id=26059&r=float[/url]