3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class milad{ public function test(){ $this->test=function(){ return time()/2==0; }; } } $milad=new milad; $milad->test(); var_dump($milad->test);
Output for 5.6.0 - 5.6.30, 7.0.0 - 7.3.0rc3
object(Closure)#2 (1) { ["this"]=> object(milad)#1 (1) { ["test"]=> *RECURSION* } }
Output for hhvm-3.15.4
object(Closure$milad::test;837159114)#2 (1) { ["this"]=> object(milad)#1 (1) { ["test"]=> *RECURSION* } }