3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { protected $_b = 'protected'; private $_c = 'private'; } $method = function (){ var_dump($this->_b, $this->_c, get_class($this);}; $a = new A; $method = $method->bindTo($a); $method();
Output for 5.3.0 - 5.3.13, 5.4.0 - 5.4.3
Parse error: syntax error, unexpected ';' in /in/LegLi on line 8
Process exited with code 255.

preferences:
171.74 ms | 1399 KiB | 25 Q