summaryrefslogtreecommitdiff
path: root/ext/opcache/tests/opt/sccp_023.phpt
blob: 0a25424edaeedf2a06ca4dc5b69839420b50688d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
--TEST--
SCCP 023: ADD_ARRAY_ELEMENT with partial array
--INI--
opcache.enable=1
opcache.enable_cli=1
opcache.optimization_level=-1
opcache.opt_debug_level=0
--SKIPIF--
<?php require_once('skipif.inc'); ?>
--FILE--
<?php
function a ($field_type, $allowed_values) {
	$settings = [
		'list_string' => [
			'allowed_values' => $allowed_values,
		],
	];

	return $settings[$field_type];
}

var_dump(a("list_string", ["xxx"]));
?>
--EXPECTF--
array(1) {
  ["allowed_values"]=>
  array(1) {
    [0]=>
    string(3) "xxx"
  }
}