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();

preferences:
37.61 ms | 402 KiB | 5 Q