mirror of
https://github.com/php/php-src.git
synced 2024-10-01 23:06:11 +00:00
18 lines
333 B
PHP
Executable File
18 lines
333 B
PHP
Executable File
--TEST--
|
|
Catch method calls on non-objects inside array access
|
|
--FILE--
|
|
<?php
|
|
set_error_handler(function($code, $message) {
|
|
var_dump($code, $message);
|
|
});
|
|
|
|
$x= null;
|
|
$a= [null => 'OK'];
|
|
var_dump($a[$x->method()]);
|
|
echo "Alive\n";
|
|
?>
|
|
--EXPECTF--
|
|
int(4096)
|
|
string(%d) "Call to a member function method() on null"
|
|
string(2) "OK"
|
|
Alive
|