3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public function __get( $name ) { $this->$name = 'testing'; return $this->$name; } } $foo = new Foo(); var_dump( isset( $foo->attributes ) ); var_dump( $foo->attributes );
Output for 8.2.0 - 8.2.27, 8.3.0 - 8.3.15, 8.4.1 - 8.4.2
bool(false) Deprecated: Creation of dynamic property Foo::$attributes is deprecated in /in/SHAYh on line 5 string(7) "testing"
Output for 8.1.0 - 8.1.31
bool(false) string(7) "testing"

preferences:
58.16 ms | 406 KiB | 5 Q