3v4l.org

run code in 300+ PHP versions simultaneously
<?php $myarray = array( 0 => array( "Order" => array("PO" => "TR11214", "OrderID" => 242856952012), "Sales Tax" => array("PO" => "TR11214", "SalesTaxAmount" => 0.00), "Transaction" => array("TransPO" => "TR11211", "TransactionPrice" => 91.17) ), 1 => array( "Order" => array("PO" => "TR11214", "OrderID" => 242856952012), "Sales Tax" => array("PO" => "TR11214", "SalesTaxAmount" => 0.00), "Transaction" => array("TransPO" => "TR11212", "TransactionPrice" => 180.41) ), 2 => array( "Order" => array("PO" => "TR11214", "OrderID" => 242856952012), "Sales Tax" => array("PO" => "TR11214", "SalesTaxAmount" => 0.00), "Transaction" => array("TransPO" => "TR11213", "TransactionPrice" => 209.99) ) ); echo "there are " . count(array_unique(array_column($myarray, 'Order'), SORT_REGULAR)) . "unique Orders\n"; $non_unique_keys = ['Transaction']; $output = array(); foreach (array_keys($myarray[0]) as $key) { if (in_array($key, $non_unique_keys)) { $output[$key] = array_column($myarray, $key); } else { $output[$key] = $myarray[0][$key]; } } print_r($output);

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.5.30.0110.00619.46
8.5.20.0100.00819.57
8.5.10.0130.00516.63
8.5.00.0150.00720.19
8.4.180.0160.00520.68
8.4.170.0110.01021.86
8.4.160.0160.01121.80
8.4.150.0070.00516.87
8.4.140.0150.01017.31
8.4.130.0060.00420.59
8.4.120.0120.00724.25
8.4.110.0110.00918.83
8.4.100.0090.00618.95
8.4.90.0100.01120.48
8.4.80.0130.00718.81
8.4.70.0060.00319.00
8.4.60.0110.00918.67
8.4.50.0060.00518.50
8.4.40.0090.00920.52
8.4.30.0060.01317.59
8.4.20.0130.00320.39
8.4.10.0110.00717.88
8.3.300.0120.01018.59
8.3.290.0120.00920.78
8.3.280.0130.00718.64
8.3.270.0100.00916.50
8.3.260.0130.00616.56
8.3.250.0060.00318.78
8.3.240.0120.00717.20
8.3.230.0100.00716.47
8.3.220.0050.00319.05
8.3.210.0150.00516.51
8.3.200.0040.00416.43
8.3.190.0110.00917.26
8.3.180.0060.00218.98
8.3.170.0150.00416.53
8.3.160.0120.00617.11
8.3.150.0070.00316.54
8.3.140.0080.00020.68
8.3.130.0080.00018.30
8.3.120.0030.00619.03
8.3.110.0060.01120.94
8.3.100.0150.00324.06
8.3.90.0000.00826.77
8.3.80.0040.00418.55
8.3.70.0100.00716.63
8.3.60.0040.01118.28
8.3.50.0130.00518.27
8.3.40.0070.01118.51
8.3.30.0090.00618.45
8.3.20.0050.00320.93
8.3.10.0040.00423.48
8.3.00.0070.00023.71
8.2.300.0120.00920.36
8.2.290.0080.00220.54
8.2.280.0100.01018.36
8.2.270.0110.00717.10
8.2.260.0090.00918.17
8.2.250.0060.01016.70
8.2.240.0080.00017.22
8.2.230.0040.00422.58
8.2.220.0090.00037.54
8.2.210.0080.00026.77
8.2.200.0030.00616.63
8.2.190.0040.01116.75
8.2.180.0070.00725.92
8.2.170.0100.00322.96
8.2.160.0070.00720.32
8.2.150.0070.00024.18
8.2.140.0070.00024.66
8.2.130.0040.00420.35
8.2.120.0080.00026.35
8.2.110.0070.00319.39
8.2.100.0080.00419.59
8.2.90.0050.00317.89
8.2.80.0060.00319.63
8.2.70.0030.00618.03
8.2.60.0050.00318.03
8.2.50.0050.00318.10
8.2.40.0040.00419.30
8.2.30.0050.00219.38
8.2.20.0040.00718.05
8.2.10.0080.00019.34
8.2.00.0040.00418.17
8.1.340.0120.00820.14
8.1.330.0070.00321.81
8.1.320.0120.00418.15
8.1.310.0070.00416.07
8.1.300.0060.01020.26
8.1.290.0030.00630.84
8.1.280.0100.00725.92
8.1.270.0030.00618.90
8.1.260.0080.00026.35
8.1.250.0070.00028.09
8.1.240.0060.00322.14
8.1.230.0090.00320.96
8.1.220.0000.00717.74
8.1.210.0000.00818.77
8.1.200.0070.00417.36
8.1.190.0060.00617.22
8.1.180.0000.00818.10
8.1.170.0040.00418.59
8.1.160.0040.00418.97
8.1.150.0040.00418.84
8.1.140.0080.00018.79
8.1.130.0050.00219.10
8.1.120.0030.00417.55
8.1.110.0040.00417.51
8.1.100.0040.00417.42
8.1.90.0040.00417.38
8.1.80.0040.00417.39
8.1.70.0030.00317.41
8.1.60.0030.00517.49
8.1.50.0050.00317.57
8.1.40.0060.00317.49
8.1.30.0080.00017.65
8.1.20.0030.00517.64
8.1.10.0090.00017.44
8.1.00.0000.00817.44
8.0.300.0000.00821.55
8.0.290.0040.00416.75
8.0.280.0030.00318.51
8.0.270.0070.00017.30
8.0.260.0000.00718.61
8.0.250.0070.00016.89
8.0.240.0060.00016.91
8.0.230.0000.00716.96
8.0.220.0070.00016.95
8.0.210.0040.00416.95
8.0.200.0000.00717.01
8.0.190.0000.00816.96
8.0.180.0070.00016.82
8.0.170.0040.00416.89
8.0.160.0050.00316.92
8.0.150.0040.00416.74
8.0.140.0000.00716.86
8.0.130.0030.00313.32
8.0.120.0000.00716.88
8.0.110.0070.00016.95
8.0.100.0050.00316.98
8.0.90.0000.00816.88
8.0.80.0070.00916.84
8.0.70.0040.00416.73
8.0.60.0040.00416.82
8.0.50.0000.00717.00
8.0.30.0070.01117.12
8.0.20.0110.01117.23
8.0.10.0000.00716.92
8.0.00.0110.01016.77
7.4.330.0000.00515.55
7.4.320.0000.00616.55
7.4.300.0030.00316.52
7.4.290.0000.00716.42
7.4.280.0030.00516.61
7.4.270.0070.00016.47
7.4.260.0000.00716.61
7.4.250.0070.00016.59
7.4.240.0030.00316.43
7.4.230.0000.00816.72
7.4.220.0050.00316.64
7.4.210.0070.01016.59
7.4.200.0000.00716.43
7.4.160.0070.00916.58
7.4.140.0150.00817.86
7.4.130.0150.00616.41
7.4.120.0100.00916.58
7.4.110.0130.01016.66
7.4.100.0130.01016.45
7.4.90.0100.00716.62
7.4.80.0100.01319.39
7.4.70.0090.00616.52
7.4.60.0110.01116.56
7.4.50.0070.00716.55
7.4.40.0130.00316.48
7.4.00.0080.00914.96
7.3.330.0050.00013.26
7.3.320.0030.00313.15
7.3.310.0080.00016.44
7.3.300.0030.00316.36
7.3.290.0070.00016.34
7.3.280.0100.00716.35
7.3.260.0140.00716.49
7.3.240.0100.01216.42
7.3.230.0110.00816.69
7.3.210.0090.00916.57
7.3.200.0000.01616.62
7.3.190.0110.00816.49
7.3.180.0160.00016.64
7.3.170.0090.00916.62
7.3.160.0140.00716.47
7.3.120.0120.00514.82
7.3.110.0040.01314.79
7.3.100.0020.01314.80
7.3.90.0070.00514.94
7.3.80.0020.01114.91
7.3.70.0050.01414.87
7.3.60.0100.00314.72
7.3.50.0030.00614.58
7.3.40.0050.00814.73
7.3.30.0020.01514.67
7.3.20.0030.00716.61
7.3.10.0500.00715.65
7.3.00.0280.00716.14
7.2.330.0090.00916.69
7.2.320.0180.00016.45
7.2.310.0060.00916.59
7.2.300.0070.01016.80
7.2.290.0070.01416.53
7.2.250.0100.00714.98
7.2.240.0110.00815.06
7.2.230.0070.00814.87
7.2.220.0050.01115.12
7.2.210.0040.00915.17
7.2.200.0110.00714.95
7.2.190.0030.00915.10
7.2.180.0060.00514.91
7.2.170.0060.01215.09
7.2.130.0610.00614.98
7.2.120.1350.00714.73
7.2.110.1000.00315.01
7.2.100.0730.00714.84
7.2.90.0780.00614.82
7.2.80.0710.01314.73
7.2.70.0840.00615.14
7.2.60.0710.00715.00
7.2.50.0790.00314.81
7.2.40.0780.00615.00
7.2.30.0980.00714.79
7.2.20.0930.00714.97
7.2.10.0680.00314.69
7.2.00.0680.01014.92
7.1.330.0080.00615.78
7.1.320.0050.00715.87
7.1.310.0030.00815.74
7.1.300.0040.00715.69
7.1.290.0060.00615.73
7.1.280.0090.00715.67
7.1.270.0020.01115.82
7.1.260.0020.01015.84
7.1.250.0770.00313.51

preferences:
118.76 ms | 1686 KiB | 5 Q