3v4l.org

run code in 300+ PHP versions simultaneously
<?php $lookup = [ 'zero', 'one', 'two', 'three', 'four', // etc... ]; $a = array("1"=>2,"2"=>4,"3"=>1,"4"=>1,"5"=>2,"6"=>3,"7"=>3,"8"=>2); foreach ($a as $num) { echo $lookup[$num] . '-' . $num; }

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.3.130.0030.00618.31
8.3.120.0120.00418.78
8.3.110.0060.00320.94
8.3.100.0080.00024.06
8.3.90.0080.00026.77
8.3.80.0090.00018.43
8.3.70.0120.00916.63
8.3.60.0070.01118.07
8.3.50.0180.00624.38
8.3.40.0080.00818.76
8.3.30.0090.00618.90
8.3.20.0000.00724.18
8.3.10.0070.00024.66
8.3.00.0000.00826.16
8.2.250.0060.00316.74
8.2.240.0070.00317.06
8.2.230.0060.00322.58
8.2.220.0040.01137.54
8.2.210.0120.00626.77
8.2.200.0060.00316.75
8.2.190.0080.00816.63
8.2.180.0120.00625.92
8.2.170.0110.00419.09
8.2.160.0130.00022.96
8.2.150.0040.00425.66
8.2.140.0040.00424.66
8.2.130.0000.00826.16
8.2.120.0040.00419.58
8.2.110.0100.00020.35
8.2.100.0090.00319.58
8.2.90.0080.00018.03
8.2.80.0080.00018.91
8.2.70.0040.00417.63
8.2.60.0060.00317.93
8.2.50.0000.00818.07
8.2.40.0030.00618.09
8.2.30.0040.00418.11
8.2.20.0000.00718.02
8.2.10.0000.00719.12
8.2.00.0040.00419.23
8.1.300.0100.01017.85
8.1.290.0080.00018.88
8.1.280.0100.00725.92
8.1.270.0040.00423.99
8.1.260.0000.00926.35
8.1.250.0050.00328.09
8.1.240.0110.00719.13
8.1.230.0030.00920.79
8.1.220.0040.00417.74
8.1.210.0080.00018.77
8.1.200.0030.00617.36
8.1.190.0000.00917.23
8.1.180.0050.00318.10
8.1.170.0080.00018.51
8.1.160.0040.00418.89
8.1.150.0000.00718.86
8.1.140.0050.00218.80
8.1.130.0000.00720.18
8.1.120.0000.00817.46
8.1.110.0000.00817.43
8.1.100.0080.00017.46
8.1.90.0040.00417.43
8.1.80.0000.00717.29
8.1.70.0040.00417.46
8.1.60.0050.00317.59
8.1.50.0000.00717.44
8.1.40.0040.00817.55
8.1.30.0050.00317.63
8.1.20.0060.00317.62
8.1.10.0070.00417.53
8.1.00.0060.00617.48
8.0.300.0000.00818.77
8.0.290.0000.00716.75
8.0.280.0040.00418.44
8.0.270.0000.00717.91
8.0.260.0000.00620.18
8.0.250.0030.00316.94
8.0.240.0040.00416.95
8.0.230.0030.00616.93
8.0.220.0040.00416.90
8.0.210.0000.00716.91
8.0.200.0040.00416.95
8.0.190.0040.00416.82
8.0.180.0070.00016.86
8.0.170.0050.00316.89
8.0.160.0070.00016.89
8.0.150.0030.00516.71
8.0.140.0030.00316.73
8.0.130.0000.00513.27
8.0.120.0050.00316.90
8.0.110.0070.00016.70
8.0.100.0000.00816.76
8.0.90.0070.00016.75
8.0.80.0090.00916.91
8.0.70.0080.00016.91
8.0.60.0070.00016.94
8.0.50.0080.00016.75
8.0.30.0090.00617.01
8.0.20.0130.00516.84
8.0.10.0050.00317.07
8.0.00.0110.00816.72
7.4.330.0050.00015.55
7.4.320.0030.00316.48
7.4.300.0000.00616.40
7.4.290.0030.00316.54
7.4.280.0080.00016.49
7.4.270.0030.00316.54
7.4.260.0030.00313.25
7.4.250.0000.00716.39
7.4.240.0030.00316.58
7.4.230.0030.00316.41
7.4.220.0040.00316.42
7.4.210.0100.00616.56
7.4.200.0000.00716.39
7.4.130.0080.00916.54
7.4.120.0100.01316.44
7.4.110.0100.00716.41
7.4.100.0070.01016.63
7.4.90.0080.01116.46
7.4.80.0110.00716.74
7.4.70.0060.01216.46
7.4.60.0130.01016.39
7.4.50.0150.00616.35
7.4.40.0040.01616.62
7.4.30.0070.01116.41
7.4.20.0090.00916.43
7.4.10.0120.00616.36
7.4.00.0040.01416.36
7.3.330.0000.00716.18
7.3.320.0030.00313.02
7.3.310.0050.00216.23
7.3.300.0070.00016.17
7.3.290.0050.00816.28
7.3.280.0110.00416.31
7.3.260.0070.01016.29
7.3.230.0100.00716.60
7.3.210.0110.00616.48
7.3.200.0170.00016.54
7.3.190.0140.00316.48
7.3.180.0120.00916.43
7.3.170.0070.01016.32
7.3.160.0070.01116.43
7.3.150.0100.00516.19
7.3.140.0170.00016.59
7.3.130.0070.01016.57
7.3.120.0100.00716.35
7.3.110.0060.01116.38
7.3.100.0100.00716.61
7.3.90.0030.01416.27
7.3.80.0080.01516.48
7.3.70.0120.00816.35
7.3.60.0110.00816.36
7.3.50.0140.00316.24
7.3.40.0100.01016.38
7.3.30.0130.01016.37
7.3.20.0060.01216.25
7.3.10.0150.00616.27
7.3.00.0000.01916.22
7.2.330.0090.00916.45
7.2.320.0150.00616.77
7.2.310.0120.01216.75
7.2.300.0110.01016.73
7.2.290.0160.00316.20
7.2.280.0110.00816.57
7.2.270.0120.00616.61
7.2.260.0130.00416.59
7.2.250.0040.01516.66
7.2.240.0130.01016.62
7.2.230.0070.01016.47
7.2.220.0190.00316.73
7.2.210.0130.00916.70
7.2.200.0140.00416.79
7.2.190.0090.00916.45
7.2.180.0130.01016.52
7.2.170.0040.01516.51
7.2.160.0120.00916.66
7.2.150.0170.00316.48
7.2.140.0390.01416.64
7.2.130.0090.00916.59
7.2.120.0160.00316.51
7.2.110.0090.00916.58
7.2.100.0130.00716.73
7.2.90.0150.00316.48
7.2.80.0060.01216.48
7.2.70.0090.00916.63
7.2.60.0110.00616.72
7.2.50.0100.01016.59
7.2.40.0130.00616.69
7.2.30.0080.01116.64
7.2.20.0030.02316.65
7.2.10.0160.00316.54
7.2.00.0110.00716.62

preferences:
64.01 ms | 403 KiB | 5 Q