3v4l.org

run code in 300+ PHP versions simultaneously
<?php class P { static $a=9; function __get($var) { return self::$var; } function __isset($var) { return true; } } var_dump(isset(P->$az));
Output for 8.1.23 - 8.1.27, 8.2.10 - 8.2.18, 8.3.0 - 8.3.4, 8.3.6
Fatal error: Uncaught Error: Undefined constant "P" in /in/5khkJ:24 Stack trace: #0 {main} thrown in /in/5khkJ on line 24
Process exited with code 255.
Output for 8.3.5
Warning: PHP Startup: Unable to load dynamic library 'sodium.so' (tried: /usr/lib/php/8.3.5/modules/sodium.so (libsodium.so.23: cannot open shared object file: No such file or directory), /usr/lib/php/8.3.5/modules/sodium.so.so (/usr/lib/php/8.3.5/modules/sodium.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0 Fatal error: Uncaught Error: Undefined constant "P" in /in/5khkJ:24 Stack trace: #0 {main} thrown in /in/5khkJ on line 24
Process exited with code 255.
Output for 5.4.0 - 5.4.22
Parse error: syntax error, unexpected '->' (T_OBJECT_OPERATOR), expecting :: (T_PAAMAYIM_NEKUDOTAYIM) in /in/5khkJ on line 24
Process exited with code 255.
Output for 5.3.0 - 5.3.27
Parse error: syntax error, unexpected T_OBJECT_OPERATOR, expecting T_PAAMAYIM_NEKUDOTAYIM in /in/5khkJ on line 24
Process exited with code 255.

preferences:
83.79 ms | 401 KiB | 77 Q