source: src/router/php7/ext/opcache/tests/bug73847.phpt @ 31874

Last change on this file since 31874 was 31874, checked in by brainslayer, 6 weeks ago

update php

File size: 508 bytes
Line 
1--TEST--
2Bug #73847: Recursion when a variable is redefined as array
3--FILE--
4<?php
5function test() {
6    $a = 42;
7    $a = array($a);
8    var_dump($a);
9
10    $a = 42;
11    $a = array($a => 24);
12    var_dump($a);
13
14    $a = 42;
15    $a = array($a, 24);
16    var_dump($a);
17
18    $a = 42;
19    $a = array(24, $a);
20    var_dump($a);
21}
22test();
23?>
24--EXPECT--
25array(1) {
26  [0]=>
27  int(42)
28}
29array(1) {
30  [42]=>
31  int(24)
32}
33array(2) {
34  [0]=>
35  int(42)
36  [1]=>
37  int(24)
38}
39array(2) {
40  [0]=>
41  int(24)
42  [1]=>
43  int(42)
44}
Note: See TracBrowser for help on using the repository browser.