ID:               18926
 Comment by:       sibaz at sibaz dot com
 Reported By:      carl at thep dot lu dot se
 Status:           Closed
 Bug Type:         Zend Engine 2 problem
 Operating System: Linux
 PHP Version:      5.0.0-dev
 New Comment:

The convention for this is to use array(&$obj, "method") instead of
$function_name.  So:-
class foo
{
   function one()
   {
      echo "one";
   }
   function two()
   {
      $args = func_get_args();
      call_user_func_array(array(&$this, "one"), $args);
   }
};

$foo = new foo();
$foo->two();

Thats the equivalent to $this->one(); within $this->two();
The question is how do you inherit foo and call parent::two(); from
within bar (thus calling foo->two(); Not bar->two(); )


Previous Comments:
------------------------------------------------------------------------

[2003-06-09 05:55:54] [EMAIL PROTECTED]

This bug has been fixed in CVS.

In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at http://snaps.php.net/.
 
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.

In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites in short time.
 
Thank you for the report, and for helping us make PHP better.



------------------------------------------------------------------------

[2003-02-09 09:57:01] [EMAIL PROTECTED]

Related to bug #21849


------------------------------------------------------------------------

[2002-10-29 19:16:16] tater at potatoe dot com

Wrong summary, cut & paste error.

------------------------------------------------------------------------

[2002-10-28 15:48:42] tater at potatoe dot com

Still doesn't work on ZE2.

------------------------------------------------------------------------

[2002-10-28 15:46:45] tater at potatoe dot com

If this is not a bug, then how exactly is one supposed to be able to
make the function call

self::method($a,$b,$etc)

using call_user_func_array()??? or is that not supported? because this
still doesn't work. a word or two of explanation would be polite.

------------------------------------------------------------------------

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
    http://bugs.php.net/18926

-- 
Edit this bug report at http://bugs.php.net/?id=18926&edit=1

Reply via email to