@ 2015-10-06T12:27:10Z <?php
set_error_handler(function(){
var_dump(func_get_args());
});
$obj = new ArrayIterator(new stdClass);
$obj->append('baz');
Enable javascript to submit You have javascript disabled. You will not be able to edit any code.
Output for 7.1.0 - 7.1.33 , 7.2.0 - 7.2.33 , 7.3.0 - 7.3.33 , 7.4.0 - 7.4.33 , 8.0.0 - 8.0.30 , 8.1.0 - 8.1.28 , 8.2.0 - 8.2.18 , 8.3.0 - 8.3.6 Fatal error: Uncaught Error: Cannot append properties to objects, use ArrayIterator::offsetSet() instead in /in/q0911:7
Stack trace:
#0 /in/q0911(7): ArrayIterator->append('baz')
#1 {main}
thrown in /in/q0911 on line 7
Process exited with code 255 . Output for 5.4.0 - 5.4.45 , 5.5.0 - 5.5.38 , 5.6.0 - 5.6.40 , 7.0.0 - 7.0.33 array(5) {
[0]=>
int(4096)
[1]=>
string(100) "ArrayIterator::append(): Cannot append properties to objects, use ArrayIterator::offsetSet() instead"
[2]=>
string(9) "/in/q0911"
[3]=>
int(7)
[4]=>
array(8) {
["_GET"]=>
array(0) {
}
["_POST"]=>
array(0) {
}
["_COOKIE"]=>
array(0) {
}
["_FILES"]=>
array(0) {
}
["argv"]=>
array(1) {
[0]=>
string(9) "/in/q0911"
}
["argc"]=>
int(1)
["_SERVER"]=>
array(17) {
["TERM"]=>
string(5) "xterm"
["PATH"]=>
string(13) "/usr/bin:/bin"
["LANG"]=>
string(1) "C"
["SHELL"]=>
string(7) "/bin/sh"
["MAIL"]=>
string(16) "/var/mail/nobody"
["LOGNAME"]=>
string(6) "nobody"
["USER"]=>
string(6) "nobody"
["HOME"]=>
string(4) "/tmp"
["PHP_SELF"]=>
string(9) "/in/q0911"
["SCRIPT_NAME"]=>
string(9) "/in/q0911"
["SCRIPT_FILENAME"]=>
string(9) "/in/q0911"
["PATH_TRANSLATED"]=>
string(9) "/in/q0911"
["DOCUMENT_ROOT"]=>
string(0) ""
["REQUEST_TIME_FLOAT"]=>
float(1444134430.0001)
["REQUEST_TIME"]=>
int(1444134430)
["argv"]=>
array(1) {
[0]=>
string(9) "/in/q0911"
}
["argc"]=>
int(1)
}
["obj"]=>
object(ArrayIterator)#2 (1) {
["storage":"ArrayIterator":private]=>
object(stdClass)#3 (0) {
}
}
}
}
preferences:dark mode live preview
237.78 ms | 405 KiB | 381 Q