3v4l.org

run code in 300+ PHP versions simultaneously
<?php class MonsterTalk { function __construct($userId, $domainKey, $salt) { $this->userId = $userId; $this->domainKey = $domainKey; $this->salt = $salt; $this->token; $this->authorize(); } 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(); } 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.4.00.0070.01414.91
7.3.120.0060.01114.39
7.3.110.0080.00814.83
7.3.100.0030.01214.72
7.3.90.0000.01314.94
7.3.80.0000.00914.72
7.3.70.0060.00914.71
7.3.60.0090.00914.52
7.3.50.0110.00714.57
7.3.40.0150.00014.86
7.3.30.0060.00614.70
7.3.20.0110.00316.41
7.3.10.0120.00516.30
7.3.00.0070.01216.33
7.2.250.0120.00614.84
7.2.240.0100.01014.82
7.2.230.0000.01714.92
7.2.220.0040.00814.67
7.2.210.0060.00614.92
7.2.200.0040.01114.81
7.2.190.0030.01714.84
7.2.180.0100.01014.68
7.2.170.0070.00714.71
7.2.130.0160.01216.11
7.2.120.0150.00916.83
7.2.110.0130.01116.07
7.2.100.0200.00316.53
7.2.90.0150.00816.18
7.2.80.0150.00716.32
7.2.70.0100.01615.73
7.2.60.0180.00416.31
7.2.50.0200.00516.79
7.2.40.0100.00716.21
7.2.30.0160.00416.02
7.2.20.0140.00316.51
7.2.10.0200.00416.64
7.2.00.0090.00917.94
7.1.330.0070.00715.56
7.1.320.0060.00815.60
7.1.310.0090.00315.63
7.1.300.0060.00915.71
7.1.290.0070.01115.20
7.1.280.0030.01315.69
7.1.270.0080.00415.69
7.1.260.0090.00615.68
7.1.250.0090.00915.18
7.1.100.0130.00317.91
7.1.70.0030.01217.04
7.1.60.0110.01419.46
7.1.50.0120.01216.71
7.1.00.0100.07322.40
7.0.200.0050.00216.44
7.0.140.0070.07022.11
7.0.90.0170.07720.02
7.0.80.0100.04019.95
7.0.70.0030.06020.02
7.0.60.0070.04319.89
7.0.50.0070.05320.28
7.0.40.0000.04320.10
7.0.30.0100.03720.08
7.0.20.0070.03720.15
7.0.10.0030.06020.09
7.0.00.0100.04320.07
5.6.280.0000.07720.93
5.6.240.0100.06720.56
5.6.230.0070.04020.50
5.6.220.0100.04020.60
5.6.210.0000.04320.65
5.6.200.0000.04720.95
5.6.190.0070.04021.00
5.6.180.0030.04321.03
5.6.170.0070.04021.03
5.6.160.0130.03321.04
5.6.150.0030.04320.94
5.6.140.0070.04021.06
5.6.130.0100.04021.10
5.6.120.0100.07021.02
5.6.110.0000.04721.14
5.6.100.0070.07321.02
5.6.90.0030.07320.94
5.6.80.0000.09020.36
5.6.70.0130.04020.42
5.6.60.0000.07720.35
5.6.50.0030.07020.47
5.6.40.0070.08320.51
5.6.30.0070.08320.43
5.6.20.0070.05720.28
5.6.10.0100.04720.32
5.6.00.0000.08720.39
5.5.380.0030.04020.36
5.5.370.0000.04320.35
5.5.360.0000.04020.35
5.5.350.0030.04020.46
5.5.340.0030.04020.74
5.5.330.0030.04020.88
5.5.320.0070.04020.81
5.5.310.0000.04020.74
5.5.300.0030.04020.84
5.5.290.0030.05720.79
5.5.280.0000.04320.86
5.5.270.0070.04320.91
5.5.260.0170.06320.79
5.5.250.0130.07320.68
5.5.240.0030.06320.13
5.5.230.0070.06720.15
5.5.220.0070.06720.29
5.5.210.0030.08020.11
5.5.200.0170.07020.13
5.5.190.0100.07320.25
5.5.180.0030.08320.12
5.5.160.0100.05720.25
5.5.150.0030.05020.00
5.5.140.0170.05320.16
5.5.130.0130.07320.27
5.5.120.0000.08320.27
5.5.110.0070.07320.25
5.5.100.0130.07020.11
5.5.90.0070.07720.08
5.5.80.0030.08020.08
5.5.70.0100.04719.95
5.5.60.0030.07720.16
5.5.50.0100.07719.95
5.5.40.0000.05720.06
5.5.30.0100.06720.12
5.5.20.0030.08020.00
5.5.10.0100.07320.13
5.5.00.0100.09320.04
5.4.450.0070.03719.25
5.4.440.0000.04319.37
5.4.430.0070.03719.36
5.4.420.0030.03719.46
5.4.410.0030.08319.33
5.4.400.0100.07319.13
5.4.390.0070.07318.88
5.4.380.0070.05019.21
5.4.370.0070.06318.85
5.4.360.0000.07319.21
5.4.350.0100.07319.04
5.4.340.0070.05719.21
5.4.320.0130.06718.95
5.4.310.0130.06319.21
5.4.300.0070.07718.90
5.4.290.0030.05719.12
5.4.280.0070.08018.84
5.4.270.0130.06718.89
5.4.260.0030.07319.18
5.4.250.0100.07719.02
5.4.240.0070.07719.13
5.4.230.0030.04019.04
5.4.220.0130.07719.23
5.4.210.0130.06319.13
5.4.200.0100.08319.14
5.4.190.0030.07319.18
5.4.180.0100.07318.84
5.4.170.0070.07719.13
5.4.160.0130.05719.00
5.4.150.0030.08319.10
5.4.140.0030.06316.33
5.4.130.0100.05316.48
5.4.120.0200.05716.48
5.4.110.0070.03716.50
5.4.100.0000.05316.45
5.4.90.0130.03316.36
5.4.80.0070.05016.49
5.4.70.0100.07016.48
5.4.60.0070.03716.44
5.4.50.0000.05016.41
5.4.40.0100.07016.38
5.4.30.0130.05716.46
5.4.20.0170.06016.40
5.4.10.0070.05316.36
5.4.00.0000.08015.90
5.3.290.0070.07014.73
5.3.280.0070.07014.65
5.3.270.0070.05014.67
5.3.260.0070.07014.75
5.3.250.0070.07714.71
5.3.240.0070.07314.61
5.3.230.0070.07014.58
5.3.220.0130.06714.53
5.3.210.0070.04014.57
5.3.200.0100.05714.60
5.3.190.0100.07714.53
5.3.180.0070.07014.64
5.3.170.0030.06014.54
5.3.160.0000.08014.63
5.3.150.0100.08014.58
5.3.140.0030.04314.66
5.3.130.0030.05314.65
5.3.120.0100.07014.62
5.3.110.0000.07314.55
5.3.100.0000.04713.97
5.3.90.0070.03714.05
5.3.80.0030.05013.93
5.3.70.0070.03714.03
5.3.60.0000.07714.00
5.3.50.0030.04013.88
5.3.40.0070.08013.86
5.3.30.0100.06313.82
5.3.20.0030.07313.76
5.3.10.0030.07713.75
5.3.00.0070.03713.66
5.2.170.0100.05311.03
5.2.160.0000.06311.17
5.2.150.0100.03711.07
5.2.140.0100.05011.14
5.2.130.0070.05011.18
5.2.120.0070.05311.16
5.2.110.0130.05311.10
5.2.100.0100.05311.17
5.2.90.0030.03711.01
5.2.80.0070.06011.13
5.2.70.0070.04711.16
5.2.60.0000.06311.08
5.2.50.0030.05311.09
5.2.40.0100.05311.03
5.2.30.0000.07011.04
5.2.20.0070.03710.90
5.2.10.0030.06010.93
5.2.00.0030.06010.66
5.1.60.0070.03310.51
5.1.50.0030.05310.51
5.1.40.0030.05010.51
5.1.30.0000.06010.51
5.1.20.0030.05010.51
5.1.10.0000.06010.51
5.1.00.0030.05010.51
5.0.50.0000.02710.51
5.0.40.0000.04310.51
5.0.30.0070.06010.51
5.0.20.0030.04010.51
5.0.10.0030.03310.51
5.0.00.0030.05710.51
4.4.90.0030.02010.51
4.4.80.0000.02010.51
4.4.70.0000.03310.51
4.4.60.0030.03310.51
4.4.50.0000.02710.51
4.4.40.0000.05310.51
4.4.30.0070.02310.51
4.4.20.0000.01710.51
4.4.10.0000.01710.51
4.4.00.0070.02710.51
4.3.110.0030.03010.51
4.3.100.0000.03710.51
4.3.90.0000.03310.51
4.3.80.0000.05310.51
4.3.70.0030.02710.51
4.3.60.0000.03310.51
4.3.50.0000.03010.51
4.3.40.0030.05010.51
4.3.30.0030.03310.51
4.3.20.0000.03710.51
4.3.10.0000.03710.51
4.3.00.0000.03710.51

preferences:
42.57 ms | 400 KiB | 5 Q