diff options
Diffstat (limited to 'Zend/tests/call_with_refs.phpt')
-rw-r--r-- | Zend/tests/call_with_refs.phpt | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/Zend/tests/call_with_refs.phpt b/Zend/tests/call_with_refs.phpt index f7b18365b4..0e01779a21 100644 --- a/Zend/tests/call_with_refs.phpt +++ b/Zend/tests/call_with_refs.phpt @@ -2,16 +2,17 @@ Check call to non-ref function with call-time refs --FILE-- <?php -function my_errorhandler($errno,$errormsg) { - global $my_var; - $my_var=0x12345; - echo $errormsg."\n"; - return true; +class Test { + public function __toString() { + global $my_var; + $my_var=0x12345; + return ""; + } } -$oldhandler = set_error_handler("my_errorhandler"); + $my_var = str_repeat("A",64); -$data = call_user_func_array("substr_replace",array(&$my_var, new StdClass(),1)); +$data = call_user_func_array("substr_replace",array(&$my_var, new Test(), 1)); echo "OK!"; +?> --EXPECT-- -Object of class stdClass could not be converted to string OK! |