3v4l.org

run code in 500+ PHP versions simultaneously
<?php class MyClass { public static function oldFunction() { trigger_error( vsprintf('Using "%s" is deprecated, use "%s" instead.', [__METHOD__, __CLASS__ . '::newFunction']), E_USER_DEPRECATED ); } public static function newFunction() { } } MyClass::oldFunction(); trigger_error("Cannot divide by zero", E_USER_ERROR);
Output for 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.34
Deprecated: Using "MyClass::oldFunction" is deprecated, use "MyClass::newFunction" instead. in /in/uHoLn on line 9 Fatal error: Cannot divide by zero in /in/uHoLn on line 17
Process exited with code 255.
Output for 8.2.0 - 8.2.34, 8.3.0 - 8.3.35
Deprecated: Using "MyClass::oldFunction" is deprecated, use "MyClass::newFunction" instead. in /in/uHoLn on line 7 Fatal error: Cannot divide by zero in /in/uHoLn on line 17
Process exited with code 255.
Output for 8.4.1 - 8.4.26
Deprecated: Using "MyClass::oldFunction" is deprecated, use "MyClass::newFunction" instead. in /in/uHoLn on line 7 Deprecated: Passing E_USER_ERROR to trigger_error() is deprecated since 8.4, throw an exception or call exit with a string message instead in /in/uHoLn on line 17 Fatal error: Cannot divide by zero in /in/uHoLn on line 17
Process exited with code 255.
Output for 8.5.0 - 8.5.11
Deprecated: Using "MyClass::oldFunction" is deprecated, use "MyClass::newFunction" instead. in /in/uHoLn on line 7 Deprecated: Passing E_USER_ERROR to trigger_error() is deprecated since 8.4, throw an exception or call exit with a string message instead in /in/uHoLn on line 17 Fatal error: Cannot divide by zero in /in/uHoLn on line 17 Stack trace: #0 /in/uHoLn(17): trigger_error('Cannot divide b...', 256) #1 {main}
Process exited with code 255.

preferences:
34.65 ms | 1148 KiB | 13 Q