3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = array("purchase_order_details_id"=>array( 0=>"POD1", 1=>"POD1", 2=>"POD2", ), "quantity_received"=>array( 0=>5, 1=>10, 2=>20 ) ); $pods = array_unique($arr["purchase_order_details_id"]); Foreach($pods as $pod){ $PO = array_intersect($arr["purchase_order_details_id"], [$pod]); $qt = array_intersect_key($arr["quantity_received"], $PO); $new[$pod] = ["purchase_order_details_id" => $PO, "quantity_received" => $qt]; } Var_dump($new); extract($new);

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.0070.01416.75
8.3.50.0080.00617.93
8.3.40.0150.00418.54
8.3.30.0140.00018.59
8.3.20.0060.00319.03
8.3.10.0030.00620.95
8.3.00.0050.00323.48
8.2.180.0100.00725.92
8.2.170.0140.00418.91
8.2.160.0170.00322.96
8.2.150.0030.00625.66
8.2.140.0040.00424.66
8.2.130.0040.00419.95
8.2.120.0070.00026.35
8.2.110.0040.00721.07
8.2.100.0120.00318.03
8.2.90.0000.00818.03
8.2.80.0040.00419.28
8.2.70.0000.00817.93
8.2.60.0040.00417.93
8.2.50.0000.00818.10
8.2.40.0080.00019.48
8.2.30.0050.00219.38
8.2.20.0000.00818.05
8.2.10.0000.00718.09
8.2.00.0030.00319.45
8.1.280.0070.01125.92
8.1.270.0080.00023.96
8.1.260.0080.00026.35
8.1.250.0000.00828.09
8.1.240.0070.00322.18
8.1.230.0070.00320.96
8.1.220.0030.00517.74
8.1.210.0040.00418.77
8.1.200.0070.00417.42
8.1.190.0030.00517.25
8.1.180.0000.00918.10
8.1.170.0120.00318.47
8.1.160.0000.00718.94
8.1.150.0000.00718.88
8.1.140.0040.00417.61
8.1.130.0000.00719.02
8.1.120.0000.00717.35
8.1.110.0040.00417.45
8.1.100.0000.00717.49
8.1.90.0040.00717.48
8.1.80.0000.00717.46
8.1.70.0030.00717.30
8.1.60.0040.00417.50
8.1.50.0080.00017.54
8.1.40.0000.00817.57
8.1.30.0070.00417.55
8.1.20.0030.00617.56
8.1.10.0060.00317.43
8.1.00.0040.00417.56
8.0.300.0040.00420.23
8.0.290.0000.00816.75
8.0.280.0000.00718.44
8.0.270.0050.00317.17
8.0.260.0030.00617.30
8.0.250.0070.00316.98
8.0.240.0030.00616.95
8.0.230.0000.00816.84
8.0.220.0070.00016.80
8.0.210.0030.00316.75
8.0.200.0000.00716.93
8.0.190.0080.00016.86
8.0.180.0000.00816.93
8.0.170.0050.00316.80
8.0.160.0040.00416.89
8.0.150.0050.00516.92
8.0.140.0040.00416.76
8.0.130.0030.00313.28
8.0.120.0080.00016.82
8.0.110.0020.00516.80
8.0.100.0000.00716.78
8.0.90.0040.00416.85
8.0.80.0110.00816.89
8.0.70.0000.00816.71
8.0.60.0000.00816.85
8.0.50.0050.00316.78
8.0.30.0090.00816.97
8.0.20.0130.00717.40
8.0.10.0040.00416.90
8.0.00.0170.00316.82
7.4.330.0000.00415.55
7.4.320.0000.00616.60
7.4.300.0000.00716.62
7.4.290.0050.00216.50
7.4.280.0080.00016.51
7.4.270.0000.00716.52
7.4.260.0030.00416.46
7.4.250.0030.00316.48
7.4.240.0070.00016.59
7.4.230.0030.00316.43
7.4.220.0050.00316.39
7.4.210.0070.01016.58
7.4.200.0040.00416.50
7.4.160.0090.00816.50
7.4.140.0140.00917.86
7.4.130.0070.01116.46
7.4.120.0120.00816.54
7.4.110.0070.01116.38
7.4.100.0070.01016.46
7.4.90.0090.01416.66
7.4.80.0120.00619.39
7.4.70.0070.01116.64
7.4.60.0160.00016.26
7.4.50.0030.01316.46
7.4.40.0160.00716.44
7.4.10.0100.01014.89
7.4.00.0090.00615.13
7.3.330.0000.00513.25
7.3.320.0000.00613.07
7.3.310.0040.00416.40
7.3.300.0000.00716.36
7.3.290.0040.00416.36
7.3.280.0090.00816.35
7.3.260.0140.00516.43
7.3.240.0130.00516.36
7.3.230.0000.01616.34
7.3.210.0100.00716.39
7.3.200.0140.00416.64
7.3.190.0070.00716.55
7.3.180.0030.01416.57
7.3.170.0110.00616.56
7.3.160.0100.00716.23
7.3.130.0140.00714.48
7.3.120.0060.01214.87
7.3.110.0100.01014.81
7.3.100.0030.00914.54
7.3.90.0030.01014.56
7.3.80.0060.00914.49
7.3.70.0040.00814.59
7.3.60.0130.00014.92
7.3.50.0100.00714.91
7.3.40.0070.00314.50
7.3.30.0080.00414.74
7.3.20.0040.00816.76
7.3.10.0060.00916.63
7.3.00.0080.00616.77
7.2.330.0130.00616.67
7.2.320.0130.00316.68
7.2.310.0060.01216.86
7.2.300.0100.00716.43
7.2.290.0120.01216.48
7.2.260.0070.01015.08
7.2.250.0030.01314.94
7.2.240.0070.00715.12
7.2.230.0130.00315.03
7.2.220.0030.00915.33
7.2.210.0060.00914.96
7.2.200.0090.00615.20
7.2.190.0070.00715.17
7.2.180.0000.00914.97
7.2.170.0000.01315.18
7.2.160.0060.00915.11
7.2.150.0070.00716.93
7.2.140.0030.01016.95
7.2.130.0080.00617.09
7.2.120.0090.00116.98
7.2.110.0060.00916.77
7.2.100.0080.00517.01
7.2.90.0050.01117.04
7.2.80.0070.00517.07
7.2.70.0070.00716.78
7.2.60.0970.00516.26
7.2.50.0960.01116.34
7.2.40.1140.00916.45
7.2.30.0960.00716.59
7.2.20.0970.00916.41
7.2.10.1070.00616.27
7.2.00.0880.00916.51
7.1.330.0120.00415.99
7.1.320.0000.01415.98
7.1.310.0030.00715.93
7.1.300.0070.00715.80
7.1.290.0070.00315.55
7.1.280.0080.00416.01
7.1.270.0040.00415.95
7.1.260.0060.00915.76
7.1.250.0060.00515.74
7.1.240.0040.00815.80
7.1.230.0100.00715.78
7.1.220.0090.00015.89
7.1.210.0100.00315.83
7.1.200.0080.00315.79
7.1.190.0030.01315.54
7.1.180.0000.01115.86
7.1.170.1590.00314.91
7.1.160.1430.00716.40
7.1.150.1650.00716.50
7.1.140.1590.00616.40
7.1.130.1680.00816.21
7.1.120.1170.01016.24
7.1.110.1410.00716.18
7.1.100.1850.01016.03
7.1.90.1430.01016.13
7.1.80.1720.00816.04
7.1.70.1900.01015.60
7.1.60.1940.00924.33
7.1.50.2000.01324.39
7.1.40.2400.01224.20
7.1.30.2150.01424.19
7.1.20.1980.01224.16
7.1.10.1960.00915.33
7.1.00.1910.00815.05
7.0.330.0030.00915.38
7.0.320.0060.00615.39
7.0.310.0000.01315.45
7.0.300.0040.01115.35
7.0.290.0040.01115.29
7.0.280.0000.00915.33
7.0.270.0040.00815.14
7.0.260.0000.01515.21
7.0.250.0110.00415.29
7.0.240.0070.00715.57
7.0.230.0120.00615.45
7.0.220.0040.00915.55
7.0.210.0060.01015.51
7.0.200.0040.00815.29
7.0.190.0060.00315.47
7.0.180.0040.01115.54
7.0.170.0090.00315.16
7.0.160.0030.01015.47
7.0.150.0080.00315.50
7.0.140.0000.01115.34
7.0.130.0070.00715.45
7.0.120.0080.00015.39
7.0.110.0070.00715.61
7.0.100.0060.01015.05
7.0.90.0030.01015.36
7.0.80.0090.00315.26
7.0.70.0030.01015.54
7.0.60.0040.01215.37
7.0.50.0040.00815.30
7.0.40.0030.01213.53
7.0.30.0060.00913.52
7.0.20.0000.01513.52
7.0.10.0040.01013.56
7.0.00.0070.00713.46
5.6.400.0100.00314.53
5.6.390.0060.00614.71
5.6.380.0130.00314.10
5.6.370.0040.01214.46
5.6.360.0090.00614.52
5.6.350.0030.01214.62
5.6.340.0040.00714.41
5.6.330.0090.00314.55
5.6.320.0060.01314.76
5.6.310.0130.00514.73
5.6.300.0000.01314.05
5.6.290.0060.00614.15
5.6.280.0030.00614.32
5.6.270.0060.01014.25
5.6.260.0030.01014.29
5.6.250.0090.00614.67
5.6.240.0030.00914.37
5.6.230.0040.00814.56
5.6.220.0100.00014.47
5.6.210.0090.00614.45
5.6.200.0070.01014.42
5.6.190.0060.00914.39
5.6.180.0100.00614.28
5.6.170.0060.00914.59
5.6.160.0060.00314.63
5.6.150.0080.00414.41
5.6.140.0030.00914.64
5.6.130.0000.01614.45
5.6.120.0040.01014.36
5.6.110.0120.00314.59
5.6.100.0030.01114.59
5.6.90.0040.00814.52
5.6.80.0080.00814.41
5.6.70.0040.00514.42
5.6.60.0070.00714.21
5.6.50.0030.01014.29
5.6.40.0000.00914.44
5.6.30.0030.00714.36
5.6.20.0080.00414.25
5.6.10.0070.00714.45
5.6.00.0030.00614.61

preferences:
74.28 ms | 400 KiB | 5 Q