File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / php / Zend / tests / bug19859.phpt
Revision 1.1: download - view: text, annotated - select for diffs - revision graph
Tue Feb 21 23:47:52 2012 UTC (12 years, 8 months ago) by misho
CVS tags: MAIN, HEAD
Initial revision

--TEST--
Bug #19859 (__call() does not catch call_user_func_array() calls)
--SKIPIF--
<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 is needed'); ?>
--FILE--
<?php
class test
{
  function __call($method,$args)
  {
    print "test::__call invoked for method '$method'\n";
  }
}
$x = new test;
$x->fake(1);
call_user_func_array(array($x,'fake'),array(1));
call_user_func(array($x,'fake'),2);
?>
--EXPECT--
test::__call invoked for method 'fake'
test::__call invoked for method 'fake'
test::__call invoked for method 'fake'

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>