3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Example { protected $_data = [ "foo" => "bar", "baz" => "crazy" ]; public function __get( $key ) { return $this->_data[ $key ]; } } $e = new Example(); $what_I_expect = ( empty( $e->foo ) ) ? "Why u no exist?!" : "It exists!"; var_dump( $what_I_expect );

preferences:
36.15 ms | 402 KiB | 5 Q