3v4l.org

run code in 300+ PHP versions simultaneously
<?php #[AllowDynamicProperties] class Foo { public function __get( $name ) { return $this->$name; } public function __set( $name, $value ) { return $this->$name = $value; } public function __isset( $name ) { return isset( $this->$name ); } public function __unset( $name ) { unset( $this->$name ); } } $foo = new Foo(); var_dump(property_exists( $foo, 'enable')); $foo->enable = true; var_dump(property_exists( $foo, 'enable'));

preferences:
64.68 ms | 405 KiB | 5 Q