|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #34064 arr[] as param to function in class gives invalid opcode
Submitted: 2005-08-10 11:02 UTC Modified: 2005-08-10 12:41 UTC
From: phpbugreport at elexer dot com Assigned: dmitry
Status: Closed Package: Scripting Engine problem
PHP Version: 5CVS-2005-08-10 OS: *
Private report: No CVE-ID:
 [2005-08-10 11:02 UTC] phpbugreport at elexer dot com
PHP 5.1.0-dev (cli) (built: Aug  9 2005 00:41:59) from - compiling below code generates an Invalid opcode error.

Works fine when you take the "test()" function out of the class.

Reproduce code:

class XmlTest {

    function test($test)

    function run()
        $ar = array();

$o = new XmlTest();

Expected result:
No "Invalid opcode" error

Actual result:
Fatal error: Invalid opcode 93/16/8. in D:\php5\a.php on line 14


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2005-08-10 11:19 UTC]
Dmitry, that's something you should know how to fix..
 [2005-08-10 12:41 UTC]
Closed in CVS HEAD and PHP_5_1.

An additional bug - $arr[] can be passed only to function that receives argument by reference. This is fixed in CVS HEAD, PHP_5_1, PHP_5_0 and PHP_4_4.
PHP Copyright © 2001-2015 The PHP Group
All rights reserved.
Last updated: Tue Oct 06 20:01:32 2015 UTC