3v4l.org

run code in 300+ PHP versions simultaneously
<?php class WP_Text_Diff_Renderer_Table { protected $compat_fields = array( '_show_split_view', 'inline_diff_renderer', '_diff_threshold' ); public function __get( $name ) { if ( in_array( $name, $this->compat_fields, true ) ) { return $this->$name; } } public function __set( $name, $value ) { if ( in_array( $name, $this->compat_fields, true ) ) { $this->$name = $value; } } public function __isset( $name ) { if ( in_array( $name, $this->compat_fields, true ) ) { return isset( $this->$name ); } } public function __unset( $name ) { if ( in_array( $name, $this->compat_fields, true ) ) { unset( $this->$name ); } } } $obj = new WP_Text_Diff_Renderer_Table(); $obj->_title = 'Hello World'; var_dump( $obj->_title ); var_dump( isset( $obj->_title ) );

preferences:
25.28 ms | 405 KiB | 5 Q