3v4l.org

run code in 300+ PHP versions simultaneously
<?php set_error_handler(static function ($severity, $message, $file, $line) { throw new ErrorException($message, 0, $severity, $file, $line); }); class Foo { } var_dump(unserialize('O:3:"Foo":3:{i:0;i:0;i:1;N;i:2;a:0:{}}'));
Output for 8.2.0 - 8.2.19, 8.3.0 - 8.3.7
Fatal error: Uncaught ErrorException: Creation of dynamic property Foo::$0 is deprecated in /in/VArV6:10 Stack trace: #0 [internal function]: {closure}(8192, 'Creation of dyn...', '/in/VArV6', 10) #1 /in/VArV6(10): unserialize('O:3:"Foo":3:{i:...') #2 {main} thrown in /in/VArV6 on line 10
Process exited with code 255.
Output for 7.4.0 - 7.4.33, 8.0.1 - 8.0.30, 8.1.0 - 8.1.28
object(Foo)#2 (3) { ["0"]=> int(0) ["1"]=> NULL ["2"]=> array(0) { } }

preferences:
88.4 ms | 402 KiB | 123 Q