xref: /PHP-8.4/ext/opcache/tests/opt/sccp_023.phpt (revision e9f783fc)
1--TEST--
2SCCP 023: ADD_ARRAY_ELEMENT with partial array
3--INI--
4opcache.enable=1
5opcache.enable_cli=1
6opcache.optimization_level=-1
7opcache.opt_debug_level=0
8--EXTENSIONS--
9opcache
10--FILE--
11<?php
12function a ($field_type, $allowed_values) {
13    $settings = [
14        'list_string' => [
15            'allowed_values' => $allowed_values,
16        ],
17    ];
18
19    return $settings[$field_type];
20}
21
22var_dump(a("list_string", ["xxx"]));
23?>
24--EXPECT--
25array(1) {
26  ["allowed_values"]=>
27  array(1) {
28    [0]=>
29    string(3) "xxx"
30  }
31}
32