Edit report at https://bugs.php.net/bug.php?id=62653&edit=1
ID: 62653 Updated by: s...@php.net Reported by: davidso1 at rose-hulman dot edu Summary: unset(array($foo)) crashes apache depending on $foo Status: Open Type: Bug Package: Apache2 related Operating System: Windows Server PHP Version: 5.4.5 Block user comment: N Private report: N New Comment: The testcase produces invalid reads & writes in valgrind. Previous Comments: ------------------------------------------------------------------------ [2012-07-24 16:16:05] davidso1 at rose-hulman dot edu Description: ------------ The test code crashes apache in the 5.4+ environment. $foo starts as a string, gets interpreted as a double but it isn't I guess. unset($array[(double) $foo]) works as expected Test script: --------------- $array = array("5"=>"bar"); $foo = "10.0000"; // gettype($foo) = "string" $foo /= 2; //Makes $foo = 5 but still gettype($foo) = "double" unset($array[$foo]); print_r($array); Expected result: ---------------- Array() Actual result: -------------- Error 101 (net::ERR_CONNECTION_RESET): The connection was reset. ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=62653&edit=1