3v4l.org

run code in 200+ PHP versions simultaneously
<?php class ErrorWrapper { public $context; public $var = self::INVALID; } stream_wrapper_register('error',ErrorWrapper::class); file_get_contents('error://test');
Output for 7.4.0
Fatal error: Uncaught Error: Undefined class constant 'self::INVALID' in /in/KKqGn:7 Stack trace: #0 /in/KKqGn(7): file_get_contents('error://test') #1 {main} thrown in /in/KKqGn on line 7
Process exited with code 255.
Output for 7.2.17, 7.3.4
Warning: file_get_contents(error://test): failed to open stream: operation failed in /in/KKqGn on line 7 Fatal error: Uncaught Error: Undefined class constant 'self::INVALID' in /in/KKqGn:7 Stack trace: #0 /in/KKqGn(7): file_get_contents('error://test') #1 {main} thrown in /in/KKqGn on line 7
Process exited with code 255.
Output for 7.1.25 - 7.2.16, 7.3.0 - 7.3.3

Process exited with code 139.