3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = [ 'firstname' , 'bob' , 'lastname' , 'alex' ]; $new = array_combine( array_intersect_key($a, array_flip(range(0, count($a) - 1, 2))), array_intersect_key($a, array_flip(range(1, count($a) - 1, 2))) ); print_r($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.4.130.0090.01217.52
8.4.120.0100.01020.46
8.4.110.0070.01318.67
8.4.100.0150.00618.33
8.4.90.0130.00818.96
8.4.80.0090.01118.64
8.4.70.0110.00617.84
8.4.60.0110.01019.03
8.4.50.0140.00618.48
8.4.40.0030.00519.35
8.4.30.0140.00724.14
8.4.20.0100.01020.56
8.4.10.0030.00617.61
8.3.260.0120.00716.54
8.3.250.0150.00518.95
8.3.240.0120.00816.60
8.3.230.0100.00716.53
8.3.220.0120.00619.04
8.3.210.0120.00616.40
8.3.200.0050.00416.48
8.3.190.0100.00817.00
8.3.180.0120.00917.27
8.3.170.0090.00918.66
8.3.160.0070.01017.41
8.3.150.0090.00918.80
8.3.140.0140.00016.63
8.3.130.0090.00016.67
8.3.120.0190.00617.53
8.3.110.0190.00618.69
8.3.100.0200.00820.28
8.3.90.0190.00721.50
8.3.80.0270.00516.41
8.3.70.0260.00916.47
8.3.60.0160.01617.42
8.3.50.0190.00718.33
8.3.40.0290.00017.85
8.3.30.0190.00817.87
8.3.20.0180.00518.92
8.3.10.0140.00820.42
8.3.00.0090.00620.62
8.2.290.0090.00920.19
8.2.280.0100.00918.13
8.2.270.0070.00717.30
8.2.260.0110.00718.51
8.2.250.0000.00816.65
8.2.240.0220.00417.58
8.2.230.0190.00619.43
8.2.220.0160.00626.90
8.2.210.0160.00921.57
8.2.200.0150.00616.35
8.2.190.0150.01016.54
8.2.180.0180.00516.51
8.2.170.0210.00920.18
8.2.160.0270.00618.88
8.2.150.0200.00720.59
8.2.140.0150.00721.02
8.2.130.0210.00617.63
8.2.120.0180.00621.83
8.2.110.0180.00719.26
8.2.100.0210.00517.55
8.2.90.0140.01017.52
8.2.80.0200.00417.52
8.2.70.0170.00717.49
8.2.60.0210.00317.57
8.2.50.0190.00917.62
8.2.40.0070.00718.36
8.2.30.0150.00018.97
8.2.20.0150.00517.64
8.2.10.0090.00719.24
8.2.00.0220.00217.75
8.1.330.0110.00621.95
8.1.320.0100.00916.23
8.1.310.0060.01316.72
8.1.300.0180.00715.96
8.1.290.0170.00717.38
8.1.280.0180.00920.85
8.1.270.0230.00119.55
8.1.260.0170.00521.72
8.1.250.0120.00522.55
8.1.240.0120.00219.70
8.1.230.0230.00218.97
8.1.220.0150.00717.38
8.1.210.0190.00317.83
8.1.200.0150.00717.06
8.1.190.0160.00617.14
8.1.180.0140.00717.53
8.1.170.0170.00617.93
8.1.160.0180.00417.87
8.1.150.0150.00817.88
8.1.140.0180.00417.93
8.1.130.0170.00518.61
8.1.120.0160.00617.28
8.1.110.0200.00317.21
8.1.100.0150.00717.16
8.1.90.0160.00617.22
8.1.80.0200.00217.17
8.1.70.0160.00617.20
8.1.60.0230.00517.20
8.1.50.0190.01117.25
8.1.40.0170.00617.44
8.1.30.0150.00817.48
8.1.20.0200.00517.47
8.1.10.0150.00917.24
8.1.00.0180.00617.22
8.0.300.0190.00418.03
8.0.290.0210.00216.66
8.0.280.0210.00217.38
8.0.270.0170.00516.84
8.0.260.0190.00417.46
8.0.250.0210.00116.71
8.0.240.0180.00516.60
8.0.230.0200.00216.74
8.0.220.0190.00416.61
8.0.210.0170.00616.64
8.0.200.0160.00616.67
8.0.190.0170.00416.74
8.0.180.0210.00316.71
8.0.170.0220.00316.71
8.0.160.0190.00516.73
8.0.150.0120.00816.54
8.0.140.0150.00516.69
8.0.130.0180.00514.97
8.0.120.0130.01016.65
8.0.110.0150.00416.65
8.0.100.0080.00716.71
8.0.90.0220.00316.53
8.0.80.0160.00816.74
8.0.70.0160.00316.60
8.0.60.0190.00316.59
8.0.50.0170.00516.48
8.0.30.0130.01116.89
8.0.20.0150.01016.69
8.0.10.0190.01416.78
8.0.00.0110.01016.76
7.4.330.0130.00516.46
7.4.320.0140.00716.34
7.4.300.0150.00716.49
7.4.290.0180.00416.44
7.4.280.0190.00316.30
7.4.270.0150.00516.27
7.4.260.0100.00916.32
7.4.250.0120.00616.45
7.4.240.0160.00516.43
7.4.230.0180.00516.24
7.4.220.0100.00716.29
7.4.210.0060.00916.48
7.4.200.0130.00316.38
7.4.190.0120.00616.37
7.4.180.0190.00016.39
7.4.160.0110.00716.42
7.4.150.0120.00916.26
7.4.140.0100.01116.79
7.4.130.0090.01116.30
7.4.120.0120.00516.43
7.4.110.0120.00516.24
7.4.100.0090.00816.44
7.4.90.0110.00516.30
7.4.80.0100.01017.28
7.4.70.0130.00716.18
7.4.60.0100.00616.41
7.4.50.0100.00616.15
7.4.40.0080.00916.15
7.4.30.0110.00516.27
7.4.20.0080.00816.16
7.4.10.0150.00516.16
7.4.00.0050.01215.50
7.3.330.0110.00314.53
7.3.320.0080.00314.55
7.3.310.0060.00516.09
7.3.300.0100.00216.04
7.3.290.0060.00616.16
7.3.280.0120.01116.21
7.3.270.0160.00816.12
7.3.260.0120.00916.29
7.3.250.0110.01216.06
7.3.240.0120.00916.25
7.3.230.0140.00916.18
7.3.220.0190.00716.02
7.3.210.0110.01116.11
7.3.200.0120.01016.11
7.3.190.0130.00916.21
7.3.180.0170.00716.06
7.3.170.0100.01116.13
7.3.160.0210.00316.13
7.3.150.0180.00815.96
7.3.140.0170.00516.00
7.3.130.0170.00515.97
7.3.120.0150.00915.57
7.3.110.0190.00415.56
7.3.100.0150.00715.51
7.3.90.0120.01015.81
7.3.80.0140.00615.60
7.3.70.0140.00915.75
7.3.60.0130.00715.60
7.3.50.0150.00715.59
7.3.40.0100.00715.24
7.3.30.0170.00315.48
7.3.20.0110.00916.83
7.3.10.0130.00816.87
7.3.00.0150.00616.83
7.2.340.0190.01216.11
7.2.330.0140.00516.35
7.2.320.0180.00816.34
7.2.310.0190.00516.33
7.2.300.0190.00716.26
7.2.290.0150.01316.35
7.2.280.0260.00916.16
7.2.270.0200.01216.23
7.2.260.0270.00416.20
7.2.250.0180.00915.80
7.2.240.0180.01015.77
7.2.230.0220.00415.72
7.2.220.0140.01115.67
7.2.210.0150.01115.86
7.2.200.0160.00715.82
7.2.190.0140.01115.88
7.2.180.0200.00815.82
7.2.170.0110.01215.66
7.2.160.0150.00715.87
7.2.150.0180.00817.08
7.2.140.0150.00817.11
7.2.130.0220.00617.14
7.2.120.0130.01017.05
7.2.110.0150.00817.13
7.2.100.0160.00717.13
7.2.90.0140.01017.16
7.2.80.0200.00717.18
7.2.70.0170.01117.20
7.2.60.0170.00816.99
7.2.50.0230.00617.23
7.2.40.0170.00817.22
7.2.30.0140.00717.10
7.2.20.0120.00717.22
7.2.10.0150.00717.34
7.2.00.0130.00717.29
7.1.330.0120.00916.03
7.1.320.0180.00616.09
7.1.310.0170.01116.04
7.1.300.0140.01015.95
7.1.290.0170.00716.12
7.1.280.0130.00815.99
7.1.270.0140.00615.92
7.1.260.0140.00715.94
7.1.250.0170.00416.04
7.1.240.0200.01016.29
7.1.230.0190.00516.25
7.1.220.0170.00916.30
7.1.210.0150.00416.29
7.1.200.0110.01016.21
7.1.190.0130.00716.27
7.1.180.0180.00916.05
7.1.170.0130.01116.28
7.1.160.0230.00816.16
7.1.150.0130.00716.13
7.1.140.0250.01016.30
7.1.130.0200.00616.21
7.1.120.0230.00916.14
7.1.110.0190.00816.03
7.1.100.0190.00516.15
7.1.90.0200.00416.08
7.1.80.0170.00816.11
7.1.70.0340.00515.99
7.1.60.0180.00516.12
7.1.50.0210.00516.19
7.1.40.0130.01016.11
7.1.30.0340.00816.35
7.1.20.0240.00516.16
7.1.10.0190.00816.17
7.1.00.0200.00516.13

preferences:
29.72 ms | 403 KiB | 5 Q