mirror of
https://github.com/php/php-src.git
synced 2024-09-21 18:07:23 +00:00
eda9f5f740
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.
11 lines
179 B
PHP
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)
|