2005-08-10 18:39:55 +08:00
|
|
|
--TEST--
|
|
|
|
Bug #34064 (arr[] as param to function in class gives invalid opcode)
|
|
|
|
--FILE--
|
|
|
|
<?php
|
|
|
|
class XmlTest {
|
|
|
|
|
|
|
|
function test_ref(&$test)
|
|
|
|
{
|
2020-02-04 05:52:20 +08:00
|
|
|
$test = "ok";
|
2005-08-10 18:39:55 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
function test($test)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
function run()
|
|
|
|
{
|
|
|
|
$ar = array();
|
|
|
|
$this->test_ref($ar[]);
|
|
|
|
var_dump($ar);
|
|
|
|
$this->test($ar[]);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
$o = new XmlTest();
|
|
|
|
$o->run();
|
|
|
|
?>
|
|
|
|
--EXPECTF--
|
|
|
|
array(1) {
|
|
|
|
[0]=>
|
|
|
|
string(2) "ok"
|
|
|
|
}
|
|
|
|
|
2015-05-18 06:31:43 +08:00
|
|
|
Fatal error: Uncaught Error: Cannot use [] for reading in %sbug34064.php:18
|
2015-05-16 03:04:07 +08:00
|
|
|
Stack trace:
|
|
|
|
#0 %s(%d): XmlTest->run()
|
|
|
|
#1 {main}
|
|
|
|
thrown in %sbug34064.php on line 18
|