3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class a { function b(){ (function(){ echo __CLASS__,' ', __FUNCTION__; })(); function c(){ echo __CLASS__,' ', __FUNCTION__; } } } (new a)->b(); c();
based on n43UQ
Output for 7.0.0 - 7.2.0
a {closure}a c
Output for 5.3.18 - 5.6.28
Parse error: syntax error, unexpected '(' in /in/AY5jS on line 7
Process exited with code 255.