3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = array( 'D' => array( 'C' => array('c', 'b', 'a'), 'B' => 'bvalue', 'A' => array('a', 'c', 'b'), ), 'C' => 'cvalue', 'B' => 'bvalue', 'A' => array( 'Z' => 'zvalue', 'A' => 'avalue', 'B' => 'bvalue', ) ); function recursive_ksort(&$array) { foreach ($array as &$v) { if (is_array($v)) { recursive_ksort($v); } } ksort($array); } recursive_ksort($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.4.120.0100.01020.36
8.4.110.0110.01122.48
8.4.100.0130.00817.54
8.4.90.0130.00817.75
8.4.80.0090.00017.48
8.4.70.0110.01017.56
8.4.60.0050.00320.20
8.4.50.0030.00617.65
8.4.40.0130.00619.36
8.4.30.0070.01119.02
8.4.20.0060.01319.47
8.4.10.0060.00923.80
8.3.250.0100.01118.88
8.3.240.0090.01016.75
8.3.230.0080.01116.63
8.3.220.0110.00816.70
8.3.210.0060.00216.68
8.3.200.0040.00416.52
8.3.190.0110.01018.98
8.3.180.0110.00918.30
8.3.170.0140.00418.86
8.3.160.0070.01116.46
8.3.150.0140.00017.17
8.3.140.0060.00317.35
8.3.130.0080.00016.59
8.3.120.0000.00920.86
8.3.110.0040.01116.62
8.3.100.0080.00016.60
8.3.90.0100.01026.77
8.3.80.0090.00018.55
8.3.70.0120.00316.63
8.3.60.0080.00818.43
8.3.50.0070.01416.46
8.3.40.0100.00620.29
8.3.30.0160.00618.73
8.3.20.0000.00824.18
8.3.10.0040.00424.66
8.3.00.0030.00526.16
8.2.290.0100.00820.54
8.2.280.0120.00619.95
8.2.270.0090.00916.65
8.2.260.0070.00720.63
8.2.250.0030.00516.50
8.2.240.0070.01117.20
8.2.230.0100.00020.94
8.2.220.0060.00324.06
8.2.210.0110.00426.77
8.2.200.0030.00616.75
8.2.190.0000.01516.63
8.2.180.0060.00925.92
8.2.170.0080.00618.91
8.2.160.0080.00622.96
8.2.150.0000.00725.66
8.2.140.0060.00324.66
8.2.130.0050.00326.16
8.2.120.0040.00426.16
8.2.110.0070.00319.32
8.2.100.0040.00817.72
8.2.90.0030.00619.64
8.2.80.0000.00719.23
8.2.70.0050.00317.63
8.2.60.0060.00317.80
8.2.50.0040.00418.07
8.2.40.0020.00918.26
8.2.30.0070.00018.11
8.2.20.0040.00419.17
8.2.10.0050.00517.79
8.2.00.0030.00617.71
8.1.330.0100.00821.88
8.1.320.0110.00815.95
8.1.310.0080.00016.43
8.1.300.0060.00318.71
8.1.290.0060.00330.84
8.1.280.0000.01425.92
8.1.270.0000.00724.66
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0030.00622.56
8.1.230.0080.00320.98
8.1.220.0040.00417.74
8.1.210.0000.00818.88
8.1.200.0040.00417.35
8.1.190.0060.00317.66
8.1.180.0040.00418.10
8.1.170.0050.00218.89
8.1.160.0050.00218.93
8.1.150.0070.00318.57
8.1.140.0080.00017.53
8.1.130.0060.00317.46
8.1.120.0030.00517.46
8.1.110.0040.00417.55
8.1.100.0060.00317.49
8.1.90.0000.00917.50
8.1.80.0050.00517.48
8.1.70.0000.01017.50
8.1.60.0030.00617.57
8.1.50.0070.00217.59
8.1.40.0090.00017.52
8.1.30.0030.00617.48
8.1.20.0110.00617.63
8.1.10.0060.01117.58
8.1.00.0140.00317.41
8.0.300.0040.00420.03
8.0.290.0040.00416.75
8.0.280.0030.00318.43
8.0.270.0110.00416.79
8.0.260.0130.00216.85
8.0.250.0110.00416.81
8.0.240.0080.00416.75
8.0.230.0140.00016.87
8.0.220.0110.00316.80
8.0.210.0140.00016.68
8.0.200.0100.00316.75
8.0.190.0090.00316.85
8.0.180.0070.00716.87
8.0.170.0110.00416.86
8.0.160.0140.00016.73
8.0.150.0070.00716.74
8.0.140.0140.00016.80
8.0.130.0110.00516.72
8.0.120.0070.00716.79
8.0.110.0120.00316.79
8.0.100.0120.00416.79
8.0.90.0150.00016.70
8.0.80.0140.00016.73
8.0.70.0150.00016.86
8.0.60.0070.00216.71
8.0.50.0000.00816.82
8.0.30.0000.00916.71
8.0.20.0030.00616.86
8.0.10.0090.00016.83

preferences:
25.88 ms | 403 KiB | 5 Q