3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = Array ( '3' => 10, '2' => 2, '5' => 'Nakiya', ); /** * Prepend a value to an array PHP */ function prependelement($array, $value) { array_unshift($array, $value); return $array; } var_dump(prependelement($array,'Jack'));

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.0190.00020.39
8.4.20.0130.01018.79
8.4.10.0070.01117.52
8.3.160.0100.00917.12
8.3.150.0120.00618.99
8.3.140.0100.00716.59
8.3.130.0040.00418.29
8.3.120.0130.00319.02
8.3.110.0060.01020.94
8.3.100.0070.01316.72
8.3.90.0020.00516.38
8.3.80.0090.00018.41
8.3.70.0110.01118.30
8.3.60.0140.00718.20
8.3.50.0090.01019.09
8.3.40.0130.00318.73
8.3.30.0070.00718.38
8.3.20.0040.00420.52
8.3.10.0030.00522.15
8.3.00.0040.00420.39
8.2.270.0140.00317.12
8.2.260.0110.00718.97
8.2.250.0040.00416.63
8.2.240.0060.00319.02
8.2.230.0130.00622.58
8.2.220.0000.00824.06
8.2.210.0050.00526.77
8.2.200.0090.00018.29
8.2.190.0070.00716.58
8.2.180.0040.01118.29
8.2.170.0070.01022.96
8.2.160.0070.00722.12
8.2.150.0070.00024.18
8.2.140.0050.00224.66
8.2.130.0050.00326.16
8.2.120.0080.00026.16
8.2.110.0100.01721.01
8.2.100.0060.00617.66
8.2.90.0000.00817.71
8.2.80.0000.00817.97
8.2.70.0080.00017.91
8.2.60.0040.00418.22
8.2.50.0000.00818.10
8.2.40.0030.00618.98
8.2.30.0050.00319.12
8.2.20.0000.00718.01
8.2.10.0000.00719.09
8.2.00.0040.00419.24
8.1.310.0060.00316.90
8.1.300.0090.00018.44
8.1.290.0050.00318.88
8.1.280.0100.01025.92
8.1.270.0000.00823.86
8.1.260.0000.00726.35
8.1.250.0040.00428.09
8.1.240.0040.00422.06
8.1.230.0080.00322.75
8.1.220.0080.00017.74
8.1.210.0080.00018.79
8.1.200.0060.00317.35
8.1.190.0040.00417.23
8.1.180.0040.00418.10
8.1.170.0050.00318.50
8.1.160.0040.00418.92
8.1.150.0000.00818.70
8.1.140.0040.00420.14
8.1.130.0000.00720.09
8.1.120.0030.00317.37
8.1.110.0030.00317.28
8.1.100.0040.00417.29
8.1.90.0080.00017.29
8.1.80.0030.00617.29
8.1.70.0030.00317.32
8.1.60.0020.00517.43
8.1.50.0050.00317.41
8.1.40.0050.00317.46
8.1.30.0070.00017.65
8.1.20.0050.00317.51
8.1.10.0070.00017.56
8.1.00.0000.00817.36
8.0.300.0000.00720.16
8.0.290.0030.00616.63
8.0.280.0040.00418.38
8.0.270.0030.00317.20
8.0.260.0060.00019.89
8.0.250.0070.00016.92
8.0.240.0070.00316.89
8.0.230.0040.00416.88
8.0.220.0040.00416.82
8.0.210.0000.00816.70
8.0.200.0030.00316.84
8.0.190.0040.00516.89
8.0.180.0000.00816.76
8.0.170.0060.00316.75
8.0.160.0070.00016.74
8.0.150.0000.00716.66
8.0.140.0000.00716.79
8.0.130.0000.00513.32
8.0.120.0040.00416.83
8.0.110.0040.00416.82
8.0.100.0040.00416.92
8.0.90.0030.00616.90
8.0.80.0130.00616.79
8.0.70.0050.00316.77
8.0.60.0050.00216.79
8.0.50.0000.00816.83
8.0.30.0110.01116.82
8.0.20.0120.00716.94
8.0.10.0070.00016.94
8.0.00.0140.00316.54
7.4.330.0040.00015.55
7.4.320.0000.00716.52
7.4.300.0000.00616.51
7.4.290.0060.00316.58
7.4.280.0050.00316.59
7.4.270.0030.00316.55
7.4.260.0030.00313.28
7.4.250.0070.00016.63
7.4.240.0040.00416.54
7.4.230.0000.00716.54
7.4.220.0050.00216.63
7.4.210.0060.00916.65
7.4.200.0070.00016.50
7.4.130.0040.01516.23
7.4.120.0160.00316.48
7.4.110.0110.00716.45
7.4.100.0090.00916.25
7.4.90.0060.01216.48
7.4.80.0030.01219.39
7.4.70.0110.01116.55
7.4.60.0130.00716.34
7.4.50.0110.00716.54
7.4.40.0060.01016.27
7.4.00.0090.00914.85
7.3.330.0040.00416.27
7.3.320.0050.00013.24
7.3.310.0030.00316.27
7.3.300.0060.00016.29
7.3.290.0110.00316.23
7.3.260.0110.00716.45
7.3.240.0090.00816.38
7.3.230.0120.00616.31
7.3.210.0110.00716.38
7.3.200.0130.00316.22
7.3.190.0080.00816.29
7.3.180.0050.01616.11
7.3.170.0140.00316.31
7.3.160.0030.01216.58
7.3.120.0120.00814.91
7.3.110.0100.01014.58
7.3.100.0020.01414.78
7.3.90.0020.01214.66
7.3.80.0070.00714.77
7.3.70.0080.00414.74
7.3.60.0080.00614.61
7.3.50.0080.00514.76
7.3.40.0060.00814.59
7.3.30.0070.00814.76
7.3.20.0070.00815.57
7.3.10.0070.01015.54
7.3.00.0060.00715.57
7.2.330.0100.01016.51
7.2.320.0090.00916.60
7.2.310.0120.00916.32
7.2.300.0060.01316.64
7.2.290.0060.01216.43
7.2.250.0060.01015.07
7.2.240.0100.00714.82
7.2.230.0080.01014.87
7.2.220.0110.00714.79
7.2.210.0060.00914.93
7.2.200.0060.00614.77
7.2.190.0100.00614.72
7.2.180.0050.00714.92
7.2.170.0030.01114.76
7.2.160.0160.00414.79
7.2.150.0030.01714.90
7.2.140.0120.00915.00
7.2.130.0070.01014.86
7.2.120.0120.00514.92
7.2.110.0060.01014.92
7.2.100.0090.00614.90
7.2.90.0040.01414.94
7.2.80.0090.00714.78
7.2.70.0040.01115.04
7.2.60.0060.00914.82
7.2.50.0040.01114.86
7.2.40.0060.01314.97
7.2.30.0090.01214.92
7.2.20.0090.00914.79
7.2.10.0000.01615.01
7.2.00.0090.00614.64
7.1.330.0100.00715.98
7.1.320.0100.00514.80
7.1.310.0080.00714.82
7.1.300.0080.00414.83
7.1.290.0050.00914.81
7.1.280.0070.00914.80
7.1.270.0070.00914.78
7.1.260.0060.00814.82
7.1.250.0060.01314.03

preferences:
67.56 ms | 403 KiB | 5 Q