- var_dump: documentation ( source)
<?php
class Example {
protected $_data = [ "foo" => "bar", "baz" => "crazy" ];
public function __get( $key ) {
return $this->_data[ $key ];
}
}
$e = new Example();
$what_I_expect = ( isset( $e->foo ) ) ? "It exists!" : "Why u no exist?!";
var_dump( $what_I_expect );