xref: /PHP-7.1/Zend/tests/bug70630.phpt (revision 23b372d3)
1--TEST--
2Bug #70630 (Closure::call/bind() crash with ReflectionFunction->getClosure())
3--FILE--
4<?php
5class a {}
6$x = (new ReflectionFunction("substr"))->getClosure();
7$x->call(new a);
8?>
9--EXPECTF--
10Warning: Cannot rebind scope of closure created by ReflectionFunctionAbstract::getClosure() in %s on line %d
11