3v4l.org

run code in 300+ PHP versions simultaneously
<?php class MonsterTalk { public function __construct($userId, $domainKey, $salt) { $this->userId = $userId; $this->domainKey = $domainKey; $this->salt = $salt; $this->token; $this->authorize(); } public function authorize() { if (!isset($_COOKIE["__dugalu_token"])){ $token = sha1($this->userId . "@" . $this->salt); $data = base64_encode('userId=' . $this->userId . "&domainKey=" . $this->domainKey . "&token=" . $token); echo $data; setcookie("__dugalu_auth", $data, time()+(60*60*24*30)); } else{ echo 'Existe el cookie'; } // $cookie = $this->genCookie(); } public function genCookie() { $token = sha1($this->userId . "@" . $this->privateKey); return $this->$name; } }

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.1.70.0030.00917.00
7.1.60.0030.01017.28
7.1.50.0090.00316.74
7.1.00.0000.07322.35
7.0.200.0000.00816.38
7.0.140.0100.06722.12
7.0.90.0070.08021.76
7.0.80.0100.06021.73
7.0.70.0070.04321.79
7.0.60.0070.07321.77
7.0.50.0030.08322.14
7.0.40.0030.07720.08
7.0.30.0070.08720.05
7.0.20.0100.08320.04
7.0.10.0130.07320.13
7.0.00.0100.05320.12
5.6.280.0000.07720.93
5.6.240.0070.08320.51
5.6.230.0130.07720.63
5.6.220.0130.05020.59
5.6.210.0070.06720.65
5.6.200.0070.08021.02
5.6.190.0030.05721.06
5.6.180.0070.08020.95
5.6.170.0070.08321.02
5.6.160.0030.05021.12
5.6.150.0130.08021.18
5.6.140.0130.03721.07
5.6.130.0070.08721.06
5.6.120.0000.08721.01
5.6.110.0070.08321.04
5.6.100.0200.07321.10
5.6.90.0070.04320.91
5.6.80.0070.03020.38
5.6.70.0100.05020.47
5.6.60.0030.04320.44
5.6.50.0070.05020.41
5.6.40.0130.03020.41
5.6.30.0070.04020.39
5.6.20.0030.03720.53
5.6.10.0070.07020.53
5.6.00.0030.03720.36
5.5.380.0030.07320.42
5.5.370.0000.08720.50
5.5.360.0070.05720.54
5.5.350.0030.08020.42
5.5.340.0000.06720.89
5.5.330.0130.07320.79
5.5.320.0000.08320.66
5.5.310.0170.07020.95
5.5.300.0030.08320.62
5.5.290.0030.07720.77
5.5.280.0170.08020.90
5.5.270.0070.08320.81
5.5.260.0030.06020.65
5.5.250.0030.04320.71
5.5.240.0070.04320.32
5.5.230.0070.04320.20
5.5.220.0100.04720.27
5.5.210.0070.04020.30
5.5.200.0000.05020.10
5.5.190.0000.04320.13
5.5.180.0100.06720.29
5.5.160.0030.06320.27
5.5.150.0070.05720.23
5.5.140.0030.06320.12
5.5.130.0000.03720.29
5.5.120.0070.03720.15
5.5.110.0070.03320.11
5.5.100.0000.04720.09
5.5.90.0070.04020.11
5.5.80.0030.06320.04
5.5.70.0070.03320.09
5.5.60.0070.03320.04
5.5.50.0070.03020.09
5.5.40.0070.05320.04
5.5.30.0070.03720.00
5.5.20.0100.04320.17
5.5.10.0000.04020.11
5.5.00.0000.03720.04
5.4.450.0070.07719.38
5.4.440.0000.06319.18
5.4.430.0100.07719.20
5.4.420.0070.05019.35
5.4.410.0030.04319.23
5.4.400.0000.06019.05
5.4.390.0070.03719.04
5.4.380.0000.04319.03
5.4.370.0070.04319.13
5.4.360.0030.04719.03
5.4.350.0030.03719.13
5.4.340.0070.03319.09
5.4.320.0070.03019.16
5.4.310.0030.03718.91
5.4.300.0030.04019.13
5.4.290.0030.03719.20
5.4.280.0030.06319.20
5.4.270.0100.05718.84
5.4.260.0000.03719.04
5.4.250.0030.03718.87
5.4.240.0000.04019.13
5.4.230.0030.03719.11
5.4.220.0030.03719.20
5.4.210.0030.03719.24
5.4.200.0070.03318.95
5.4.190.0030.03319.09
5.4.180.0030.03718.86
5.4.170.0030.04018.84
5.4.160.0030.05319.09
5.4.150.0030.05019.10
5.4.140.0030.03016.18
5.4.130.0030.03016.44
5.4.120.0000.04316.39
5.4.110.0000.03316.48
5.4.100.0000.04716.45
5.4.90.0070.03316.28
5.4.80.0030.04316.42
5.4.70.0000.03716.48
5.4.60.0030.03316.48
5.4.50.0070.04716.40
5.4.40.0030.03716.52
5.4.30.0030.05316.38
5.4.20.0030.07716.47
5.4.10.0070.07016.47
5.4.00.0030.05315.83
5.3.290.0000.04014.60
5.3.280.0100.03014.55
5.3.270.0030.04314.71
5.3.260.0070.04014.74
5.3.250.0030.04014.70
5.3.240.0030.03714.62
5.3.230.0000.04314.63
5.3.220.0030.04014.65
5.3.210.0030.03714.54
5.3.200.0030.03714.63
5.3.190.0030.03714.67
5.3.180.0030.03014.50
5.3.170.0000.03714.55
5.3.160.0000.04014.55
5.3.150.0000.07714.56
5.3.140.0070.06314.55
5.3.130.0000.08014.49
5.3.120.0030.08014.50
5.3.110.0030.08314.66
5.3.100.0070.07714.15
5.3.90.0000.04314.00
5.3.80.0070.07314.08
5.3.70.0100.04313.95
5.3.60.0130.05714.08
5.3.50.0000.07014.02
5.3.40.0100.06713.98
5.3.30.0030.07313.98
5.3.20.0000.05713.63
5.3.10.0070.04713.77
5.3.00.0030.07713.71
5.2.170.0070.06311.21
5.2.160.0000.06011.20
5.2.150.0030.04711.25
5.2.140.0070.05711.24
5.2.130.0000.05711.03
5.2.120.0100.05311.17
5.2.110.0070.05311.19
5.2.100.0100.04011.24
5.2.90.0030.06311.17
5.2.80.0070.06311.15
5.2.70.0030.04311.13
5.2.60.0100.05711.09
5.2.50.0070.05311.05
5.2.40.0030.06011.03
5.2.30.0000.05310.89
5.2.20.0070.05310.90
5.2.10.0030.05310.93
5.2.00.0000.03710.77
5.1.60.0000.05310.29
5.1.50.0000.04010.29
5.1.40.0030.05310.29
5.1.30.0000.03010.40
5.1.20.0070.05710.29
5.1.10.0030.05010.29
5.1.00.0000.05710.29
5.0.50.0070.03010.29
5.0.40.0070.03010.29
5.0.30.0030.05710.29
5.0.20.0030.04010.29
5.0.10.0000.04710.29
5.0.00.0100.04710.29
4.4.90.0000.01710.29
4.4.80.0000.03710.29
4.4.70.0030.02310.29
4.4.60.0000.03010.29
4.4.50.0030.02010.29
4.4.40.0000.03010.29
4.4.30.0030.02710.29
4.4.20.0000.03310.29
4.4.10.0000.02710.29
4.4.00.0030.04310.29
4.3.110.0030.03010.29
4.3.100.0000.03010.29
4.3.90.0000.03710.29
4.3.80.0000.05010.29
4.3.70.0000.03310.29
4.3.60.0000.03310.29
4.3.50.0000.02710.29
4.3.40.0000.05010.29
4.3.30.0000.02310.29
4.3.20.0000.03310.29
4.3.10.0000.02310.29
4.3.00.0000.03310.29

preferences:
40.59 ms | 401 KiB | 5 Q