summaryrefslogtreecommitdiff
path: root/Zend/tests/methods-on-non-objects-nested-calls-ns.phpt
blob: b16f579fa950dbb7b3fb810c872b45cdab459e0f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
--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')));
var_dump($x->method([strlen('Test')]));
echo "Alive\n";
?>
--EXPECTF--
Called #1
NULL
Called #2
NULL
Called #3
NULL
Alive