3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php echo rand();die(); class ExceptionX extends Exception { } class ExceptionY extends Exception { } class ExceptionZ extends Exception { } function t() { throw new ExceptionZ(); } try { t(); } catch (Exception $e) { switch(get_class($e)) { case 'ExceptionX': /** fall through */ case 'ExceptionY': /** fall through */ /* handle the ones we want here */ break; default: throw $e; } }
Output for 7.1.0
264029231
Output for 7.0.14
1284834282
Output for 7.0.6
732793968
Output for 7.0.5
465861327
Output for 7.0.4
918503646
Output for 7.0.3
2052335193
Output for 7.0.2
30273573
Output for 7.0.1
891713130
Output for 7.0.0
1338444936
Output for hhvm-3.12.0
1270122180
Output for hhvm-3.10.0

Process exited with code 153.
Output for 5.6.28
1915704977
Output for 5.6.21
2027846992
Output for 5.6.20
485998539
Output for 5.6.19
1392594723
Output for 5.6.18
1246089586
Output for 5.6.17
292163977
Output for 5.6.16
18387935
Output for 5.6.15
1031698807
Output for 5.6.14
1553907581
Output for 5.6.13
2005958253
Output for 5.6.12
1337334383
Output for 5.6.11
40498753
Output for 5.6.10
143065264
Output for 5.6.9
1212233739
Output for 5.6.8
1021603716
Output for 5.5.35
911390434
Output for 5.5.34
1503250633
Output for 5.5.33
534043146
Output for 5.5.32
1251673138
Output for 5.5.31
1667822159
Output for 5.5.30
1844926196
Output for 5.5.29
1762317426
Output for 5.5.28
1996200510
Output for 5.5.27
218163650
Output for 5.5.26
1662942794
Output for 5.5.25
930391004
Output for 5.5.24
1443862777
Output for 5.4.45
1112066400
Output for 5.4.44
1315505033
Output for 5.4.43
1300786856
Output for 5.4.42
300415627
Output for 5.4.41
962020990
Output for 5.4.40
430766849
Output for 5.4.39
520873579
Output for 5.4.38
1716882545
Output for 5.4.37
289078601
Output for 5.4.36
1102337220
Output for 5.4.35
379333333
Output for 5.4.34
138382988
Output for 5.4.32
445099795
Output for 5.4.31
402976627
Output for 5.4.30
308006990
Output for 5.4.29
1223067013
Output for 5.4.28
1688368407
Output for 5.4.27
1714326491
Output for 5.4.26
807886967
Output for 5.4.25
635303006
Output for 5.4.24
762123423
Output for 5.4.23
767790835
Output for 5.4.22
1757688143
Output for 5.4.21
1811168153
Output for 5.4.20
232695748
Output for 5.4.19
725334418
Output for 5.4.18
938292430
Output for 5.4.17
1036017792
Output for 5.4.16
1978254571
Output for 5.4.15
70786972
Output for 5.4.14
1414369125
Output for 5.4.13
264663701
Output for 5.4.12
1835348788
Output for 5.4.11
2058109924
Output for 5.4.10
722673937
Output for 5.4.9
975387977
Output for 5.4.8
751587856
Output for 5.4.7
878794441
Output for 5.4.6
1836089349
Output for 5.4.5
439285254
Output for 5.4.4
1472608423
Output for 5.4.3
58051189
Output for 5.4.2
1324882080
Output for 5.4.1
1700108378
Output for 5.4.0
1635497475
Output for 5.3.29
184536299
Output for 5.3.28
670620077
Output for 5.3.27
1343765865
Output for 5.3.26
523745963
Output for 5.3.25
437542804
Output for 5.3.24
1591302786
Output for 5.3.23
436780924
Output for 5.3.22
1776963628
Output for 5.3.21
642833859
Output for 5.3.20
285089187
Output for 5.3.19
2085182092
Output for 5.3.18
1358753287
Output for 5.3.17
1156793976
Output for 5.3.16
1120043065
Output for 5.3.15
1504485529
Output for 5.3.14
1224721859
Output for 5.3.13
571874922
Output for 5.3.12
1812680033
Output for 5.3.11
1056161727
Output for 5.3.10
2074407116
Output for 5.3.9
529939131
Output for 5.3.8
1633564318
Output for 5.3.7
486502861
Output for 5.3.6
683777051
Output for 5.3.5
718583758
Output for 5.3.4
130675632
Output for 5.3.3
380173601
Output for 5.3.2
778879824
Output for 5.3.1
809182401
Output for 5.3.0
15379118
Output for 5.2.17
374438203
Output for 5.2.16
1174322572
Output for 5.2.15
1547762190
Output for 5.2.14
593793756
Output for 5.2.13
389996117
Output for 5.2.12
1760093276
Output for 5.2.11
980604042
Output for 5.2.10
2034503166
Output for 5.2.9
605694811
Output for 5.2.8
1137028032
Output for 5.2.7
1602196465
Output for 5.2.6
2028075901
Output for 5.2.5
1169729285
Output for 5.2.4
12064383
Output for 5.2.3
271855958
Output for 5.2.2
2132604245
Output for 5.2.1
1742883703
Output for 5.2.0
886771524
Output for 5.1.6
1451268973
Output for 5.1.5
2050847069
Output for 5.1.4
565085492
Output for 5.1.3
401158112
Output for 5.1.2
452484927
Output for 5.1.1
257098231
Output for 5.1.0
1631800069
Output for 5.0.5
330329669
Output for 5.0.4
332678231
Output for 5.0.3
2035272555
Output for 5.0.2
2123408111
Output for 5.0.1
13104115
Output for 5.0.0
567746648
Output for 4.4.2 - 4.4.9
Parse error: syntax error, unexpected T_NEW in /in/bJcS0 on line 7
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1
Parse error: parse error, unexpected T_NEW in /in/bJcS0 on line 7
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/bJcS0 on line 7
Process exited with code 255.