TypePHP 编译器
https://swoole.com/aot/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
341 B
18 lines
341 B
--TEST--
|
|
Test str_replace() function and array refs
|
|
--INI--
|
|
precision=14
|
|
--FILE--
|
|
<?php
|
|
$data = ['a' => 'b', 'numeric' => 1];
|
|
$ref = &$data;
|
|
$b = &$ref['a'];
|
|
$numeric = &$ref['numeric'];
|
|
var_dump(str_replace(array_keys($data), $data, "a numeric"));
|
|
var_dump($numeric);
|
|
var_dump($data['numeric']);
|
|
?>
|
|
--EXPECT--
|
|
string(3) "b 1"
|
|
int(1)
|
|
int(1)
|
|
|