Annotation of embedaddon/php/Zend/tests/bug34064.phpt, revision 1.1.1.1
1.1 misho 1: --TEST--
2: Bug #34064 (arr[] as param to function in class gives invalid opcode)
3: --FILE--
4: <?php
5: class 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--
29: array(1) {
30: [0]=>
31: string(2) "ok"
32: }
33:
34: Fatal error: Cannot use [] for reading in %sbug34064.php on line 18
35:
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>