1
0
mirror of https://github.com/php/php-src.git synced 2026-03-28 18:22:42 +01:00
Files
archived-php-src/ext/opcache/tests/bug73847.phpt
Nikita Popov 242d924e59 Fix bug #73847
2016-12-31 13:33:21 +01:00

45 lines
508 B
PHP

--TEST--
Bug #73847: Recursion when a variable is redefined as array
--FILE--
<?php
function test() {
$a = 42;
$a = array($a);
var_dump($a);
$a = 42;
$a = array($a => 24);
var_dump($a);
$a = 42;
$a = array($a, 24);
var_dump($a);
$a = 42;
$a = array(24, $a);
var_dump($a);
}
test();
?>
--EXPECT--
array(1) {
[0]=>
int(42)
}
array(1) {
[42]=>
int(24)
}
array(2) {
[0]=>
int(42)
[1]=>
int(24)
}
array(2) {
[0]=>
int(24)
[1]=>
int(42)
}