3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = <<< END 2x egg 2 - carrot cabbage 1x potato END; $lines = explode("\n", $str); $ingredients = Array(); foreach($lines as $line) { $matches = Array(); if(!preg_match("^(\d+)(\S+)$", $line, $matches)) array_push($ingredients, Array(1, $line)); else array_push($ingredients, Array(intval($matches[1]), $matches[2])); } var_dump($ingredients);

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.0040.01118.68
8.3.50.0130.00822.04
8.3.40.0090.01218.75
8.3.30.0030.01019.09
8.3.20.0000.00720.20
8.3.10.0040.00421.70
8.3.00.0030.00719.28
8.2.180.0090.00918.42
8.2.170.0030.01222.96
8.2.160.0110.00322.03
8.2.150.0000.00824.18
8.2.140.0080.00024.66
8.2.130.0070.00026.16
8.2.120.0080.00019.89
8.2.110.0030.00620.12
8.2.100.0060.00617.88
8.2.90.0080.00019.21
8.2.80.0040.00417.97
8.2.70.0060.00317.50
8.2.60.0080.00017.93
8.2.50.0040.00418.07
8.2.40.0000.00818.09
8.2.30.0040.00417.95
8.2.20.0000.00817.68
8.2.10.0000.00818.14
8.2.00.0000.00717.79
8.1.280.0120.00325.92
8.1.270.0090.00020.62
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0080.00423.95
8.1.230.0000.01119.08
8.1.220.0000.00717.74
8.1.210.0090.00018.77
8.1.200.0030.00617.38
8.1.190.0050.00317.23
8.1.180.0000.00818.10
8.1.170.0030.00620.43
8.1.160.0000.00721.94
8.1.150.0040.00418.89
8.1.140.0050.00317.33
8.1.130.0030.00317.89
8.1.120.0000.00717.38
8.1.110.0050.00317.45
8.1.100.0040.00417.51
8.1.90.0030.00517.46
8.1.80.0040.00417.36
8.1.70.0000.00817.49
8.1.60.0050.00317.59
8.1.50.0080.00017.43
8.1.40.0040.00417.51
8.1.30.0000.00917.62
8.1.20.0030.00617.68
8.1.10.0000.00717.36
8.1.00.0000.00817.42
8.0.300.0000.00718.77
8.0.290.0040.00416.75
8.0.280.0030.00318.36
8.0.270.0000.00717.33
8.0.260.0000.00617.29
8.0.250.0030.00316.88
8.0.240.0030.00316.98
8.0.230.0000.00717.02
8.0.220.0000.00716.92
8.0.210.0000.00716.96
8.0.200.0030.00317.01
8.0.190.0040.00416.89
8.0.180.0040.00416.81
8.0.170.0050.00317.04
8.0.160.0070.00017.00
8.0.150.0000.00716.90
8.0.140.0000.00716.77
8.0.130.0030.00613.34
8.0.120.0040.00416.91
8.0.110.0040.00416.95
8.0.100.0040.00416.97
8.0.90.0040.00417.03
8.0.80.0030.01616.89
8.0.70.0000.00816.86
8.0.60.0030.00316.97
8.0.50.0070.00016.75
8.0.30.0110.01317.30
8.0.20.0160.00817.40
8.0.10.0050.00317.02
8.0.00.0130.00716.95
7.4.330.0050.00015.03
7.4.320.0030.00316.49
7.4.300.0000.00616.58
7.4.290.0040.00416.53
7.4.280.0040.00416.50
7.4.270.0070.00016.53
7.4.260.0030.00316.47
7.4.250.0040.00416.38
7.4.240.0000.00716.53
7.4.230.0050.00316.34
7.4.220.0090.00916.50
7.4.210.0080.00716.60
7.4.200.0000.00716.44
7.4.160.0160.00816.52
7.4.150.0120.00617.40
7.4.140.0100.00817.86
7.4.130.0130.00816.63
7.4.120.0060.01316.47
7.4.110.0120.00616.59
7.4.100.0110.00616.54
7.4.90.0090.00916.60
7.4.80.0070.01416.57
7.4.70.0060.01216.52
7.4.60.0050.01116.59
7.4.50.0030.00516.39
7.4.40.0180.00616.45
7.4.30.0130.00516.54
7.4.00.0030.01014.95
7.3.330.0000.00513.09
7.3.320.0110.00313.07
7.3.310.0030.00316.37
7.3.300.0000.00816.24
7.3.290.0070.00016.31
7.3.280.0100.00916.32
7.3.270.0130.00917.40
7.3.260.0080.01016.38
7.3.250.0160.00116.34
7.3.240.0070.01116.41
7.3.230.0030.01516.39
7.3.210.0110.00716.29
7.3.200.0070.01419.39
7.3.190.0090.00716.55
7.3.180.0030.01316.35
7.3.170.0110.00816.38
7.3.160.0060.01316.67
7.3.120.0090.00615.01
7.3.110.0120.00614.65
7.3.100.0070.00715.00
7.3.90.0090.00614.68
7.3.80.0030.01014.66
7.3.70.0060.01014.88
7.3.60.0110.00314.69
7.3.50.0060.00914.88
7.3.40.0060.00714.72
7.3.30.0030.01314.89
7.3.20.0090.00616.69
7.3.10.0080.00616.65
7.3.00.0080.00916.66
7.2.330.0130.00616.54
7.2.320.0100.00716.53
7.2.310.0120.00616.59
7.2.300.0140.00716.57
7.2.290.0100.00616.46
7.2.240.0030.01014.91
7.2.230.0070.01015.15
7.2.220.0060.00914.90
7.2.210.0100.00714.88
7.2.200.0080.00814.91
7.2.190.0070.01115.04
7.2.180.0090.00014.80
7.2.170.0100.00314.98
7.2.160.0090.00615.01
7.2.150.0060.00916.92
7.2.140.0090.00616.79
7.2.130.0080.00816.94
7.2.120.0020.01016.91
7.2.110.0060.00816.96
7.2.100.0040.01316.95
7.2.90.0040.00917.14
7.2.80.0040.00916.88
7.2.70.0040.01016.98
7.2.60.0090.00716.81
7.2.50.0060.00716.85
7.2.40.0060.00716.85
7.2.30.0030.01116.93
7.2.20.0050.01016.89
7.2.10.0080.00616.94
7.2.00.0040.01017.44
7.1.330.0030.01015.81
7.1.320.0090.00915.70
7.1.310.0070.00715.81
7.1.300.0110.00315.76
7.1.290.0030.01015.74
7.1.280.0030.01215.53
7.1.270.0070.00715.77
7.1.260.0030.01415.73
7.1.250.0080.00715.74
7.1.200.0070.00315.61
7.1.100.0030.00818.05
7.1.70.0080.00017.08
7.1.60.0070.01319.46
7.1.50.0040.00716.90
7.1.00.0030.07022.45
7.0.200.0030.00714.70
7.0.140.0030.06322.12
7.0.60.0130.06319.92
7.0.50.0100.03317.91
7.0.40.0000.04719.90
7.0.30.0170.04720.18
7.0.20.0270.07720.12
7.0.10.0000.06720.00
7.0.00.0100.08320.16
5.6.280.0000.08020.80
5.6.210.0100.05720.62
5.6.200.0100.03718.22
5.6.190.0100.03720.49
5.6.180.0430.05320.27
5.6.170.0230.07020.42
5.6.160.0070.05320.48
5.6.150.0070.08018.08
5.6.140.0100.03318.22
5.6.130.0030.04018.07
5.6.120.0070.08720.99
5.6.110.0130.06720.98
5.6.100.0030.04721.02
5.6.90.0100.06720.98
5.6.80.0030.06020.50
5.5.350.0270.08020.33
5.5.340.0130.04017.98
5.5.330.0070.05020.21
5.5.320.0070.08020.13
5.5.310.0130.04320.34
5.5.300.0000.04318.00
5.5.290.0070.08018.00
5.5.280.0100.04720.87
5.5.270.0000.08720.84
5.5.260.0130.03720.67
5.5.250.0000.08720.62
5.5.240.0170.07720.07
5.4.450.0070.06719.41
5.4.440.0830.05319.13
5.4.430.0900.05719.57
5.4.420.0970.05319.40
5.4.410.0930.05319.19
5.4.400.1070.04319.00
5.4.390.0300.04318.53
5.4.380.0170.06018.49
5.4.370.0230.04718.52
5.4.360.0270.04318.52
5.4.350.0130.06018.66
5.4.340.0200.05318.60
5.4.320.0170.05718.57
5.4.310.0200.05318.49
5.4.300.0270.04318.71
5.4.290.0270.04718.56
5.4.280.0230.05018.47
5.4.270.0270.04318.68
5.4.260.0200.05318.45
5.4.250.0130.06018.70
5.4.240.0200.05318.48
5.4.230.0200.05318.68
5.4.220.0170.06018.67
5.4.210.0130.06018.45
5.4.200.0230.05016.50
5.4.190.0330.04718.70
5.4.180.0330.04718.59
5.4.170.0200.05718.51
5.4.160.0270.04718.63
5.4.150.0270.05018.60
5.4.140.0200.05316.28
5.4.130.0200.05316.08
5.4.120.0330.04016.22
5.4.110.0170.05316.30
5.4.100.0230.05016.17
5.4.90.0200.05316.04
5.4.80.0200.05016.02
5.4.70.0200.05316.14
5.4.60.0230.05316.08
5.4.50.0270.04316.14
5.4.40.0200.05316.04
5.4.30.0200.05016.04
5.4.20.0070.06716.12
5.4.10.0200.05316.21
5.4.00.0200.05715.54
5.3.290.0300.05014.59
5.3.280.0200.05314.58
5.3.270.0270.05014.67
5.3.260.0300.05014.50
5.3.250.0230.05714.61
5.3.240.0230.05314.65
5.3.230.0270.05014.50
5.3.220.0200.05314.50
5.3.210.0300.04714.46
5.3.200.0170.05714.56
5.3.190.0170.05714.65
5.3.180.0270.05014.52
5.3.170.0270.05014.65
5.3.160.0270.04714.61
5.3.150.0270.04714.48
5.3.140.0230.05014.45
5.3.130.0200.06314.57
5.3.120.0170.05714.47
5.3.110.0270.05314.52
5.3.100.0200.05714.02
5.3.90.0200.05714.13
5.3.80.0170.05313.93
5.3.70.0200.06014.00
5.3.60.0070.07313.93
5.3.50.0300.04713.88
5.3.40.0170.06713.91
5.3.30.0430.04713.84
5.3.20.0400.05313.67
5.3.10.0270.05013.65
5.3.00.0330.04013.55
5.2.170.0200.05011.28
5.2.160.0230.05311.15
5.2.150.0430.05711.11
5.2.140.0370.05311.19
5.2.130.0370.04311.05
5.2.120.0370.02711.07
5.2.110.0270.03711.13
5.2.100.0270.04711.06
5.2.90.0230.03711.26
5.2.80.0270.03711.13
5.2.70.0270.03711.06
5.2.60.0200.04311.08
5.2.50.0200.03711.01
5.2.40.0200.04710.96
5.2.30.0100.05010.91
5.2.20.0200.03711.11
5.2.10.0130.04010.99
5.2.00.0200.04010.73
5.1.60.0170.03310.12
5.1.50.0070.0409.99
5.1.40.0130.0379.98
5.1.30.0230.03310.31
5.1.20.0170.04310.40
5.1.10.0170.05010.14
5.1.00.0130.04310.09
5.0.50.0000.0378.59
5.0.40.0170.0238.47
5.0.30.0030.0508.25
5.0.20.0170.0278.39
5.0.10.0100.0278.22
5.0.00.0270.0338.37
4.4.90.0100.0275.94
4.4.80.0070.0235.88
4.4.70.0030.0235.89
4.4.60.0070.0235.88
4.4.50.0200.0135.88
4.4.40.0070.0375.89
4.4.30.0100.0175.91
4.4.20.0200.0275.93
4.4.10.0100.0205.99
4.4.00.0030.0435.85
4.3.110.0100.0275.82
4.3.100.0130.0205.84
4.3.90.0130.0235.82
4.3.80.0100.0375.82
4.3.70.0200.0105.82
4.3.60.0030.0275.90
4.3.50.0130.0275.80
4.3.40.0070.0405.83
4.3.30.0170.0274.56
4.3.20.0070.0234.58
4.3.10.0030.0274.49
4.3.00.0030.03014.42

preferences:
44.92 ms | 401 KiB | 5 Q