1
0
mirror of https://github.com/php/php-src.git synced 2026-04-28 18:53:33 +02:00
Files

17 lines
411 B
PHP

--TEST--
Bug #70681: Segfault when binding $this of internal instance method to null
--FILE--
<?php
$c = (new ReflectionMethod('SplStack', 'count'))->getClosure(new SplStack);
$c = $c->bindTo(null);
$c = (new ReflectionFunction('strlen'))->getClosure();
$c = $c->bindTo(null);
var_dump($c("foo"));
?>
--EXPECTF--
Warning: Cannot unbind $this of method, this will be an error in PHP 9 in %s on line %d
int(3)