3v4l.org

run code in 300+ PHP versions simultaneously
<?php $path = "/var/www/foo"; var_dump($pаth."/user/supplied/path"); // prints /user/supplied/path, and emits a notice // let's write a secure random number generator function crypto_rnd() { $rnd = mt_rand(0, 1e30); // 3v4l apparently doesn't have openssl_random_pseudo_bytes $today = date('c'); // extra entropy can't hurt! return hash("sha512", $r⁠nd.$today); // oops, that's actually r\u2060nd, which is undefined, // i.e. NULL, and the result depends only on the current time... } var_dump(crypto_rnd() === crypto_rnd()); // bool(true)... uh oh $foo = 1; var_dump($foo === $foо); // bool(false)... $x = 2; var_dump($x+$⁠x); // int(2), what the everloving fuck

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.3.10.0120.00316.66
7.3.00.0060.01216.66
7.2.130.0000.01516.64
7.2.120.0130.00616.80
7.2.110.0040.01116.58
7.2.100.0090.00616.64
7.2.90.0100.01016.64
7.2.80.0030.01016.68
7.2.70.0110.00716.52
7.2.60.0180.00316.63
7.2.50.0100.00316.57
7.2.40.0040.01516.89
7.2.30.0060.00917.09
7.2.20.0060.01216.96
7.2.10.0070.01016.82
7.2.00.0060.00616.61
7.1.250.0070.00715.68
7.1.70.0080.00817.35
7.1.60.0100.01319.46
7.1.50.0130.01017.23
7.1.00.0100.07022.43
7.0.200.0000.00716.82
7.0.140.0030.07321.97
7.0.80.0600.08319.90
7.0.70.0500.06019.93
7.0.60.0500.08020.08
7.0.50.0070.04720.37
7.0.40.0200.07320.09
7.0.30.0000.05720.04
7.0.20.0070.08320.08
7.0.10.0070.07320.07
7.0.00.0070.08720.02
5.6.280.0030.07321.27
5.6.230.0170.08020.79
5.6.220.0070.08020.68
5.6.210.0130.08020.86
5.6.200.0130.08721.04
5.6.190.0000.06021.21
5.6.180.0100.06721.13
5.6.170.0000.05021.24
5.6.160.0030.04721.17
5.6.150.0100.08021.21
5.6.140.0230.05721.21
5.6.130.0200.06021.21
5.6.120.0070.05321.23
5.6.110.0270.02721.20
5.6.100.0070.07021.22
5.6.90.0100.07721.02
5.6.80.0100.08320.55
5.6.70.0030.08720.62
5.6.60.0170.07720.50
5.6.50.0100.05020.59
5.6.40.0030.08020.39
5.6.30.0070.07720.63
5.6.20.0100.08020.41
5.6.10.0030.07320.39
5.6.00.0070.08320.55
5.5.370.0030.04720.45
5.5.360.0030.07720.48
5.5.350.0100.06320.54
5.5.340.0030.05721.07
5.5.330.0100.05020.96
5.5.320.0170.07320.98
5.5.310.0070.04020.80
5.5.300.0030.08720.80
5.5.290.0030.08020.88
5.5.280.0130.04321.04
5.5.270.0030.08321.00
5.5.260.0000.04720.96
5.5.250.0000.04320.92
5.5.240.0200.06020.36
5.5.230.0030.08020.30
5.5.220.0200.06320.34
5.5.210.0070.08020.34
5.5.200.0070.07320.32
5.5.190.0030.08720.16
5.5.180.0030.08720.32
5.5.160.0100.07720.16
5.5.150.0130.03320.32
5.5.140.0070.07320.31
5.5.130.0130.06320.32
5.5.120.0070.07720.31
5.5.110.0170.07020.11
5.5.100.0100.07020.20
5.5.90.0100.07320.20
5.5.80.0170.04020.11
5.5.70.0170.08020.32
5.5.60.0070.05720.24
5.5.50.0030.07320.19
5.5.40.0130.07720.11
5.5.30.0070.08020.20
5.5.20.0070.08020.19
5.5.10.0000.06020.09
5.5.00.0130.07320.22
5.4.450.0130.04019.42
5.4.440.0100.03319.23
5.4.430.0070.08019.50
5.4.420.0100.04719.55
5.4.410.0130.03019.04
5.4.400.0130.06719.05
5.4.390.0070.06319.04
5.4.380.0070.06318.90
5.4.370.0100.07718.98
5.4.360.0100.07319.14
5.4.350.0030.05319.23
5.4.340.0100.04018.95
5.4.320.0130.07719.14
5.4.310.0130.06318.85
5.4.300.0030.08019.04
5.4.290.0130.05718.90
5.4.280.0030.08019.17
5.4.270.0100.06718.86
5.4.260.0170.06019.13
5.4.250.0170.06719.17
5.4.240.0100.06719.04
5.4.230.0030.07719.12
5.4.220.0030.08319.24
5.4.210.0030.07319.22
5.4.200.0030.06019.17
5.4.190.0030.07718.93
5.4.180.0000.08019.00
5.4.170.0070.06718.86
5.4.160.0170.06319.12
5.4.150.0070.07719.21
5.4.140.0030.04316.25
5.4.130.0130.06716.45
5.4.120.0100.06716.45
5.4.110.0070.08016.49
5.4.100.0100.06316.50
5.4.90.0100.07016.39
5.4.80.0100.07016.45
5.4.70.0130.05316.34
5.4.60.0070.07316.45
5.4.50.0100.06716.48
5.4.40.0070.05316.39
5.4.30.0070.08016.40
5.4.20.0200.06316.36
5.4.10.0070.06716.41
5.4.00.0130.06315.79
5.3.290.0070.08014.73
5.3.280.0070.07314.54
5.3.270.0070.05314.71
5.3.260.0200.06714.69
5.3.250.0100.04714.56
5.3.240.0100.07014.59
5.3.230.0070.07714.65
5.3.220.0030.07014.62
5.3.210.0000.06314.57
5.3.200.0070.08314.61
5.3.190.0070.08014.66
5.3.180.0100.04714.48
5.3.170.0000.05714.61
5.3.160.0170.06714.52
5.3.150.0130.06714.48
5.3.140.0130.06314.60
5.3.130.0030.08014.61
5.3.120.0100.06314.66
5.3.110.0070.07314.68
5.3.100.0100.07314.18
5.3.90.0100.05014.00
5.3.80.0030.06313.92
5.3.70.0070.07714.05
5.3.60.0030.07014.11
5.3.50.0100.05014.04
5.3.40.0000.08313.87
5.3.30.0070.07313.84
5.3.20.0000.07313.63
5.3.10.0200.06313.71
5.3.00.0070.07013.70
5.2.170.0000.06011.54
5.2.160.0170.04711.54
5.2.150.0070.06011.54
5.2.140.0030.06311.54
5.2.130.0030.04011.54
5.2.120.0030.05711.54
5.2.110.0000.06311.54
5.2.100.0030.05711.54
5.2.90.0070.06011.54
5.2.80.0070.06311.54
5.2.70.0030.04311.54
5.2.60.0070.04711.54
5.2.50.0000.06711.54
5.2.40.0000.05011.54
5.2.30.0030.05711.54
5.2.20.0070.05711.54
5.2.10.0070.05711.54
5.2.00.0030.06011.54
5.1.60.0070.04711.54
5.1.50.0100.03311.54
5.1.40.0030.04711.54
5.1.30.0100.05011.54
5.1.20.0070.05311.54
5.1.10.0100.05311.54
5.1.00.0070.05011.54
5.0.50.0000.04311.54
5.0.40.0000.04711.54
5.0.30.0070.06011.54
5.0.20.0000.05011.54
5.0.10.0100.04011.54
5.0.00.0000.05711.54
4.4.90.0070.03011.54
4.4.80.0000.03711.54
4.4.70.0000.03711.54
4.4.60.0100.02011.54
4.4.50.0070.03011.54
4.4.40.0030.05011.54
4.4.30.0030.03711.54
4.4.20.0000.04011.54
4.4.10.0070.02711.54
4.4.00.0070.03711.54
4.3.110.0000.03711.54
4.3.100.0030.03711.54
4.3.90.0070.03011.54
4.3.80.0030.05011.54
4.3.70.0000.03711.54
4.3.60.0030.03311.54
4.3.50.0000.03711.54
4.3.40.0000.05711.54
4.3.30.0030.03711.54
4.3.20.0000.03711.54
4.3.10.0030.02011.54
4.3.00.0000.03711.54

preferences:
27.96 ms | 401 KiB | 5 Q