php-src/Zend/tests/bug70681.phpt

17 lines
388 B
Plaintext
Raw Normal View History

2015-10-10 05:01:23 +08:00
--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"));
2015-10-10 05:01:23 +08:00
?>
--EXPECTF--
Warning: Cannot unbind $this of internal method in %s on line %d
int(3)