3v4l.org

run code in 300+ PHP versions simultaneously
<?php $input = array("Neo", "Morpheus", "Trinity", "Cypher", "Tank"); $rand_keys = array_rand($input); echo $input[$rand_keys] . "\n"; echo $rand_keys; ?>

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)
7.4.00.0060.01214.60
7.3.120.0070.00914.88
7.3.110.0090.00614.73
7.3.100.0050.01014.91
7.3.90.0060.00814.78
7.3.80.0020.01214.65
7.3.70.0040.00614.74
7.3.60.0100.00314.95
7.3.50.0100.00514.85
7.3.40.0090.00514.78
7.3.30.0030.01014.83
7.3.20.0080.00916.60
7.3.10.0070.00716.81
7.3.00.0000.01416.63
7.2.250.0030.01615.20
7.2.240.0090.00815.21
7.2.230.0070.00715.18
7.2.220.0080.00915.24
7.2.210.0050.00915.21
7.2.200.0020.01114.75
7.2.190.0090.00314.82
7.2.180.0060.00714.95
7.2.170.0090.00514.87
7.2.160.0090.00615.00
7.2.150.0070.01016.77
7.2.140.0030.01417.04
7.2.130.0060.00916.91
7.2.120.0090.00616.87
7.2.110.0090.00617.02
7.2.100.0030.00916.86
7.2.90.0070.01116.69
7.2.80.0070.00416.91
7.2.70.0000.01516.70
7.2.60.0070.00716.64
7.2.50.0060.00617.04
7.2.40.0030.01217.14
7.2.30.0090.00616.63
7.2.20.0030.01216.78
7.2.10.0070.00716.66
7.2.00.0090.00317.96
7.1.330.0080.00715.71
7.1.320.0050.00815.85
7.1.310.0040.00715.80
7.1.300.0040.00615.73
7.1.290.0080.00315.70
7.1.280.0050.00515.65
7.1.270.0090.00515.80
7.1.260.0040.00815.78
7.1.250.0090.00616.07
7.1.70.0000.00717.24
7.1.60.0180.00719.70
7.1.50.0060.01216.83
7.1.00.0000.09022.43
7.0.200.0000.00716.82
7.0.140.0030.07321.96
7.0.100.0100.05319.96
7.0.90.0070.06719.87
7.0.80.0070.03719.80
7.0.70.0030.04019.97
7.0.60.0070.04020.00
7.0.50.0570.07320.31
7.0.40.0030.07020.15
7.0.30.0030.04320.10
7.0.20.0070.08020.15
7.0.10.0000.09020.07
7.0.00.0070.08320.04
5.6.280.0070.08720.90
5.6.250.0000.04720.68
5.6.240.0070.04020.48
5.6.230.0070.04020.59
5.6.220.0030.04020.54
5.6.210.0000.04320.58
5.6.200.0070.06321.01
5.6.190.0170.07321.03
5.6.180.0130.07321.03
5.6.170.0200.07321.16
5.6.160.0030.07721.04
5.6.150.0070.07721.05
5.6.140.0070.08321.00
5.6.130.0070.08720.93
5.6.120.0070.08021.07
5.6.110.0100.08321.04
5.6.100.0100.08020.98
5.6.90.0100.08320.92
5.6.80.0130.07020.49
5.6.70.0070.07720.39
5.6.60.0070.07320.41
5.6.50.0130.06020.51
5.6.40.0100.07020.40
5.6.30.0130.07320.36
5.6.20.0130.07020.29
5.6.10.0130.07320.39
5.6.00.0130.07020.42
5.5.380.0070.03720.36
5.5.370.0000.05020.54
5.5.360.0100.03320.46
5.5.350.0070.04020.38
5.5.340.0030.08320.88
5.5.330.0100.04320.86
5.5.320.0030.05320.73
5.5.310.0070.08720.88
5.5.300.0100.08720.89
5.5.290.0030.08720.82
5.5.280.0100.08320.72
5.5.270.0100.07320.90
5.5.260.0070.08020.82
5.5.250.0070.08720.56
5.5.240.0100.05020.18
5.5.230.0070.05320.13
5.5.220.0070.06020.10
5.5.210.0030.07720.25
5.5.200.0130.07020.23
5.5.190.0030.05320.11
5.5.180.0170.06020.17
5.5.160.0170.07020.23
5.5.150.0100.07320.26
5.5.140.0100.07720.20
5.5.130.0070.08020.10
5.5.120.0070.08020.08
5.5.110.0000.08720.25
5.5.100.0130.06720.11
5.5.90.0100.07020.00
5.5.80.0030.05020.16
5.5.70.0070.07320.05
5.5.60.0100.07020.04
5.5.50.0070.07720.05
5.5.40.0100.06719.99
5.5.30.0100.08320.05
5.5.20.0100.07020.07
5.5.10.0130.06319.95
5.5.00.0130.07020.04
5.4.450.0100.07719.56
5.4.440.0030.07719.38
5.4.430.0000.08719.47
5.4.420.0130.07319.35
5.4.410.0200.06719.17
5.4.400.0100.07319.05
5.4.390.0130.07019.23
5.4.380.0130.06719.06
5.4.370.0030.07318.90
5.4.360.0100.06019.03
5.4.350.0070.07718.79
5.4.340.0030.08019.03
5.4.320.0130.05019.10
5.4.310.0000.08019.04
5.4.300.0100.06318.91
5.4.290.0070.07319.04
5.4.280.0070.07719.04
5.4.270.0070.04319.04
5.4.260.0030.08019.09
5.4.250.0070.04319.23
5.4.240.0030.04718.89
5.4.230.0070.07318.78
5.4.220.0100.07319.04
5.4.210.0130.07019.07
5.4.200.0200.07019.05
5.4.190.0070.07318.87
5.4.180.0000.08719.22
5.4.170.0030.04718.77
5.4.160.0100.07319.09
5.4.150.0070.07719.05
5.4.140.0100.04316.27
5.4.130.0070.07716.26
5.4.120.0070.06316.36
5.4.110.0070.07016.30
5.4.100.0100.07316.44
5.4.90.0070.04016.23
5.4.80.0070.06016.36
5.4.70.0030.08316.43
5.4.60.0100.07316.34
5.4.50.0170.06716.28
5.4.40.0030.07316.24
5.4.30.0070.07016.36
5.4.20.0100.06716.23
5.4.10.0170.07016.24
5.4.00.0070.06715.80
5.3.290.0100.07314.52
5.3.280.0100.07314.53
5.3.270.0030.08014.60
5.3.260.0100.07014.57
5.3.250.0070.05014.56
5.3.240.0000.05714.42
5.3.230.0070.07014.57
5.3.220.0100.05714.55
5.3.210.0130.07014.56
5.3.200.0070.07014.50
5.3.190.0030.08314.55
5.3.180.0170.06714.55
5.3.170.0030.07314.41
5.3.160.0070.07314.47
5.3.150.0070.07314.51
5.3.140.0070.07014.54
5.3.130.0030.05314.50
5.3.120.0070.07014.39
5.3.110.0100.05314.41
5.3.100.0070.07313.89
5.3.90.0070.07313.84
5.3.80.0100.07013.96
5.3.70.0070.07313.96
5.3.60.0070.07013.95
5.3.50.0030.07313.90
5.3.40.0130.06313.94
5.3.30.0000.07713.86
5.3.20.0130.06313.47
5.3.10.0070.06313.47
5.3.00.0030.08013.54
5.2.170.0070.06011.23
5.2.160.0000.03711.23
5.2.150.0100.05011.23
5.2.140.0070.06011.23
5.2.130.0030.05011.23
5.2.120.0100.06011.23
5.2.110.0070.05011.23
5.2.100.0030.05011.23
5.2.90.0070.03011.23
5.2.80.0100.06011.23
5.2.70.0070.05011.23
5.2.60.0100.03711.23
5.2.50.0100.05711.23
5.2.40.0030.06311.23
5.2.30.0030.06311.23
5.2.20.0030.06311.23
5.2.10.0030.04711.23
5.2.00.0030.06011.23
5.1.60.0000.04311.23
5.1.50.0070.05311.23
5.1.40.0070.05011.23
5.1.30.0130.05011.23
5.1.20.0030.05011.23
5.1.10.0130.03711.23
5.1.00.0030.05711.23
5.0.50.0000.05311.23
5.0.40.0070.04311.23
5.0.30.0030.06011.23
5.0.20.0030.04011.23
5.0.10.0000.04311.23
5.0.00.0030.03711.23
4.4.90.0030.03711.23
4.4.80.0100.03011.23
4.4.70.0000.03711.23
4.4.60.0000.03311.23
4.4.50.0070.03311.23
4.4.40.0030.05311.23
4.4.30.0000.02311.23
4.4.20.0000.04011.23
4.4.10.0070.02711.23
4.4.00.0000.05311.23
4.3.110.0030.03011.23
4.3.100.0000.03711.23
4.3.90.0070.03311.23
4.3.80.0000.05011.23
4.3.70.0070.03011.23
4.3.60.0070.03311.23
4.3.50.0100.03011.23
4.3.40.0000.05311.23
4.3.30.0000.04011.23
4.3.20.0000.03711.23
4.3.10.0070.02711.23
4.3.00.0000.03711.23

preferences:
48.35 ms | 401 KiB | 5 Q