1
0
mirror of https://github.com/php/php-src.git synced 2026-04-25 17:08:14 +02:00
Files
archived-php-src/ext/opcache/tests/opt/sccp_023.phpt
T
Gabriel Caruso ded3d984c6 Use EXPECT instead of EXPECTF when possible
EXPECTF logic in run-tests.php is considerable, so let's avoid it.
2018-02-20 21:53:48 +01:00

32 lines
520 B
PHP

--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"]));
?>
--EXPECT--
array(1) {
["allowed_values"]=>
array(1) {
[0]=>
string(3) "xxx"
}
}