summaryrefslogtreecommitdiff
path: root/Zend/tests/methods-on-non-objects-in-echo.phpt
blob: a0267c0ea5a0084cadb7c94a93de8c2f2a113cc8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
--TEST--
Catch method calls on non-objects inside echo
--FILE--
<?php
set_error_handler(function($code, $message) {
  var_dump($code, $message);
});

$x= null;
echo "Before\n", $x->method(), "After\n";
echo "Alive\n";
?>
--EXPECTF--
Before
int(4096)
string(%d) "Call to a member function method() on null"
After
Alive