/hphp/test/zend/good/Zend/tests/bug62653.php
http://github.com/facebook/hiphop-php · PHP · 18 lines · 16 code · 2 blank · 0 comment · 0 complexity · 1dd9e71e924473877654715555375654 MD5 · raw file
- <?hh <<__EntryPoint>> function main(): void {
- $array = darray["5"=>"bar"];
- $foo = "10.0000"; // gettype($foo) = "string"
- $foo /= 2; //Makes $foo = 5 but still gettype($foo) = "double"
- unset($array[$foo]);
- print_r($array);
- $array = darray["5"=>"bar"];
- $foo = "5";
- unset($array[(float)$foo]);
- print_r($array);
- $array = darray["5"=>"bar"];
- $foo = "10.0000";
- $foo /= 2; //Makes $foo = 5 but still gettype($foo) = "double"
- unset($array[$foo]);
- print_r($array);
- }