3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $match = []; set_error_handler (function ($a,$B,$C,$W){ var_dump("qwqew", $a, $B,$C,$W); },E_NOTICE); try { $match[1]; } catch (\Exception $e) { echo 'Exception:' . $e->getMessage(); }
based on 4M831
Output for 5.6.30, 7.0.30 - 7.3.0alpha1
string(5) "qwqew" int(8) string(19) "Undefined offset: 1" string(9) "/in/Jh9aQ" int(10)
Output for hhvm-3.22.0
string(5) "qwqew" int(8) string(18) "Undefined index: 1" string(9) "/in/Jh9aQ" int(-1)
Output for hhvm-3.18.5 - 3.21.3
string(5) "qwqew" int(8) string(18) "Undefined index: 1" string(9) "/in/Jh9aQ" int(10)