3v4l.org

run code in 300+ PHP versions simultaneously
<?php $_POST = ['VAL0' => 'TESTING', 'UNIT0' => '99', 'VAL1' => 'TESTING1', 'UNITS1' => '88']; $bulkProducts = array(); foreach ($_POST as $key => $value) { if (strpos($key, "VAL")===0) { $val= $value; } if (strpos($key, "UNIT")===0) { $newunits= $value; } if (isset($val,$newunits)) { $products = array(); $products = array( 'VAL' => $val, 'UNITS' =>$newunits ); array_push($bulkProducts,$products); } } print_r($bulkProducts);

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.0000.01518.84
8.3.30.0110.00418.85
8.3.20.0050.00320.34
8.3.10.0040.00423.70
8.3.00.0080.00019.79
8.2.170.0100.00722.96
8.2.160.0070.00720.41
8.2.150.0060.00324.18
8.2.140.0050.00324.66
8.2.130.0060.00321.04
8.2.120.0030.00626.35
8.2.110.0070.00321.06
8.2.100.0040.00818.05
8.2.90.0040.00419.23
8.2.80.0040.00417.97
8.2.70.0000.00817.75
8.2.60.0050.00318.05
8.2.50.0030.00518.07
8.2.40.0050.00321.32
8.2.30.0040.00420.50
8.2.20.0040.00417.66
8.2.10.0040.00418.12
8.2.00.0040.00418.12
8.1.270.0090.00018.95
8.1.260.0070.00028.09
8.1.250.0000.00828.09
8.1.240.0030.00623.88
8.1.230.0040.00822.75
8.1.220.0000.00917.74
8.1.210.0090.00018.77
8.1.200.0060.00317.22
8.1.190.0040.00417.57
8.1.180.0030.00618.10
8.1.170.0000.00818.44
8.1.160.0040.00420.83
8.1.150.0030.00518.81
8.1.140.0080.00019.52
8.1.130.0000.00717.75
8.1.120.0000.00717.39
8.1.110.0000.00717.32
8.1.100.0030.00317.39
8.1.90.0040.00417.43
8.1.80.0030.00517.40
8.1.70.0050.00217.41
8.1.60.0040.00417.52
8.1.50.0000.00817.42
8.1.40.0090.00017.55
8.1.30.0000.00917.70
8.1.20.0030.00517.66
8.1.10.0040.00417.47
8.1.00.0000.00817.56
8.0.300.0040.00418.77
8.0.290.0000.00816.63
8.0.280.0070.00018.45
8.0.270.0050.00217.20
8.0.260.0030.00317.24
8.0.250.0080.00016.96
8.0.240.0000.00816.96
8.0.230.0030.00316.86
8.0.220.0030.00316.81
8.0.210.0000.00716.91
8.0.200.0060.00016.94
8.0.190.0040.00416.99
8.0.180.0070.00016.87
8.0.170.0040.00416.77
8.0.160.0040.00416.95
8.0.150.0070.00016.79
8.0.140.0040.00316.75
8.0.130.0000.00613.38
8.0.120.0080.00016.89
8.0.110.0040.00416.80
8.0.100.0060.00316.89
8.0.90.0040.00417.00
8.0.80.0080.01616.81
8.0.70.0040.00416.89
8.0.60.0030.00516.88
8.0.50.0000.00716.75
8.0.30.0080.01117.06
8.0.20.0090.01017.40
8.0.10.0040.00416.98
8.0.00.0090.00916.80
7.4.330.0030.00316.67
7.4.320.0000.00716.49
7.4.300.0060.00016.60
7.4.290.0080.00016.59
7.4.280.0040.00416.49
7.4.270.0020.00516.61
7.4.260.0000.00716.46
7.4.250.0040.00416.46
7.4.240.0060.00116.62
7.4.230.0040.00416.48
7.4.220.0090.01016.36
7.4.210.0030.01716.54
7.4.200.0070.00016.67
7.4.160.0110.01116.47
7.4.150.0070.01017.40
7.4.140.0140.00617.86
7.4.130.0080.01016.52
7.4.120.0090.00816.46
7.4.110.0090.00916.63
7.4.100.0080.00916.55
7.4.90.0130.01016.59
7.4.80.0060.01019.39
7.4.70.0060.01316.61
7.4.60.0110.00416.47
7.4.50.0070.00716.37
7.4.40.0070.01016.59
7.4.30.0100.01016.44
7.4.00.0110.00714.77
7.3.330.0000.00513.25
7.3.320.0060.00013.01
7.3.310.0050.00316.16
7.3.300.0000.00616.28
7.3.290.0080.00716.26
7.3.280.0060.00916.26
7.3.270.0140.00717.40
7.3.260.0110.00716.72
7.3.250.0090.00916.60
7.3.240.0120.00516.52
7.3.230.0060.01116.52
7.3.210.0130.00716.55
7.3.200.0100.00616.20
7.3.190.0060.01016.35
7.3.180.0100.00716.36
7.3.170.0130.00916.52
7.3.160.0140.00716.28
7.3.120.0110.00814.98
7.3.110.0090.00914.88
7.3.100.0050.01314.97
7.3.90.0080.00614.68
7.3.80.0070.00714.89
7.3.70.0040.00914.86
7.3.60.0030.01014.71
7.3.50.0040.01014.79
7.3.40.0060.01014.82
7.3.30.0070.00514.81
7.3.20.0050.01016.60
7.3.10.0050.00816.77
7.3.00.0040.00616.74
7.2.330.0180.00016.52
7.2.320.0080.01516.70
7.2.310.0120.00616.71
7.2.300.0140.00316.43
7.2.290.0110.00616.54
7.2.250.0090.00815.12
7.2.240.0160.00315.10
7.2.230.0080.00915.15
7.2.220.0090.00715.18
7.2.210.0110.00415.07
7.2.200.0050.01015.01
7.2.190.0070.00715.23
7.2.180.0070.00915.05
7.2.170.0080.01014.82
7.2.00.0030.00919.45
7.1.330.0050.00915.74
7.1.320.0030.01115.78
7.1.310.0100.00515.77
7.1.300.0020.01115.78
7.1.290.0080.00515.60
7.1.280.0090.00915.67
7.1.270.0050.00815.68
7.1.260.0030.00615.88
7.1.100.0040.00818.05
7.1.70.0040.00417.26
7.1.60.0100.01419.50
7.1.50.0110.01116.71
7.1.00.0000.08022.34
7.0.200.0000.00916.67
7.0.60.0230.05019.94
7.0.50.0100.06317.83
7.0.40.0030.08320.04
7.0.30.0270.08720.15
7.0.20.0200.03320.19
7.0.10.0030.04720.21
7.0.00.0070.06720.09
5.6.280.0000.03321.02
5.6.210.0070.06320.75
5.6.200.0130.06718.25
5.6.190.0100.08320.64
5.6.180.0470.04720.49
5.6.170.0230.03720.48
5.6.160.0100.04020.57
5.6.150.0070.03718.11
5.6.140.0070.08318.17
5.6.130.0030.05718.24
5.6.120.0130.07721.00
5.6.110.0100.08020.96
5.6.100.0030.07720.88
5.6.90.0170.06721.09
5.6.80.0030.07720.53
5.5.350.0100.07720.28
5.5.340.0100.06018.09
5.5.330.0070.04720.37
5.5.320.0100.06720.34
5.5.310.0300.04020.33
5.5.300.0000.06018.04
5.5.290.0070.09018.00
5.5.280.0170.07320.77
5.5.270.0000.09720.67
5.5.260.0170.07720.77
5.5.250.0200.06020.58
5.5.240.0230.07020.24

preferences:
54.32 ms | 400 KiB | 5 Q