3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = [ 0 => array ( 'category' => 'Sink', 'sublineitems' => array ( 0 => array ( 'quantity' => 1, 'model' => 'PBMS2016-12-X', 'customerspecificpricings' => array ( ), 'electricalutilitygrids' => array ( ), 'plumbingutilitygrids' => array ( 0 => array ( 'remarks' => '3-1/2" drain opening', ), ), 'subline_item_id' => '844b7c74-b1b7-4f17-a2da-f0c84cef432d', 'item_type_code' => 0, 'item_type_description' => 'Normal', 'vendor_id' => '4e1ab2ef-774e-4c73-be60-c937d1efeb56', ), ), 'lineitem_id' => 'e592feab-1e1a-4cfc-a97a-f1108c7156b6', 'item_number' => '1', ), ]; function sortByDataTypeRecursive(array &$array) { uasort($array, fn($a, $b) => is_array($a) <=> is_array($b)); //asort($array); foreach ($array as &$v) { if (is_array($v)) { (__FUNCTION__)($v); } } } sortByDataTypeRecursive($array); var_export($array);

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.00.0140.00820.04
8.4.150.0010.00114.05
8.4.140.0110.01017.84
8.4.130.0060.00618.59
8.4.120.0140.00620.52
8.4.110.0100.00922.64
8.4.100.0110.00920.59
8.4.90.0060.00318.75
8.4.80.0120.00820.27
8.4.70.0070.00318.00
8.4.60.0090.01019.00
8.4.50.0140.00718.90
8.4.40.0160.00317.85
8.4.30.0000.00818.66
8.4.20.0050.00518.72
8.4.10.0060.00319.71
8.3.280.0110.01118.43
8.3.270.0150.00416.64
8.3.260.0120.00816.74
8.3.250.0060.00218.88
8.3.240.0120.00720.82
8.3.230.0090.01116.50
8.3.220.0030.00520.52
8.3.210.0080.01118.60
8.3.200.0030.00616.57
8.3.190.0110.00517.05
8.3.180.0100.00818.66
8.3.170.0060.00320.65
8.3.160.0070.01018.27
8.3.150.0040.00416.69
8.3.140.0040.00418.34
8.3.130.0080.00016.48
8.3.120.0060.00318.73
8.3.110.0030.00920.94
8.3.100.0090.00016.54
8.3.90.0080.00826.77
8.3.80.0030.00617.97
8.3.70.0110.00416.71
8.3.60.0070.01418.43
8.3.50.0130.00316.55
8.3.40.0140.00420.33
8.3.30.0070.00720.26
8.3.20.0040.00424.18
8.3.10.0060.00324.66
8.3.00.0070.01318.82
8.2.290.0110.00720.18
8.2.280.0080.00720.30
8.2.270.0130.00619.20
8.2.260.0000.00918.18
8.2.250.0110.00418.60
8.2.240.0120.00418.96
8.2.230.0030.00522.58
8.2.220.0100.01037.54
8.2.210.0110.00426.77
8.2.200.0090.00316.75
8.2.190.0090.00617.00
8.2.180.0000.01516.50
8.2.170.0060.00918.78
8.2.160.0100.00322.96
8.2.150.0080.00025.66
8.2.140.0070.01124.66
8.2.130.0150.00419.16
8.2.120.0060.01219.03
8.2.110.0030.01718.93
8.2.100.0140.00418.88
8.2.90.0190.00318.96
8.2.80.0150.00618.52
8.2.70.0200.00018.74
8.2.60.0100.00618.64
8.2.50.0150.00618.95
8.2.40.0160.00318.83
8.2.30.0150.00318.70
8.2.20.0040.01518.84
8.2.10.0100.01018.84
8.2.00.0130.00618.71
8.1.330.0060.00721.92
8.1.320.0090.00918.04
8.1.310.0050.00318.68
8.1.300.0090.00018.32
8.1.290.0060.00330.84
8.1.280.0090.00625.92
8.1.270.0030.00623.76
8.1.260.0070.01122.12
8.1.250.0040.01122.12
8.1.240.0180.00418.67
8.1.230.0030.01318.47
8.1.220.0110.00418.75
8.1.210.0030.00618.61
8.1.200.0030.00618.58
8.1.190.0100.01018.88
8.1.180.0030.00620.20
8.1.170.0060.00318.47
8.1.160.0050.00318.44
8.1.150.0190.00018.57
8.1.140.0030.00618.62
8.1.130.0040.01118.64
8.1.120.0080.00018.68
8.1.110.0060.00918.45
8.1.100.0100.00618.62
8.1.90.0110.00418.39
8.1.80.0040.01118.55
8.1.70.0100.00618.63
8.1.60.0040.01118.67
8.1.50.0100.00318.72
8.1.40.0110.00718.65
8.1.30.0150.00418.73
8.1.20.0030.00618.87
8.1.10.0090.00918.65
8.1.00.0070.01418.48
7.4.270.0170.01118.37

preferences:
83 ms | 403 KiB | 5 Q