php-src/Zend/tests/closure_call_internal.phpt
Nikita Popov eda9f5f740 Fix Closure::call() on internal method closure
In this case we should use the original internal handler. Otherwise
the trampoline will attempt to free the closure, but the function
being used is not actually part of a closure anymore.
2021-08-27 11:58:13 +02:00

11 lines
179 B
PHP

--TEST--
Closure::call() on internal method
--FILE--
<?php
var_dump(Closure::fromCallable([new DateTime(), 'getTimestamp'])->call(new DateTime('@123')));
?>
--EXPECT--
int(123)