mirror of
https://github.com/php/php-src.git
synced 2024-09-21 18:07:23 +00:00
Add test
This commit is contained in:
parent
5336054811
commit
440c8c9cb1
21
Zend/tests/access_modifiers_012.phpt
Normal file
21
Zend/tests/access_modifiers_012.phpt
Normal file
@ -0,0 +1,21 @@
|
||||
--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'));
|
||||
?>
|
||||
--EXPECTF--
|
||||
In __call() for method none()
|
||||
In __call() for method prot()
|
||||
In __call() for method priv()
|
Loading…
Reference in New Issue
Block a user