mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
RFC: https://wiki.php.net/rfc/deprecate-implicitly-nullable-types Co-authored-by: Gina Peter Banyard <girgias@php.net>
25 lines
321 B
PHP
25 lines
321 B
PHP
--TEST--
|
|
JIT CAST: 001
|
|
--INI--
|
|
opcache.enable=1
|
|
opcache.enable_cli=1
|
|
opcache.file_update_protection=0
|
|
opcache.jit=1205
|
|
;opcache.jit_debug=1
|
|
--EXTENSIONS--
|
|
opcache
|
|
--FILE--
|
|
<?php
|
|
function foo (?int $x = null) {
|
|
$a = (array)$x;
|
|
$a[] = 42;
|
|
var_dump($a);
|
|
}
|
|
foo(null);
|
|
?>
|
|
--EXPECT--
|
|
array(1) {
|
|
[0]=>
|
|
int(42)
|
|
}
|