3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = Array ( 'user_id' => 10, 'id' => 2, 'user' => 'Nakiya', ); /** * Get the first value from an array. */ function first($array) { return array_shift($array); } var_dump(first($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.30.0030.00620.41
8.4.20.0060.00318.68
8.4.10.0030.01317.57
8.3.160.0070.01117.14
8.3.150.0070.01116.92
8.3.140.0040.00416.79
8.3.130.0080.00018.10
8.3.120.0070.00420.59
8.3.110.0050.00316.38
8.3.100.0050.00316.75
8.3.90.0040.01516.51
8.3.80.0070.00318.30
8.3.70.0120.00318.43
8.3.60.0070.01018.18
8.3.50.0090.00918.30
8.3.40.0090.00618.71
8.3.30.0130.00718.41
8.3.20.0060.00320.77
8.3.10.0040.00421.95
8.3.00.0050.00320.64
8.2.270.0060.01317.32
8.2.260.0100.00716.59
8.2.250.0040.00416.67
8.2.240.0000.00817.29
8.2.230.0000.00820.94
8.2.220.0130.00624.06
8.2.210.0040.00426.77
8.2.200.0040.00418.41
8.2.190.0000.01416.63
8.2.180.0070.00718.16
8.2.170.0070.00722.96
8.2.160.0030.01022.25
8.2.150.0050.00324.18
8.2.140.0050.00324.66
8.2.130.0070.00026.16
8.2.120.0000.00826.35
8.2.110.0030.00719.27
8.2.100.0070.00317.78
8.2.90.0080.00017.62
8.2.80.0030.00617.97
8.2.70.0040.00417.80
8.2.60.0060.00318.09
8.2.50.0080.00018.10
8.2.40.0030.00621.01
8.2.30.0070.00019.09
8.2.20.0000.00817.89
8.2.10.0050.00319.03
8.2.00.0030.00519.04
8.1.310.0070.00716.47
8.1.300.0000.00916.14
8.1.290.0050.00518.88
8.1.280.0150.00325.92
8.1.270.0080.00023.88
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0070.00319.14
8.1.230.0120.00019.09
8.1.220.0080.00017.74
8.1.210.0040.00418.77
8.1.200.0060.00317.21
8.1.190.0080.00017.00
8.1.180.0120.00018.10
8.1.170.0050.00320.71
8.1.160.0000.00719.02
8.1.150.0060.00618.77
8.1.140.0030.00320.28
8.1.130.0040.00420.06
8.1.120.0000.00717.28
8.1.110.0030.00517.35
8.1.100.0000.00717.42
8.1.90.0000.00817.31
8.1.80.0060.00317.42
8.1.70.0030.00317.34
8.1.60.0040.00417.50
8.1.50.0030.00517.46
8.1.40.0040.00417.39
8.1.30.0080.00017.60
8.1.20.0060.00317.52
8.1.10.0060.00317.40
8.1.00.0030.00517.44
8.0.300.0000.00819.68
8.0.290.0050.00316.63
8.0.280.0000.00718.29
8.0.270.0030.00316.75
8.0.260.0030.00320.06
8.0.250.0000.00716.80
8.0.240.0100.00016.85
8.0.230.0000.00716.86
8.0.220.0030.00316.79
8.0.210.0040.00416.80
8.0.200.0000.00716.92
8.0.190.0040.00416.91
8.0.180.0000.00716.83
8.0.170.0080.00016.75
8.0.160.0050.00216.86
8.0.150.0000.00716.76
8.0.140.0030.00616.67
8.0.130.0060.00013.21
8.0.120.0000.00816.79
8.0.110.0030.00716.68
8.0.100.0000.00816.61
8.0.90.0060.00316.70
8.0.80.0060.00916.87
8.0.70.0060.00316.67
8.0.60.0040.00416.78
8.0.50.0020.00516.84
8.0.30.0110.00816.87
8.0.20.0090.01117.05
8.0.10.0040.00416.73
8.0.00.0110.00716.67
7.4.330.0060.00015.55
7.4.320.0030.00316.55
7.4.300.0000.00616.60
7.4.290.0000.00716.54
7.4.280.0040.00416.40
7.4.270.0080.00016.50
7.4.260.0030.00313.28
7.4.250.0070.00016.47
7.4.240.0030.00516.48
7.4.230.0000.00716.69
7.4.220.0030.00316.48
7.4.210.0070.00816.54
7.4.200.0030.00516.57
7.4.130.0100.00716.54
7.4.120.0090.01216.43
7.4.110.0070.01316.48
7.4.100.0120.00616.55
7.4.90.0030.01416.41
7.4.80.0130.01019.39
7.4.70.0130.00316.43
7.4.60.0120.00916.44
7.4.50.0030.00916.13
7.4.40.0120.00916.28
7.4.00.0110.00714.70
7.3.330.0070.00016.26
7.3.320.0030.00313.10
7.3.310.0040.00416.07
7.3.300.0030.00316.24
7.3.290.0000.00716.13
7.3.280.0200.00016.16
7.3.260.0130.00716.32
7.3.240.0090.00916.42
7.3.230.0130.01016.29
7.3.210.0090.00816.31
7.3.200.0080.00916.34
7.3.190.0030.01416.34
7.3.180.0220.02616.50
7.3.170.0090.01216.21
7.3.160.0130.00316.20
7.3.100.0070.01014.87
7.3.90.0060.01214.70
7.3.80.0030.01514.80
7.3.70.0080.00814.65
7.3.60.0110.00414.48
7.3.50.0170.00314.50
7.3.40.0090.00614.43
7.3.30.0080.00714.82
7.3.20.0030.01014.65
7.3.10.0050.01014.92
7.3.00.0070.00714.76
7.2.330.0090.00916.24
7.2.320.0100.00716.45
7.2.310.0110.00616.38
7.2.300.0130.00316.22
7.2.290.0090.00616.19
7.2.230.0100.00915.02
7.2.220.0110.00814.84
7.2.210.0090.00914.74
7.2.200.0030.01914.74
7.2.190.0030.01014.80
7.2.180.0090.00614.89
7.2.170.0120.00614.73
7.2.160.0100.00714.73
7.2.150.0120.00314.77
7.2.140.0090.00614.68
7.2.130.0000.01414.57
7.2.120.0000.01314.91
7.2.110.0040.01114.95
7.2.100.0000.01414.96
7.2.90.0000.01415.07
7.2.80.0090.00514.72
7.2.70.0110.00414.91
7.2.60.0140.00015.02
7.2.50.0060.00814.71
7.2.40.0280.00614.71
7.2.30.0070.00715.04
7.2.20.0030.01014.83
7.2.10.0110.00314.89
7.2.00.0070.00714.87
7.1.320.0090.00913.81
7.1.310.0090.00914.04
7.1.300.0130.00613.91
7.1.290.0080.00813.96
7.1.280.0030.01014.00
7.1.270.0110.00613.78
7.1.260.0090.00313.93
7.1.250.0030.00913.97

preferences:
28.78 ms | 403 KiB | 5 Q