3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $match = []; set_error_handler (function ($a,$B,$C,$W,$q,$rrr){ var_dump("qwqew", $a, $B,$C,$W,$rrr); },E_NOTICE); try { $match[1]; } catch (\Exception $e) { echo 'Exception:' . $e->getMessage(); }
based on BvDUv
Output for 7.1.0 - 7.3.0alpha1
Fatal error: Uncaught ArgumentCountError: Too few arguments to function {closure}(), 5 passed and exactly 6 expected in /in/Hd0X0:5 Stack trace: #0 /in/Hd0X0(10): {closure}(8, 'Undefined offse...', '/in/Hd0X0', 10, Array) #1 {main} thrown in /in/Hd0X0 on line 5
Process exited with code 255.
Output for 5.6.30, 7.0.30
Warning: Missing argument 6 for {closure}() in /in/Hd0X0 on line 5 Notice: Undefined variable: rrr in /in/Hd0X0 on line 6 string(5) "qwqew" int(8) string(19) "Undefined offset: 1" string(9) "/in/Hd0X0" int(10) NULL
Output for hhvm-3.22.0
string(5) "qwqew" int(8) string(18) "Undefined index: 1" string(9) "/in/Hd0X0" int(-1) array(1) { [0]=> array(2) { ["file"]=> string(9) "/in/Hd0X0" ["line"]=> int(-1) } }
Output for hhvm-3.18.5 - 3.21.3
string(5) "qwqew" int(8) string(18) "Undefined index: 1" string(9) "/in/Hd0X0" int(10) array(1) { [0]=> array(2) { ["file"]=> string(9) "/in/Hd0X0" ["line"]=> int(10) } }