diff options
Diffstat (limited to 'Zend/tests/access_modifiers_012.phpt')
-rw-r--r-- | Zend/tests/access_modifiers_012.phpt | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/Zend/tests/access_modifiers_012.phpt b/Zend/tests/access_modifiers_012.phpt new file mode 100644 index 0000000..ac4d72c --- /dev/null +++ b/Zend/tests/access_modifiers_012.phpt @@ -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() |