ID: 24286
Updated by: [EMAIL PROTECTED]
Reported By: terjeto at stud dot ntnu dot no
-Status: Open
+Status: Verified
Bug Type: Zend Engine 2 problem
Operating System: RedHat 9.0
PHP Version: 5CVS-2003-06-22 (dev)
New Comment:
Works fine in php 4.3.3, so this appears to be a BC issue.
Previous Comments:
------------------------------------------------------------------------
[2003-06-22 10:54:07] terjeto at stud dot ntnu dot no
Description:
------------
When using a string from an array inside an class for
calling a function it results in a fatal error.
Reproduce code:
---------------
<?php
class Foo {
var $_array = array( 'function' => array ( 'spacer' => array( 0 =>
'_funk' ) ) );
}
function _funk( $arg ) {
print( $arg );
}
$_out = array( 'function' => array ( 'spacer' => array( 0 => '_funk' )
) );
_funk( "Test string 1<br>" );
$foo = new Foo();
$foofunk = $foo->_array['function']['spacer'][0];
$foofunk( "Test string 2<br>" );
$_out['function']['spacer'][0]( "Test string 3<br>" );
$foo->_array['function']['spacer'][0]( "Test string 4<br>" );
?>
Expected result:
----------------
Test string 1
Test string 2
Test string 3
Test string 4
Actual result:
--------------
Test string 1
Test string 2
Test string 3
Fatal error: Method name must be a string in /var/
www/html/test.php on line 22
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=24286&edit=1