mirror of
https://github.com/php/php-src.git
synced 2024-09-24 19:37:26 +00:00
e193d35c1e
This reverts commit 881c502520
.
25 lines
555 B
PHP
25 lines
555 B
PHP
--TEST--
|
|
Bug #70630 (Closure::call/bind() crash with ReflectionFunction->getClosure())
|
|
--FILE--
|
|
<?php
|
|
|
|
class a {}
|
|
function foo() {}
|
|
|
|
foreach (["substr", "foo"] as $fn) {
|
|
$x = (new ReflectionFunction($fn))->getClosure();
|
|
$x->call(new a);
|
|
Closure::bind($x, new a, "a");
|
|
}
|
|
|
|
?>
|
|
--EXPECTF--
|
|
|
|
Warning: Cannot bind function substr to an object in %s on line %d
|
|
|
|
Warning: Cannot bind function substr to an object in %s on line %d
|
|
|
|
Warning: Cannot bind function foo to an object in %s on line %d
|
|
|
|
Warning: Cannot bind function foo to an object in %s on line %d
|