mirror of
https://github.com/php/php-src.git
synced 2026-04-24 08:28:26 +02:00
28fd7597ba
This cache is implemented in two levels: A EG(callable_convert_cache) global that maps zend_function pointers to a shared callable instance, and a CALLABLE_CONVERT cache slot to remember the result of the hash table lookup. Fixes GH-19754 Closes GH-19863
22 lines
327 B
PHP
22 lines
327 B
PHP
--TEST--
|
|
Check interaction of first-class callables with optimization
|
|
--FILE--
|
|
<?php
|
|
|
|
function test1() {}
|
|
function test2() { return 42; }
|
|
|
|
var_dump(test1(...));
|
|
var_dump(test2(...));
|
|
|
|
?>
|
|
--EXPECTF--
|
|
object(Closure)#%d (1) {
|
|
["function"]=>
|
|
string(5) "test1"
|
|
}
|
|
object(Closure)#%d (1) {
|
|
["function"]=>
|
|
string(5) "test2"
|
|
}
|