summaryrefslogtreecommitdiff
path: root/Zend/tests/bug70681.phpt
blob: d0cc9523a94e25c92b9e4f29fd9137fa5f45bfa9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
--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 in %s on line %d
int(3)