3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = [ 'row1' => 'row1', 'row2' => '', 'row3' => '', 'row4' => 'row4', ]; $cachedKeys = array_keys($array); usort($array, fn($a, $b) => !$a <=> !$b); var_export( array_combine($cachedKeys, $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.30.0090.00918.02
8.5.20.0130.00719.63
8.5.10.0140.00716.36
8.5.00.0150.00920.03
8.4.180.0140.00821.50
8.4.170.0160.00820.30
8.4.160.0130.01120.54
8.4.150.0090.00416.80
8.4.140.0110.00917.59
8.4.130.0120.00917.69
8.4.120.0060.01420.48
8.4.110.0090.00418.80
8.4.100.0120.00717.91
8.4.90.0100.00718.84
8.4.80.0060.00319.48
8.4.70.0140.00617.58
8.4.60.0120.00923.76
8.4.50.0120.00819.45
8.4.40.0440.00317.50
8.4.30.0370.01017.48
8.4.20.0410.00317.52
8.4.10.0400.00717.46
8.3.300.0140.00620.59
8.3.290.0060.00320.70
8.3.280.0070.00416.20
8.3.270.0080.01116.70
8.3.260.0110.00816.71
8.3.250.0070.01118.96
8.3.240.0100.01018.68
8.3.230.0110.00716.41
8.3.220.0080.00817.27
8.3.210.0100.00016.44
8.3.200.0060.00316.51
8.3.190.0060.00916.80
8.3.180.0090.00618.33
8.3.170.0370.00716.38
8.3.160.0390.00416.75
8.3.150.0370.00816.55
8.3.140.0390.00716.45
8.3.130.0350.00616.30
8.3.120.0210.01816.60
8.3.110.0310.00916.68
8.3.100.0380.00616.46
8.3.90.0420.00316.31
8.3.80.0370.01216.34
8.3.70.0330.01116.50
8.3.60.0350.00716.32
8.3.50.0350.00816.56
8.3.40.0360.00717.47
8.3.30.0270.00617.18
8.3.20.0270.01017.19
8.3.10.0320.00317.35
8.3.00.0160.01019.14
8.2.300.0110.01020.53
8.2.290.0130.00620.47
8.2.280.0110.00716.66
8.2.270.0260.01116.46
8.2.260.0340.00816.36
8.2.250.0370.01016.41
8.2.240.0280.01116.29
8.2.230.0310.00916.38
8.2.220.0260.01416.34
8.2.210.0270.01016.50
8.2.200.0290.00916.39
8.2.190.0300.00816.64
8.2.180.0320.00516.61
8.2.170.0360.00617.45
8.2.160.0320.00717.58
8.2.150.0260.01317.36
8.2.140.0310.00917.57
8.2.130.0330.00717.37
8.2.120.0260.00917.55
8.2.110.0300.01017.43
8.2.100.0350.00717.64
8.2.90.0270.01017.40
8.2.80.0130.01017.39
8.2.70.0330.00617.42
8.2.60.0370.00517.35
8.2.50.0260.01117.33
8.2.40.0330.00717.46
8.2.30.0300.00517.48
8.2.20.0270.01417.45
8.2.10.0250.01117.57
8.2.00.0210.01417.63
8.1.340.0170.00520.23
8.1.320.0120.00816.06

preferences:
57.42 ms | 850 KiB | 5 Q