3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = <<< END 2x egg 2 - carrot cabbage 1x potato 3x - --()(--=) yams 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.40.0040.01118.96
8.3.30.0070.00719.16
8.3.20.0070.00020.29
8.3.10.0040.00421.82
8.3.00.0100.00019.03
8.2.170.0110.00422.96
8.2.160.0100.00322.38
8.2.150.0080.00024.18
8.2.140.0080.00024.66
8.2.130.0080.00026.16
8.2.120.0040.00419.83
8.2.110.0060.00321.18
8.2.100.0120.00017.96
8.2.90.0040.00419.35
8.2.80.0030.00617.97
8.2.70.0030.00517.75
8.2.60.0000.00917.93
8.2.50.0000.00818.07
8.2.40.0040.00418.34
8.2.30.0040.00418.07
8.2.20.0040.00417.92
8.2.10.0000.00818.16
8.2.00.0040.00417.99
8.1.270.0090.00020.82
8.1.260.0000.00826.35
8.1.250.0040.00428.09
8.1.240.0070.00423.91
8.1.230.0110.00022.72
8.1.220.0050.00317.74
8.1.210.0060.00318.77
8.1.200.0040.00417.47
8.1.190.0000.00917.35
8.1.180.0030.00518.10
8.1.170.0040.00420.30
8.1.160.0000.00821.97
8.1.150.0000.00818.80
8.1.140.0000.00717.54
8.1.130.0030.00517.92
8.1.120.0040.00417.65
8.1.110.0050.00217.59
8.1.100.0000.00817.63
8.1.90.0000.00817.64
8.1.80.0040.00417.59
8.1.70.0030.00317.68
8.1.60.0040.00417.79
8.1.50.0060.00317.59
8.1.40.0030.00517.73
8.1.30.0050.00317.76
8.1.20.0030.00617.77
8.1.10.0040.00417.55
8.1.00.0000.00817.73
8.0.300.0070.00018.77
8.0.290.0070.00016.88
8.0.280.0070.00018.46
8.0.270.0040.00417.34
8.0.260.0030.00317.29
8.0.250.0000.00717.19
8.0.240.0040.00417.14
8.0.230.0070.00017.08
8.0.220.0040.00417.00
8.0.210.0050.00317.02
8.0.200.0030.00317.06
8.0.190.0060.00317.01
8.0.180.0040.00817.15
8.0.170.0060.00317.14
8.0.160.0040.00417.09
8.0.150.0000.00717.12
8.0.140.0040.00417.08
8.0.130.0000.00713.56
8.0.120.0050.00316.98
8.0.110.0040.00417.11
8.0.100.0040.00417.05
8.0.90.0040.00417.12
8.0.80.0130.00917.11
8.0.70.0040.00417.06
8.0.60.0000.00717.14
8.0.50.0040.00417.18
8.0.30.0180.00617.06
8.0.20.0130.01117.49
8.0.10.0000.00717.20
8.0.00.0140.00316.94
7.4.330.0030.00315.15
7.4.320.0040.00416.68
7.4.300.0060.00016.82
7.4.290.0040.00416.86
7.4.280.0040.00416.71
7.4.270.0000.00716.66
7.4.260.0000.00716.83
7.4.250.0080.00016.63
7.4.240.0020.00516.79
7.4.230.0070.00016.53
7.4.220.0110.00716.79
7.4.210.0010.01816.80
7.4.200.0070.00016.72
7.4.160.0030.02016.73
7.4.150.0090.00917.40
7.4.140.0090.01017.86
7.4.130.0130.00816.89
7.4.120.0120.00816.75
7.4.110.0130.00616.78
7.4.100.0160.01016.90
7.4.90.0120.00616.53
7.4.80.0060.01416.91
7.4.70.0150.00916.66
7.4.60.0100.00716.54
7.4.50.0030.00516.75
7.4.40.0090.01316.70
7.4.30.0120.00616.89
7.4.00.0100.00715.22
7.3.330.0030.00313.38
7.3.320.0090.00513.31
7.3.310.0070.00016.70
7.3.300.0000.00716.44
7.3.290.0040.00416.35
7.3.280.0100.01016.47
7.3.270.0110.01117.40
7.3.260.0110.00916.71
7.3.250.0140.00716.73
7.3.240.0200.00316.50
7.3.230.0090.00916.62
7.3.210.0130.00416.70
7.3.200.0110.00919.39
7.3.190.0110.00516.84
7.3.180.0000.01716.84
7.3.170.0070.01716.89
7.3.160.0120.00616.70
7.2.330.0120.00916.89
7.2.320.0130.00516.94
7.2.310.0110.00616.89
7.2.300.0040.01416.70
7.2.290.0000.01816.96
7.2.110.0040.01217.00
7.2.60.0070.00717.05
7.2.00.0130.00719.66
7.1.200.0000.01416.07
7.1.100.0000.01018.20
7.1.70.0100.00317.43
7.1.60.0070.01619.46
7.1.50.0100.00717.09
7.1.00.0000.08022.32
7.0.200.0060.00315.02
7.0.140.0030.07322.07
7.0.60.0130.08019.98
7.0.50.0200.07017.84
7.0.40.0130.03320.02
7.0.30.0330.05020.22
7.0.20.0370.07320.35
7.0.10.0100.07720.18
7.0.00.0070.05020.34
5.6.280.0030.07321.07
5.6.210.0070.08020.61
5.6.200.0000.04318.22
5.6.190.0030.04320.61
5.6.180.0300.05320.56
5.6.170.0230.05720.52
5.6.160.0070.03720.49
5.6.150.0070.05318.08
5.6.140.0030.06718.20
5.6.130.0100.05018.18
5.6.120.0030.05021.05
5.6.110.0170.06721.00
5.6.100.0130.07721.00
5.6.90.0100.07021.02
5.6.80.0170.07020.45
5.5.350.0200.06320.42
5.5.340.0130.06317.94
5.5.330.0030.04320.01
5.5.320.0070.08320.28
5.5.310.0170.04020.30
5.5.300.0130.06317.91
5.5.290.0070.08017.95
5.5.280.0070.09020.77
5.5.270.0100.03720.88
5.5.260.0070.05020.67
5.5.250.0100.07720.61
5.5.240.0130.07020.28
5.4.450.0200.05719.46
5.4.440.0870.04719.34
5.4.430.1030.06719.60
5.4.420.0970.05319.61
5.4.410.0170.07719.51
5.4.400.0200.04319.32
5.4.390.0270.05018.66
5.4.380.0170.06018.53
5.4.370.0200.05318.68
5.4.360.0270.05018.59
5.4.350.0230.05318.53
5.4.340.0170.05718.74
5.4.320.0230.05718.64
5.4.310.0200.05318.62
5.4.300.0300.05318.71
5.4.290.0330.05018.52
5.4.280.0330.05018.45
5.4.270.0230.05718.68
5.4.260.0330.04318.45
5.4.250.0270.08318.57
5.4.240.0370.07318.71
5.4.230.0430.06318.64
5.4.220.0170.06318.68
5.4.210.0370.06718.68
5.4.200.0300.04716.56
5.4.190.0130.06018.67
5.4.180.0270.06018.45
5.4.170.0370.05318.76
5.4.160.0270.04718.50
5.4.150.0270.04718.69
5.4.140.0230.05016.18
5.4.130.0100.06016.32
5.4.120.0270.04316.26
5.4.110.0200.05016.35
5.4.100.0230.06316.05
5.4.90.0130.06016.08
5.4.80.0230.04716.15
5.4.70.0300.04716.04
5.4.60.0300.05316.10
5.4.50.0270.04716.17
5.4.40.0370.04716.27
5.4.30.0200.05316.19
5.4.20.0270.05016.13
5.4.10.0300.04716.18
5.4.00.0230.05015.54
5.3.290.0300.05014.63
5.3.280.0230.05314.63
5.3.270.0270.05014.60
5.3.260.0330.04714.68
5.3.250.0200.05714.64
5.3.240.0170.05314.66
5.3.230.0270.04714.53
5.3.220.0200.05314.53
5.3.210.0270.05014.48
5.3.200.0230.05014.66
5.3.190.0230.05314.48
5.3.180.0230.06014.63
5.3.170.0230.04714.56
5.3.160.0200.05014.52
5.3.150.0200.05014.61
5.3.140.0230.05314.58
5.3.130.0200.06014.61
5.3.120.0300.05314.70
5.3.110.0230.05314.54
5.3.100.0170.05714.18
5.3.90.0330.04013.97
5.3.80.0230.05014.01
5.3.70.0300.04313.93
5.3.60.0230.05714.02
5.3.50.0230.05014.09
5.3.40.0200.05313.96
5.3.30.0330.04713.93
5.3.20.0270.04313.84
5.3.10.0200.05013.56
5.3.00.0270.06013.55
5.2.170.0200.04011.08
5.2.160.0200.03711.13
5.2.150.0200.04311.07
5.2.140.0170.04711.18
5.2.130.0270.04311.09
5.2.120.0300.03011.05
5.2.110.0170.04711.14
5.2.100.0170.04311.07
5.2.90.0200.04311.16
5.2.80.0170.04011.04
5.2.70.0130.04311.12
5.2.60.0200.04011.12
5.2.50.0170.04310.93
5.2.40.0100.04311.21
5.2.30.0130.05011.02
5.2.20.0170.03710.89
5.2.10.0070.04710.96
5.2.00.0100.04710.68
5.1.60.0270.0209.98
5.1.50.0170.03010.02
5.1.40.0170.03010.11
5.1.30.0100.04010.31
5.1.20.0130.03710.41
5.1.10.0130.03710.18
5.1.00.0230.03010.20
5.0.50.0130.0378.66
5.0.40.0130.0378.48
5.0.30.0130.0408.22
5.0.20.0130.0238.18
5.0.10.0030.0338.21
5.0.00.0070.0478.37
4.4.90.0070.0235.92
4.4.80.0100.0205.93
4.4.70.0130.0205.92
4.4.60.0170.0135.88
4.4.50.0100.0205.94
4.4.40.0070.0375.93
4.4.30.0100.0205.90
4.4.20.0070.0235.93
4.4.10.0070.0235.99
4.4.00.0070.0375.94
4.3.110.0030.0275.80
4.3.100.0070.0275.81
4.3.90.0100.0205.78
4.3.80.0070.0335.82
4.3.70.0030.0275.83
4.3.60.0100.0175.80
4.3.50.0070.0235.85
4.3.40.0100.0305.75
4.3.30.0100.0174.58
4.3.20.0070.0204.55
4.3.10.0030.0234.49
4.3.00.0300.02314.42

preferences:
55.81 ms | 400 KiB | 5 Q