3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php set_error_handler(function($errno, $errstr){ echo "Error handler"; echo "\n"; echo $errstr; }); try { fopen('php://temp/maxmemory:-1', 'w+'); } catch (Throwable $e) { echo "Catch"; }
based on FiSqf
Output for 7.1.0 - 7.2.0
Catch
Output for 5.3.18 - 7.0.20
Error handler fopen(): Max memory must be >= 0Error handler fopen(php://temp/maxmemory:-1): failed to open stream: operation failed