2014-07-06 13:10:43 +00:00
|
|
|
--TEST--
|
|
|
|
Catch method calls on non-objects with nested calls to namespaced functions with core counterparts
|
|
|
|
--FILE--
|
|
|
|
<?php namespace test;
|
|
|
|
function strlen($str) {
|
|
|
|
throw new LogicException('Should not be called');
|
|
|
|
}
|
|
|
|
set_error_handler(function($code, $message) {
|
|
|
|
static $i= 0;
|
|
|
|
echo 'Called #'.(++$i)."\n";
|
|
|
|
});
|
|
|
|
|
|
|
|
$x= null;
|
|
|
|
var_dump($x->method(strlen('Test')));
|
|
|
|
var_dump($x->method(strlen('Test'), strlen('Test')));
|
2014-07-06 14:40:21 +00:00
|
|
|
var_dump($x->method([strlen('Test')]));
|
2014-07-06 13:10:43 +00:00
|
|
|
echo "Alive\n";
|
|
|
|
?>
|
|
|
|
--EXPECTF--
|
|
|
|
Called #1
|
|
|
|
NULL
|
|
|
|
Called #2
|
|
|
|
NULL
|
2014-07-06 14:40:21 +00:00
|
|
|
Called #3
|
|
|
|
NULL
|
2014-07-06 13:10:43 +00:00
|
|
|
Alive
|