| 
        php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits             
             [2004-09-04 17:48 UTC] tony2001@php.net
  [2004-09-12 01:00 UTC] php-bugs at lists dot php dot net
  [2007-11-09 21:38 UTC] dmitry dot bagaev at gmail dot com
  | 
    |||||||||||||||||||||||||||||||||||||
            
                 
                Copyright © 2001-2025 The PHP GroupAll rights reserved.  | 
        Last updated: Tue Nov 04 13:00:02 2025 UTC | 
Description: ------------ Using += or -= etc. operator to assign to an array using an object for a key crashes apache rather than giving an Illegal Offset Type warning. ++, -- and =n don't crash apache. FYI, I Installed the PHP windows binaries Configure Command cscript /nologo configure.js "--enable-snapshot-build" "--with-gd=shared" Reproduce code: --------------- <?php class Foo { } $foo = new Foo(); $collection = array(); $collection[$foo] += 1; // crashes Apache 2.0.49 on Windows XP ?> Expected result: ---------------- Warning: Illegal offset type in C:\work\msat\src\test\crashApache.php on line 8 Actual result: -------------- Apache crashes: from Apache error log: [Fri Aug 06 12:03:19 2004] [notice] Parent: child process exited with status 3221225477 -- Restarting. from Event Viewer: Faulting application Apache.exe, version 2.0.49.0, faulting module unknown, version 0.0.0.0, fault address 0x00000000.