php-src/Zend/tests/access_modifiers_012.phpt
Gabriel Caruso ded3d984c6 Use EXPECT instead of EXPECTF when possible
EXPECTF logic in run-tests.php is considerable, so let's avoid it.
2018-02-20 21:53:48 +01:00

22 lines
492 B
PHP

--TEST--
Trigger __call() in lieu of non visible methods when called via a callback.
--FILE--
<?php
class C {
protected function prot() { }
private function priv() { }
public function __call($name, $args) {
echo "In __call() for method $name()\n";
}
}
$c = new C;
call_user_func(array($c, 'none'));
call_user_func(array($c, 'prot'));
call_user_func(array($c, 'priv'));
?>
--EXPECT--
In __call() for method none()
In __call() for method prot()
In __call() for method priv()