mirror of
https://github.com/php/php-src.git
synced 2024-09-21 18:07:23 +00:00
78773890f6
Failure to rebind such closures is not necessarily related to them being created by `ReflectionFunctionAbstract::getClosure()`, so we fix the error message. Closes GH-6424.
11 lines
279 B
PHP
11 lines
279 B
PHP
--TEST--
|
|
Bug #70630 (Closure::call/bind() crash with ReflectionFunction->getClosure())
|
|
--FILE--
|
|
<?php
|
|
class a {}
|
|
$x = (new ReflectionFunction("substr"))->getClosure();
|
|
$x->call(new a);
|
|
?>
|
|
--EXPECTF--
|
|
Warning: Cannot rebind scope of closure created from function in %s on line %d
|