3v4l.org

run code in 300+ PHP versions simultaneously
<?php set_error_handler(function($ErrLevel, $ErrMessage) { if ($ErrLevel == E_RECOVERABLE_ERROR // order this according to what your app uses most return strpos($ErrMessage, 'must be an instance of string, string') || strpos($ErrMessage, 'must be an instance of integer, integer') || strpos($ErrMessage, 'must be an instance of float, double') || strpos($ErrMessage, 'must be an instance of boolean, boolean') || strpos($ErrMessage, 'must be an instance of resource, resource'); }); function miauw(string $string) { echo 'de catchable error wordt onderdrukt wanneer $string een string is'; } miauw(2);
Output for 5.4.0 - 5.4.24
Parse error: syntax error, unexpected 'return' (T_RETURN) in /in/dfVcf on line 6
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Parse error: syntax error, unexpected T_RETURN in /in/dfVcf on line 6
Process exited with code 255.

preferences:
192.25 ms | 1386 KiB | 61 Q