Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class A {
- public class __call($name, $params) {
- if (method_exists?($this, $name)) {
- $result = call_user_func_array([$this, $name], $params);
- return $result;
- }
- }
- }
- class B {
- private function hello() {
- echo "Hello"
- }
- }
- $b = new B();
- $b->hello();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement