3v4l.org

run code in 300+ PHP versions simultaneously
<?php error_reporting(~E_NOTICE); $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)

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.2.00.0030.01419.10
7.1.70.0090.00017.28
7.1.60.0170.00719.46
7.1.50.0100.01416.90
7.1.00.0000.08022.37
7.0.200.0000.01017.10
7.0.140.0100.07021.98
7.0.100.0430.06019.88
7.0.90.0070.06719.82
7.0.80.0430.07319.76
7.0.70.0100.07019.84
7.0.60.0130.07019.92
7.0.50.0230.07020.30
7.0.40.0070.06020.08
7.0.30.0070.09020.14
7.0.20.0070.07020.14
7.0.10.0100.04720.13
7.0.00.0170.06320.11
5.6.280.0000.08021.06
5.6.250.0000.05320.76
5.6.240.0130.07720.55
5.6.230.0230.07020.79
5.6.220.0100.06720.54
5.6.210.0100.08020.63
5.6.200.0030.05721.13
5.6.190.0200.06721.27
5.6.180.0130.06321.20
5.6.170.0100.07021.13
5.6.160.0030.08021.12
5.6.150.0130.07021.23
5.6.140.0030.09021.05
5.6.130.0070.08021.13
5.6.120.0070.07721.20
5.6.110.0070.06021.16
5.6.100.0030.05021.19
5.6.90.0030.06021.09
5.6.80.0130.07720.56
5.6.70.0030.06320.48
5.6.60.0030.06320.58
5.6.50.0130.07720.59
5.6.40.0100.07720.46
5.6.30.0070.08320.56
5.6.20.0100.07320.56
5.6.10.0100.07720.52
5.6.00.0000.06720.61
5.5.380.0100.08020.40
5.5.370.0030.06320.50
5.5.360.0070.05720.44
5.5.350.0100.04320.58
5.5.340.0100.03720.96
5.5.330.0030.07320.86
5.5.320.0030.08320.88
5.5.310.0100.07320.88
5.5.300.0030.08021.05
5.5.290.0100.04320.87
5.5.280.0230.04020.98
5.5.270.0100.07720.95
5.5.260.0100.07020.87
5.5.250.0030.05720.77
5.5.240.0130.07320.45
5.5.230.0130.06720.34
5.5.220.0130.04720.39
5.5.210.0030.04720.41
5.5.200.0070.08020.21
5.5.190.0100.06320.32
5.5.180.0200.03020.28
5.5.160.0170.07020.32
5.5.150.0100.07320.31
5.5.140.0130.07020.30
5.5.130.0070.04720.32
5.5.120.0100.05720.36
5.5.110.0030.07720.18
5.5.100.0100.08020.21
5.5.90.0200.07020.19
5.5.80.0030.08320.21
5.5.70.0200.05720.09
5.5.60.0070.08020.32
5.5.50.0070.06320.23
5.5.40.0130.08720.18
5.5.30.0170.06720.22
5.5.20.0070.04320.20
5.5.10.0100.07720.17
5.5.00.0000.08320.05
5.4.450.0100.07719.49
5.4.440.0130.03319.37
5.4.430.0130.07319.35
5.4.420.0070.04319.27
5.4.410.0100.06019.35
5.4.400.0070.07019.14
5.4.390.0130.07318.85
5.4.380.0130.06719.17
5.4.370.0030.05719.14
5.4.360.0070.05319.04
5.4.350.0100.08719.12
5.4.340.0100.07718.90
5.4.320.0130.06719.09
5.4.310.0100.07719.05
5.4.300.0000.07318.90
5.4.290.0130.04319.23
5.4.280.0130.07019.05
5.4.270.0100.03719.17
5.4.260.0070.07319.23
5.4.250.0100.07719.17
5.4.240.0070.06719.16
5.4.230.0130.07319.11
5.4.220.0130.07719.23
5.4.210.0100.07718.94
5.4.200.0070.07719.15
5.4.190.0030.04719.19
5.4.180.0070.05019.11
5.4.170.0130.06318.93
5.4.160.0000.04319.16
5.4.150.0130.04319.02
5.4.140.0130.06016.36
5.4.130.0100.07316.40
5.4.120.0070.07016.26
5.4.110.0070.04316.43
5.4.100.0100.07316.43
5.4.90.0100.07016.36
5.4.80.0100.07016.41
5.4.70.0070.04716.31
5.4.60.0170.06716.31
5.4.50.0200.06316.48
5.4.40.0070.03316.53
5.4.30.0100.05016.47
5.4.20.0070.07016.29
5.4.10.0100.03316.45
5.4.00.0000.07715.80
5.3.290.0130.06714.77
5.3.280.0100.08014.60
5.3.270.0030.08014.63
5.3.260.0030.04314.63
5.3.250.0070.05014.53
5.3.240.0100.07314.72
5.3.230.0100.04714.68
5.3.220.0100.07014.63
5.3.210.0070.08014.63
5.3.200.0030.08314.67
5.3.190.0100.07014.57
5.3.180.0030.07714.51
5.3.170.0070.07014.58
5.3.160.0030.08014.56
5.3.150.0070.07714.65
5.3.140.0070.04014.50
5.3.130.0100.08714.66
5.3.120.0070.04014.50
5.3.110.0030.07014.61
5.3.100.0070.04013.97
5.3.90.0030.07314.08
5.3.80.0070.07314.05
5.3.70.0070.03314.12
5.3.60.0000.04013.91
5.3.50.0030.05313.93
5.3.40.0130.06713.85
5.3.30.0070.04714.02
5.3.20.0000.07013.81
5.3.10.0030.07313.67
5.3.00.0030.03713.63
5.2.170.0070.03711.31
5.2.160.0130.02711.31
5.2.150.0070.05011.31
5.2.140.0030.04311.31
5.2.130.0030.05711.31
5.2.120.0130.03311.31
5.2.110.0000.03711.31
5.2.100.0100.03711.31
5.2.90.0030.04311.31
5.2.80.0070.04011.31
5.2.70.0030.06011.31
5.2.60.0070.03011.31
5.2.50.0070.05011.31
5.2.40.0070.06011.31
5.2.30.0000.05711.31
5.2.20.0000.03711.31
5.2.10.0030.03311.31
5.2.00.0030.05311.31
5.1.60.0030.04711.31
5.1.50.0030.04311.31
5.1.40.0070.03711.31
5.1.30.0100.05011.31
5.1.20.0000.03311.31
5.1.10.0030.04011.31
5.1.00.0030.03011.31
5.0.50.0100.03311.31
5.0.40.0030.03711.31
5.0.30.0030.06711.31
5.0.20.0070.02011.31
5.0.10.0000.03711.31
5.0.00.0070.06011.31
4.4.90.0070.01311.31
4.4.80.0070.02311.31
4.4.70.0030.03011.31
4.4.60.0030.03311.31
4.4.50.0030.02011.31
4.4.40.0030.04711.31
4.4.30.0030.03011.31
4.4.20.0030.03011.31
4.4.10.0000.03011.31
4.4.00.0000.04711.31
4.3.110.0000.03711.31
4.3.100.0070.03011.31
4.3.90.0070.03311.31
4.3.80.0000.05711.31
4.3.70.0000.02011.31
4.3.60.0100.02711.31
4.3.50.0000.01711.31
4.3.40.0000.04711.31
4.3.30.0000.02011.31
4.3.20.0000.02711.31
4.3.10.0030.02011.31
4.3.00.0030.02011.31

preferences:
35.07 ms | 401 KiB | 5 Q