mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00

RFC: https://wiki.php.net/rfc/fcc_in_const_expr Co-authored-by: Volker Dusch <volker@tideways-gmbh.com>
22 lines
318 B
PHP
22 lines
318 B
PHP
--TEST--
|
|
Allow defining FCC in const expressions.
|
|
--FILE--
|
|
<?php
|
|
|
|
const Closure = strrev(...);
|
|
|
|
var_dump(Closure);
|
|
var_dump((Closure)("abc"));
|
|
|
|
?>
|
|
--EXPECTF--
|
|
object(Closure)#%d (2) {
|
|
["function"]=>
|
|
string(%d) "%s"
|
|
["parameter"]=>
|
|
array(1) {
|
|
["$string"]=>
|
|
string(10) "<required>"
|
|
}
|
|
}
|
|
string(3) "cba"
|