3v4l.org

run code in 300+ PHP versions simultaneously
<?php $text = 'Carolina -6,5 - Indianapolis '; if (mb_ereg('^(.+)[[:space:]]+(([-]?[0-9]+[,.]?[0-9]*) /)?([-]?[0-9]+[,.]?[0-9]*)? -(.+)$', $text, $ar)) $team = 1; if (mb_ereg('^(.+) -(.+)[[:space:]]+(([-]?[0-9]+[,.]?[0-9]*) /)?([-]?[0-9]+[,.]?[0-9]*)?$', $text, $ar)) $team = 2; var_dump($ar, $team); foreach ($ar as $key => &$a) $a = str_replace(array(",", "+"), array(".", ""), $a); var_dump($ar); $home = 23; $away = 23; if ($team == 1) $home = $home + $ar[4]; elseif ($team == 2) $away = $away + $ar[5]; var_dump($home, $away);

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.0060.01018.49
8.3.50.0110.00822.11
8.3.40.0090.00619.09
8.3.30.0140.00018.82
8.3.20.0080.00020.29
8.3.10.0030.00623.65
8.3.00.0080.00019.63
8.2.180.0070.01418.54
8.2.170.0070.00722.96
8.2.160.0080.00620.52
8.2.150.0080.00024.18
8.2.140.0050.00324.66
8.2.130.0040.00426.16
8.2.120.0050.00517.88
8.2.110.0070.00320.49
8.2.100.0000.01118.10
8.2.90.0000.00818.41
8.2.80.0000.00817.97
8.2.70.0030.00617.88
8.2.60.0100.00018.16
8.2.50.0030.00618.07
8.2.40.0030.00819.37
8.2.30.0000.01022.45
8.2.20.0000.00817.80
8.2.10.0070.00018.11
8.2.00.0050.00318.24
8.1.280.0100.00725.92
8.1.270.0080.00023.94
8.1.260.0040.00426.35
8.1.250.0080.00028.09
8.1.240.0090.00022.22
8.1.230.0080.00321.02
8.1.220.0000.00817.78
8.1.210.0030.00518.84
8.1.200.0030.00617.48
8.1.190.0060.00317.25
8.1.180.0080.00018.10
8.1.170.0040.00420.55
8.1.160.0000.00722.21
8.1.150.0110.00018.94
8.1.140.0030.00619.78
8.1.130.0030.00317.84
8.1.120.0000.00717.67
8.1.110.0040.00417.61
8.1.100.0000.00817.68
8.1.90.0030.00517.72
8.1.80.0080.00017.54
8.1.70.0000.00717.61
8.1.60.0120.00017.74
8.1.50.0070.00317.77
8.1.40.0040.00717.49
8.1.30.0060.00317.62
8.1.20.0030.00717.76
8.1.10.0050.00317.77
8.1.00.0030.00817.65
8.0.300.0000.00820.21
8.0.290.0040.00417.00
8.0.280.0030.00318.64
8.0.270.0070.00017.50
8.0.260.0000.00617.36
8.0.250.0040.00417.18
8.0.240.0080.00017.02
8.0.230.0000.00717.14
8.0.220.0030.00317.11
8.0.210.0000.00817.08
8.0.200.0030.00317.19
8.0.190.0050.00317.16
8.0.180.0040.00417.12
8.0.170.0030.00517.02
8.0.160.0000.00717.04
8.0.150.0050.00317.01
8.0.140.0070.00417.01
8.0.130.0030.00313.60
8.0.120.0000.00817.12
8.0.110.0050.00216.99
8.0.100.0070.00017.01
8.0.90.0040.00417.18
8.0.80.0100.01017.19
8.0.70.0040.00417.22
8.0.60.0040.00416.95
8.0.50.0080.00017.27
8.0.30.0160.00317.31
8.0.20.0150.00517.42
8.0.10.0030.00517.25
8.0.00.0090.00916.90
7.4.330.0030.00315.21
7.4.320.0040.00416.69
7.4.300.0000.00616.71
7.4.290.0050.00216.67
7.4.280.0050.00216.76
7.4.270.0030.00316.70
7.4.260.0030.00316.73
7.4.250.0040.00416.61
7.4.240.0020.00516.72
7.4.230.0000.00816.50
7.4.220.0090.01816.72
7.4.210.0090.00716.71
7.4.200.0070.00016.69
7.4.160.0100.00616.65
7.4.150.0090.00917.40
7.4.140.0160.00617.86
7.4.130.0130.00916.77
7.4.120.0130.00516.73
7.4.110.0070.01316.60
7.4.100.0150.00416.79
7.4.90.0070.01016.70
7.4.80.0180.00719.39
7.4.70.0080.00816.59
7.4.60.0120.00816.51
7.4.50.0000.00716.42
7.4.40.0090.00916.43
7.4.30.0140.00816.68
7.4.00.0070.01114.99
7.3.330.0000.00513.45
7.3.320.0000.00513.41
7.3.310.0020.00516.52
7.3.300.0030.00316.52
7.3.290.0060.00916.49
7.3.280.0100.01016.43
7.3.270.0040.01317.40
7.3.260.0090.00916.41
7.3.240.0140.00416.53
7.3.230.0250.00916.40
7.3.210.0140.00416.54
7.3.200.0080.01316.46
7.3.190.0100.00716.66
7.3.180.0120.00316.58
7.3.170.0150.00316.67
7.3.160.0070.01016.73
7.2.330.0070.01016.90
7.2.320.0150.00316.78
7.2.310.0170.00716.70
7.2.300.0100.00716.80
7.2.290.0040.01216.60
7.2.60.0080.00316.81
7.2.00.0030.00719.54
7.1.200.0090.00915.94
7.1.100.0030.00718.25
7.1.70.0030.01017.18
7.1.60.0170.00719.43
7.1.50.0100.01017.16
7.1.00.0000.07722.36
7.0.200.0120.00614.90
7.0.60.0130.06320.01
7.0.50.0070.08017.93
7.0.40.0030.04320.30
7.0.30.0170.04020.09
7.0.20.0170.04020.20
7.0.10.0170.05720.33
7.0.00.0130.08020.18
5.6.280.0000.07021.07
5.6.210.0070.06320.56
5.6.200.0070.05718.19
5.6.190.0070.04320.41
5.6.180.0130.05020.32
5.6.170.0170.05020.45
5.6.160.0070.05020.54
5.6.150.0030.06018.22
5.6.140.0130.06718.16
5.6.130.0070.07718.07
5.6.120.0000.04321.11
5.6.110.0170.08021.08
5.6.100.0100.07021.10
5.6.90.0130.04720.96
5.6.80.0030.08320.50
5.5.350.0470.07020.32
5.5.340.0000.04317.98
5.5.330.0070.04020.12
5.5.320.0100.06020.31
5.5.310.0200.05720.13
5.5.300.0070.06317.96
5.5.290.0000.04317.98
5.5.280.0030.05720.77
5.5.270.0030.05020.95
5.5.260.0030.06720.86
5.5.250.0100.05020.68
5.5.240.0030.05020.27

preferences:
43.27 ms | 401 KiB | 5 Q