xref: /PHP-8.0/Zend/tests/bug70630.phpt (revision 78773890)
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 from function in %s on line %d
11