3v4l.org

run code in 300+ PHP versions simultaneously
<?php error_reporting(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.3.10.0030.01216.50
7.3.00.0040.01116.93
7.2.130.0040.01217.06
7.2.120.0090.00616.96
7.2.110.0070.00416.83
7.2.100.0030.00716.78
7.2.90.0100.00717.19
7.2.80.0030.01417.01
7.2.70.0030.01317.11
7.2.60.0070.01117.07
7.2.50.0060.00616.86
7.2.40.0060.01217.10
7.2.30.0090.00616.88
7.2.20.0030.01016.80
7.2.10.0030.00716.85
7.2.00.0060.00618.29
7.1.250.0100.00315.92
7.1.70.0000.00917.40
7.1.60.0070.01419.46
7.1.50.0130.01316.83
7.1.00.0070.07322.28
7.0.200.0080.00317.07
7.0.140.0100.06721.95
7.0.100.0170.06319.89
7.0.90.0170.05319.88
7.0.80.0270.06319.97
7.0.70.0100.07320.00
7.0.60.0170.07719.90
7.0.50.0100.08320.15
7.0.40.0100.07719.90
7.0.30.0170.08020.02
7.0.20.0070.06320.07
7.0.10.0100.07720.05
7.0.00.0030.07020.05
5.6.280.0000.07021.23
5.6.250.0030.05320.73
5.6.240.0000.06020.68
5.6.230.0030.06020.70
5.6.220.0200.06720.72
5.6.210.0070.04320.71
5.6.200.0100.06721.01
5.6.190.0070.08721.16
5.6.180.0070.08021.21
5.6.170.0070.06321.21
5.6.160.0100.07021.08
5.6.150.0070.05321.19
5.6.140.0030.08721.16
5.6.130.0100.07721.15
5.6.120.0130.07721.01
5.6.110.0030.07321.07
5.6.100.0100.07721.02
5.6.90.0100.06321.05
5.6.80.0070.07320.50
5.6.70.0130.07020.45
5.6.60.0070.08320.36
5.6.50.0130.07720.55
5.6.40.0030.07720.43
5.6.30.0100.08020.57
5.6.20.0070.07720.57
5.6.10.0030.08320.39
5.6.00.0070.08020.52
5.5.380.0130.07020.41
5.5.370.0030.08320.40
5.5.360.0170.03720.39
5.5.350.0100.06720.42
5.5.340.0100.06321.05
5.5.330.0170.07020.94
5.5.320.0070.08320.92
5.5.310.0130.07020.91
5.5.300.0170.06020.88
5.5.290.0030.05321.04
5.5.280.0000.09321.00
5.5.270.0100.08320.80
5.5.260.0070.04720.91
5.5.250.0030.10020.73
5.5.240.0100.05720.21
5.5.230.0070.07320.42
5.5.220.0070.08020.16
5.5.210.0100.06020.29
5.5.200.0070.08020.18
5.5.190.0070.08720.17
5.5.180.0030.07320.37
5.5.160.0070.07020.32
5.5.150.0100.07720.27
5.5.140.0030.07320.31
5.5.130.0130.07720.26
5.5.120.0070.06720.27
5.5.110.0070.07020.38
5.5.100.0000.08020.24
5.5.90.0070.06020.18
5.5.80.0030.08020.14
5.5.70.0170.05720.14
5.5.60.0070.07320.05
5.5.50.0100.07320.04
5.5.40.0030.07320.17
5.5.30.0100.07320.13
5.5.20.0070.08020.14
5.5.10.0100.07020.02
5.5.00.0100.07720.13
5.4.450.0030.08319.45
5.4.440.0030.06019.35
5.4.430.0130.07319.35
5.4.420.0100.08319.44
5.4.410.0070.07719.32
5.4.400.0030.05719.07
5.4.390.0070.07718.90
5.4.380.0070.04718.90
5.4.370.0030.04718.88
5.4.360.0030.04319.22
5.4.350.0070.07718.90
5.4.340.0070.07319.01
5.4.320.0070.05719.20
5.4.310.0200.05719.03
5.4.300.0100.03718.95
5.4.290.0130.06318.88
5.4.280.0130.06319.05
5.4.270.0130.07319.03
5.4.260.0070.06019.24
5.4.250.0170.06718.87
5.4.240.0030.06019.12
5.4.230.0100.07018.87
5.4.220.0030.08319.11
5.4.210.0070.07319.03
5.4.200.0000.08019.13
5.4.190.0100.07019.17
5.4.180.0100.07719.04
5.4.170.0130.07318.84
5.4.160.0130.07319.03
5.4.150.0030.08319.02
5.4.140.0100.07016.25
5.4.130.0100.07016.33
5.4.120.0170.06716.13
5.4.110.0030.05716.43
5.4.100.0070.06316.46
5.4.90.0100.05316.43
5.4.80.0000.07716.47
5.4.70.0130.04316.34
5.4.60.0100.07316.32
5.4.50.0070.04016.32
5.4.40.0070.06316.35
5.4.30.0030.07716.46
5.4.20.0100.07316.40
5.4.10.0070.03316.45
5.4.00.0100.06715.79
5.3.290.0130.06314.68
5.3.280.0170.04714.60
5.3.270.0030.05314.60
5.3.260.0130.07314.74
5.3.250.0130.07014.62
5.3.240.0070.07014.74
5.3.230.0100.07314.59
5.3.220.0070.07314.52
5.3.210.0030.07714.67
5.3.200.0100.07014.57
5.3.190.0130.07014.62
5.3.180.0070.07714.49
5.3.170.0070.07314.65
5.3.160.0000.08014.69
5.3.150.0030.07314.52
5.3.140.0000.04014.70
5.3.130.0000.04714.47
5.3.120.0000.04714.51
5.3.110.0070.08014.51
5.3.100.0170.06714.47
5.3.90.0100.05314.47
5.3.80.0070.08014.47
5.3.70.0070.07314.47
5.3.60.0070.05314.47
5.3.50.0030.04314.47
5.3.40.0130.06714.47
5.3.30.0070.04014.47
5.3.20.0070.06714.47
5.3.10.0070.07014.47
5.3.00.0000.08014.47
5.2.170.0000.06714.47
5.2.160.0070.06014.47
5.2.150.0030.06714.47
5.2.140.0030.06714.47
5.2.130.0100.02714.47
5.2.120.0030.06014.47
5.2.110.0100.04714.47
5.2.100.0030.05714.47
5.2.90.0030.05314.47
5.2.80.0130.04314.47
5.2.70.0070.06714.47
5.2.60.0170.05014.47
5.2.50.0030.06314.47
5.2.40.0070.04014.47
5.2.30.0030.03314.47
5.2.20.0100.05014.47
5.2.10.0100.04314.47
5.2.00.0000.04314.47
5.1.60.0030.05014.47
5.1.50.0030.03714.47
5.1.40.0100.04314.47
5.1.30.0100.05714.47
5.1.20.0130.03314.47
5.1.10.0030.03314.47
5.1.00.0030.05714.47
5.0.50.0000.02714.47
5.0.40.0030.02014.47
5.0.30.0000.07014.47
5.0.20.0030.04014.47
5.0.10.0070.02314.47
5.0.00.0030.06314.47
4.4.90.0000.03714.47
4.4.80.0000.02314.47
4.4.70.0030.01314.47
4.4.60.0070.01314.47
4.4.50.0030.03714.47
4.4.40.0000.05314.47
4.4.30.0000.03314.47
4.4.20.0000.03314.47
4.4.10.0030.03714.47
4.4.00.0070.05014.47
4.3.110.0070.03014.47
4.3.100.0070.03014.47
4.3.90.0000.03714.47
4.3.80.0000.05714.47
4.3.70.0000.02714.47
4.3.60.0000.03714.47
4.3.50.0070.03314.47
4.3.40.0030.05314.47
4.3.30.0000.03014.47
4.3.20.0000.03714.47
4.3.10.0070.03314.47
4.3.00.0000.03314.47

preferences:
34.9 ms | 401 KiB | 5 Q