mirror of
https://github.com/php/php-src.git
synced 2025-08-17 22:48:57 +02:00
17 lines
339 B
PHP
17 lines
339 B
PHP
--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']);
|
|
--EXPECTF--
|
|
string(3) "b 1"
|
|
int(1)
|
|
int(1)
|