xref: /PHP-5.6/Zend/tests/bug34064.phpt (revision 610c7fbe)
1--TEST--
2Bug #34064 (arr[] as param to function in class gives invalid opcode)
3--FILE--
4<?php
5class XmlTest {
6
7    function test_ref(&$test)
8    {
9    	$test = "ok";
10    }
11
12    function test($test)
13    {
14    }
15
16    function run()
17    {
18        $ar = array();
19        $this->test_ref($ar[]);
20        var_dump($ar);
21        $this->test($ar[]);
22    }
23}
24
25$o = new XmlTest();
26$o->run();
27?>
28--EXPECTF--
29array(1) {
30  [0]=>
31  string(2) "ok"
32}
33
34Fatal error: Cannot use [] for reading in %sbug34064.php on line 18
35
36