mirror of
https://github.com/php/php-src.git
synced 2024-11-23 18:04:36 +08:00
a31f46421d
RFC: https://wiki.php.net/rfc/tostring_exceptions And convert some object to string conversion related recoverable fatal errors into Error exceptions. Improve exception safety of internal code performing string conversions.
19 lines
339 B
PHP
19 lines
339 B
PHP
--TEST--
|
|
Check call to non-ref function with call-time refs
|
|
--FILE--
|
|
<?php
|
|
class Test {
|
|
public function __toString() {
|
|
global $my_var;
|
|
$my_var=0x12345;
|
|
return "";
|
|
}
|
|
}
|
|
|
|
$my_var = str_repeat("A",64);
|
|
$data = call_user_func_array("substr_replace",array(&$my_var, new Test(), 1));
|
|
echo "OK!";
|
|
?>
|
|
--EXPECT--
|
|
OK!
|