<?php class C{ public $foo; public function __construct() { $this->foo = array($this, 'foo'); } public function foo(){echo "foo is evidently a callable function!";} } $o=new C(); if(is_int($o->foo)){ echo "foo is an integer!\n"; } if(is_callable($o->foo)){ echo "foo IS callable!\n"; }else{ echo "foo IS NOT callable!\n"; } $o->foo();
You have javascript disabled. You will not be able to edit any code.