3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array=array('A-C','A-E','Yes or No'); $result=array_map("showresult",$array); function showresult($a){ $case=preg_match_all('/-|or/',$a,$matches); $explode_by=$matches[0][0]; //print_r($matches[0][0]);die(); $a_explode=explode($explode_by,$a); echo $a_explode[0]; // switch($matches[0]){ //case "-":for(); //} }

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).

VersionSystem time (s)User time (s)Memory (MiB)
8.3.60.0130.00316.63
8.3.50.0180.00317.37
8.3.40.0160.00618.80
8.3.30.0040.01119.02
8.3.20.0080.00019.03
8.3.10.0100.00020.64
8.3.00.0040.00419.51
8.2.180.0100.01016.63
8.2.170.0120.00922.96
8.2.160.0090.00620.95
8.2.150.0040.00424.18
8.2.140.0050.00224.66
8.2.130.0040.00426.16
8.2.120.0000.00721.08
8.2.110.0060.00321.17
8.2.100.0080.00318.03
8.2.90.0060.00319.17
8.2.80.0000.00719.39
8.2.70.0000.00817.88
8.2.60.0040.00417.93
8.2.50.0040.00418.07
8.2.40.0060.00318.26
8.2.30.0070.00018.14
8.2.20.0060.00317.84
8.2.10.0050.00217.77
8.2.00.0040.00417.76
8.1.280.0100.01325.92
8.1.270.0040.00423.99
8.1.260.0040.00426.35
8.1.250.0050.00328.09
8.1.240.0070.00423.76
8.1.230.0040.00720.76
8.1.220.0060.00318.77
8.1.210.0000.00819.15
8.1.200.0030.00617.48
8.1.190.0000.00917.54
8.1.180.0000.00718.10
8.1.170.0030.00718.84
8.1.160.0030.00618.87
8.1.150.0030.00618.71
8.1.140.0070.00017.61
8.1.130.0040.00417.98
8.1.120.0070.00317.61
8.1.110.0070.00017.58
8.1.100.0020.00517.51
8.1.90.0050.00317.52
8.1.80.0040.00417.58
8.1.70.0030.00317.54
8.1.60.0070.00317.61
8.1.50.0000.00717.45
8.1.40.0040.00417.68
8.1.30.0030.00617.59
8.1.20.0040.00717.63
8.1.10.0040.00417.77
8.1.00.0040.00417.68
8.0.300.0040.00419.81
8.0.290.0000.00716.75
8.0.280.0030.00318.53
8.0.270.0070.00017.30
8.0.260.0080.00017.00
8.0.250.0050.00217.05
8.0.240.0040.00417.10
8.0.230.0030.00317.13
8.0.220.0000.00716.97
8.0.210.0040.00416.88
8.0.200.0030.00317.05
8.0.190.0000.00816.98
8.0.180.0000.00716.93
8.0.170.0090.00016.83
8.0.160.0050.00216.97
8.0.150.0000.01017.05
8.0.140.0050.00316.92
8.0.130.0050.00013.35
8.0.120.0000.01116.93
8.0.110.0040.00417.11
8.0.100.0040.00416.87
8.0.90.0070.00016.99
8.0.80.0070.01316.88
8.0.70.0020.00516.81
8.0.60.0000.00716.93
8.0.50.0000.00716.82
8.0.30.0110.00517.22
8.0.20.0120.00917.26
8.0.10.0030.00616.99
8.0.00.0110.00816.82
7.4.330.0060.00013.14
7.4.320.0000.00616.68
7.4.300.0030.00316.57
7.4.290.0040.00416.65
7.4.280.0080.00316.56
7.4.270.0000.00716.70
7.4.260.0030.00313.34
7.4.250.0030.00616.67
7.4.240.0000.00616.73
7.4.230.0070.00016.73
7.4.220.0150.00516.77
7.4.210.0080.00816.85
7.4.200.0030.00316.77
7.4.190.0000.00716.76
7.4.160.0050.01016.59
7.4.150.0140.01116.53
7.4.140.0060.01316.64
7.4.130.0110.01116.59
7.4.120.0060.01116.71
7.4.110.0030.01316.67
7.4.100.0090.01216.83
7.4.90.0100.00716.69
7.4.80.0060.01319.39
7.4.70.0090.00916.66
7.4.60.0030.01316.58
7.4.50.0050.00516.50
7.4.40.0050.00816.66
7.4.30.0070.01116.59
7.4.00.0040.01114.95
7.3.330.0060.00013.25
7.3.320.0050.00013.24
7.3.310.0030.00716.36
7.3.300.0000.00716.26
7.3.290.0080.00816.43
7.3.280.0100.00916.48
7.3.270.0130.00616.43
7.3.260.0100.01416.69
7.3.250.0160.00416.40
7.3.240.0230.00016.41
7.3.230.0100.01016.77
7.3.210.0100.00716.54
7.3.200.0060.01116.76
7.3.190.0090.00916.66
7.3.180.0170.00016.63
7.3.170.0120.00416.73
7.3.160.0060.01016.35
7.3.120.0030.01215.10
7.2.330.0150.00416.87
7.2.320.0080.01516.93
7.2.310.0120.01316.61
7.2.300.0030.01416.82
7.2.290.0060.01116.60
7.2.80.0120.00316.42
7.1.200.0060.00915.89
7.1.70.0070.00317.24
7.1.60.0130.00619.30
7.1.50.0000.02117.23
7.1.00.0000.05722.47
7.0.200.0000.01116.63
7.0.140.0030.07321.95
7.0.120.0030.06722.15
7.0.60.0200.06319.94
7.0.50.0070.07017.92
7.0.40.0030.06020.13
7.0.30.0170.04320.24
7.0.20.0270.04320.14
7.0.10.0270.08020.22
7.0.00.0030.04720.25
5.6.210.0130.05320.64
5.6.200.0070.08718.29
5.6.190.0030.06320.41
5.6.180.0300.07720.46
5.6.170.0230.04320.55
5.6.160.0100.08320.46
5.6.150.0030.07018.17
5.6.140.0000.05018.15
5.6.130.0070.04018.15
5.6.120.0130.03721.14
5.6.110.0100.08720.97
5.6.100.0070.05020.89
5.6.90.0100.03721.13
5.6.80.0100.07320.45
5.6.70.0170.04320.48
5.5.350.0270.07720.33
5.5.340.0100.08018.07
5.5.330.0070.05020.28
5.5.320.0200.05720.36
5.5.310.0330.04020.36
5.5.300.0130.07317.96
5.5.290.0030.04318.09
5.5.280.0200.07320.77
5.5.270.0130.04720.79
5.5.260.0000.04720.89
5.5.250.0100.06720.66
5.5.240.0070.08020.26
5.4.450.0170.07319.49
5.4.440.0100.03319.58
5.4.430.0070.06019.40
5.4.420.0030.08319.46
5.4.410.0100.06019.34
5.4.400.0030.06719.15
5.4.390.0030.05319.01
5.4.380.0030.05018.85
5.4.370.0200.05018.85
5.4.360.0100.07319.16
5.4.350.0000.07719.00
5.4.340.0070.06318.92
5.4.320.0030.05719.17
5.4.310.0030.07719.14
5.4.300.0030.08019.08
5.4.290.0070.07719.14
5.4.280.0030.04318.83
5.4.270.0100.06318.87
5.4.260.0170.06319.15
5.4.250.0070.06019.07
5.4.240.0030.05018.92
5.4.230.0100.03718.84
5.4.220.0100.04319.14
5.4.210.0070.07719.23
5.4.200.0100.03319.23
5.4.190.0100.07019.23
5.4.180.0030.05019.23
5.4.170.0070.07018.99
5.4.160.0130.06719.13
5.4.150.0100.07019.13
5.4.140.0100.04016.45
5.4.130.0030.03716.40
5.4.120.0200.03716.37
5.4.110.0030.04316.48
5.4.100.0130.06716.52
5.4.90.0070.06316.58
5.4.80.0100.03716.53
5.4.70.0100.06316.46
5.4.60.0070.07316.37
5.4.50.0070.06016.45
5.4.40.0000.05016.43
5.4.30.0030.07716.34
5.4.20.0000.04016.46
5.4.10.0070.05016.25
5.4.00.0030.04315.71
5.3.290.0100.05014.68
5.3.280.0130.05014.75
5.3.270.0070.05014.49
5.3.260.0170.07014.75
5.3.250.0130.07314.69
5.3.240.0030.04014.61
5.3.230.0070.04014.48
5.3.220.0030.05014.62
5.3.210.0100.06714.62
5.3.200.0100.07014.62
5.3.190.0070.08014.72
5.3.180.0070.07014.57
5.3.170.0030.04314.61
5.3.160.0070.07314.56
5.3.150.0130.07314.60
5.3.140.0030.08014.47
5.3.130.0100.07014.55
5.3.120.0170.07014.70
5.3.110.0000.06714.55
5.3.100.0100.04314.05
5.3.90.0130.06714.07
5.3.80.0100.06314.16
5.3.70.0030.05314.18
5.3.60.0030.06714.06
5.3.50.0000.08013.96
5.3.40.0130.02714.00
5.3.30.0100.06713.98
5.3.20.0070.05013.75
5.3.10.0100.07013.68
5.3.00.0000.04713.67
5.2.170.0070.06311.04
5.2.160.0030.03311.30
5.2.150.0030.07011.14
5.2.140.0100.05711.03
5.2.130.0070.03711.25
5.2.120.0100.03311.02
5.2.110.0130.04711.16
5.2.100.0070.06011.05
5.2.90.0030.04311.25
5.2.80.0030.06311.25
5.2.70.0070.06311.09
5.2.60.0030.05011.08
5.2.50.0130.05711.08
5.2.40.0030.05011.00
5.2.30.0000.03310.95
5.2.20.0000.03711.04
5.2.10.0000.03710.84
5.2.00.0130.01710.76
5.1.60.0000.0579.95
5.1.50.0070.0539.97
5.1.40.0070.0539.97
5.1.30.0030.04310.39
5.1.20.0030.05710.35
5.1.10.0070.05310.21
5.1.00.0030.04010.05
5.0.50.0000.0238.54
5.0.40.0000.0238.49
5.0.30.0070.0638.36
5.0.20.0030.0438.17
5.0.10.0030.0408.20
5.0.00.0100.0608.21
4.4.90.0070.0277.88
4.4.80.0000.0377.88
4.4.70.0000.0337.88
4.4.60.0030.0277.88
4.4.50.0000.0177.88
4.4.40.0070.0337.88
4.4.30.0070.0307.88
4.4.20.0070.0237.88
4.4.10.0000.0377.88
4.4.00.0030.0577.88
4.3.110.0000.0237.88
4.3.100.0000.0277.88
4.3.90.0000.0277.88
4.3.80.0070.0307.88
4.3.70.0000.0377.88
4.3.60.0030.0177.88
4.3.50.0030.0307.88
4.3.40.0030.0537.88
4.3.30.0030.0307.88
4.3.20.0000.0377.88
4.3.10.0030.0237.88
4.3.00.0000.0277.88

preferences:
43.06 ms | 401 KiB | 5 Q