xref: /php-src/ext/opcache/tests/jit/cast_001.phpt (revision 330cc5cd)
1--TEST--
2JIT CAST: 001
3--INI--
4opcache.enable=1
5opcache.enable_cli=1
6opcache.file_update_protection=0
7opcache.jit=1205
8;opcache.jit_debug=1
9--EXTENSIONS--
10opcache
11--FILE--
12<?php
13function foo (?int $x = null) {
14    $a = (array)$x;
15    $a[] = 42;
16    var_dump($a);
17}
18foo(null);
19?>
20--EXPECT--
21array(1) {
22  [0]=>
23  int(42)
24}
25