3v4l.org

run code in 300+ PHP versions simultaneously
<?php class MonsterTalk { protected $namespace = "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.3.00.0060.00616.54
7.2.130.0120.00316.61
7.2.120.0030.01016.77
7.2.110.0000.00916.79
7.2.100.0060.00616.61
7.2.90.0060.00616.63
7.2.80.0070.00716.35
7.2.70.0090.00316.57
7.2.60.0060.00316.83
7.2.50.0080.00816.75
7.2.40.0170.00016.54
7.2.30.0100.01016.63
7.2.20.0030.01016.70
7.2.10.0120.00316.80
7.2.00.0090.00016.61
7.1.250.0070.00715.57
7.1.240.0040.00415.71
7.1.230.0000.01515.46
7.1.220.0030.01215.58
7.1.210.0050.00515.68
7.1.200.0040.00415.34
7.1.190.0060.00615.72
7.1.180.0100.00315.22
7.1.170.0070.00715.32
7.1.160.0080.00415.62
7.1.150.0030.01315.59
7.1.140.0140.01015.60
7.1.130.0090.00915.30
7.1.120.0030.00615.66
7.1.110.0060.00315.77
7.1.100.0030.01015.64
7.1.90.0110.00415.71
7.1.80.0030.00815.64
7.1.70.0050.00616.44
7.1.60.0050.01217.39
7.1.50.0090.01015.97
7.1.40.0030.00915.26
7.1.30.0060.00615.67
7.1.20.0070.00715.55
7.1.10.0100.00315.54
7.1.00.0070.03819.11
7.0.330.0030.00715.30
7.0.320.0030.00515.17
7.0.310.0060.00915.16
7.0.300.0030.00715.00
7.0.290.0080.00315.27
7.0.280.0040.00415.33
7.0.270.0000.01015.12
7.0.260.0040.00914.87
7.0.250.0030.00515.25
7.0.240.0000.00715.25
7.0.230.0000.01315.22
7.0.220.0000.00815.17
7.0.210.0040.00815.15
7.0.200.0030.00715.80
7.0.190.0130.00014.96
7.0.180.0080.00314.97
7.0.170.0030.00914.92
7.0.160.0040.00415.17
7.0.150.0000.00915.15
7.0.140.0020.04018.64
7.0.130.0070.00715.11
7.0.120.0070.00714.82
7.0.110.0030.00715.16
7.0.100.0070.00715.03
7.0.90.0180.05017.51
7.0.80.0150.03717.50
7.0.70.0050.03617.50
7.0.60.0180.03117.52
7.0.50.0030.05117.59
7.0.40.0070.04016.59
7.0.30.0110.03316.53
7.0.20.0030.05116.70
7.0.10.0050.03616.58
7.0.00.0000.03416.56
5.6.380.0040.01114.23
5.6.370.0060.00314.31
5.6.360.0030.00613.74
5.6.350.0070.00314.06
5.6.340.0060.00614.29
5.6.330.0030.01014.27
5.6.320.0070.00714.18
5.6.310.0090.00614.25
5.6.300.0040.01214.21
5.6.290.0040.00813.92
5.6.280.0020.04417.43
5.6.270.0110.00314.21
5.6.260.0040.01114.06
5.6.250.0030.00514.02
5.6.240.0110.02517.43
5.6.230.0080.04517.48
5.6.220.0060.04517.34
5.6.210.0030.02917.53
5.6.200.0050.03317.55
5.6.190.0090.02517.64
5.6.180.0050.04517.46
5.6.170.0050.02717.46
5.6.160.0070.04017.57
5.6.150.0050.04517.51
5.6.140.0080.04217.57
5.6.130.0150.04017.58
5.6.120.0080.04217.43
5.6.110.0030.03017.55
5.6.100.0100.02317.61
5.6.90.0110.02117.44
5.6.80.0070.02717.09
5.6.70.0080.02217.09
5.6.60.0140.04017.14
5.6.50.0070.04117.20
5.6.40.0070.04317.11
5.6.30.0100.03416.95
5.6.20.0060.02617.09
5.6.10.0060.02817.11
5.6.00.0090.02617.16
5.5.380.0030.03315.68
5.5.370.0050.03615.59
5.5.360.0050.03515.73
5.5.350.0100.03515.51
5.5.340.0050.04815.86
5.5.330.0120.03815.81
5.5.320.0100.02415.84
5.5.310.0110.03315.90
5.5.300.0080.04315.79
5.5.290.0050.02515.96
5.5.280.0080.04315.88
5.5.270.0080.03615.97
5.5.260.0050.04315.79
5.5.250.0040.03815.66
5.5.240.0050.04715.53
5.5.230.0100.04515.41
5.5.220.0100.04115.55
5.5.210.0070.04515.54
5.5.200.0080.03615.43
5.5.190.0070.02615.50
5.5.180.0120.03215.53
5.5.170.0050.00510.76
5.5.160.0140.02215.45
5.5.150.0090.01615.45
5.5.140.0020.03015.54
5.5.130.0070.01815.62
5.5.120.0100.02215.69
5.5.110.0030.02215.56
5.5.100.0140.03015.41
5.5.90.0110.03315.43
5.5.80.0050.03315.40
5.5.70.0040.02915.53
5.5.60.0050.02015.17
5.5.50.0030.02315.20
5.5.40.0100.01815.36
5.5.30.0080.04215.53
5.5.20.0060.02215.40
5.5.10.0070.03715.43
5.5.00.0020.02215.27
5.4.450.0070.02215.15
5.4.440.0070.03515.08
5.4.430.0060.03615.05
5.4.420.0040.02315.00
5.4.410.0100.03714.98
5.4.400.0050.02514.98
5.4.390.0060.02414.65
5.4.380.0050.03814.84
5.4.370.0090.03615.00
5.4.360.0060.02714.83
5.4.350.0090.03714.69
5.4.340.0140.02714.73
5.4.330.0130.00710.60
5.4.320.0070.02214.67
5.4.310.0020.02214.97
5.4.300.0050.03014.79
5.4.290.0110.03114.94
5.4.280.0030.02514.79
5.4.270.0040.02014.98
5.4.260.0030.02314.83
5.4.250.0050.02314.89
5.4.240.0060.02214.85
5.4.230.0080.02914.65
5.4.220.0050.02214.76
5.4.210.0110.03614.88
5.4.200.0050.03014.62
5.4.190.0080.03314.89
5.4.180.0130.04014.75
5.4.170.0100.02314.71
5.4.160.0100.01714.73
5.4.150.0060.02314.92
5.4.140.0050.02313.40
5.4.130.0020.02313.41
5.4.120.0050.01813.48
5.4.110.0110.02013.58
5.4.100.0050.02813.53
5.4.90.0050.02213.52
5.4.80.0100.03513.49
5.4.70.0130.01313.39
5.4.60.0040.04013.51
5.4.50.0090.03513.56
5.4.40.0100.03613.41
5.4.30.0130.03513.59
5.4.20.0030.03713.31
5.4.10.0050.02013.54
5.4.00.0110.03013.24
5.3.290.0060.02212.47
5.3.280.0050.03312.55
5.3.270.0030.02212.53
5.3.260.0070.02012.55
5.3.250.0060.03212.55
5.3.240.0020.02212.40
5.3.230.0070.02712.49
5.3.220.0080.03212.45
5.3.210.0090.04012.29
5.3.200.0090.02712.41
5.3.190.0070.03012.44
5.3.180.0030.04512.49
5.3.170.0020.02512.57
5.3.160.0090.03612.51
5.3.150.0080.01812.37
5.3.140.0070.02012.52
5.3.130.0030.02112.45
5.3.120.0020.02712.47
5.3.110.0050.02012.52
5.3.100.0070.03912.15
5.3.90.0030.04112.17
5.3.80.0030.02012.11
5.3.70.0050.03812.05
5.3.60.0070.03012.26
5.3.50.0070.03512.18
5.3.40.0050.02712.04
5.3.30.0070.03712.05
5.3.20.0090.03511.94
5.3.10.0030.02811.76
5.3.00.0070.02511.90
5.2.170.0070.03610.33
5.2.160.0050.01610.33
5.2.150.0050.02810.33
5.2.140.0050.03310.21
5.2.130.0060.02010.04
5.2.120.0050.03510.07
5.2.110.0050.02210.23
5.2.100.0010.01910.18
5.2.90.0010.01610.25
5.2.80.0070.01810.14
5.2.70.0060.01310.08
5.2.60.0090.02710.17
5.2.50.0030.02110.21
5.2.40.0080.03310.20
5.2.30.0050.02510.05
5.2.20.0070.02210.06
5.2.10.0070.0279.87
5.2.00.0000.02410.01
5.1.60.0020.0149.63
5.1.50.0040.0139.63
5.1.40.0080.0139.63
5.1.30.0080.0269.76
5.1.20.0050.0309.70
5.1.10.0050.0179.66
5.1.00.0030.0149.63
5.0.50.0000.0209.63
5.0.40.0060.0089.63
5.0.30.0020.0189.63
5.0.20.0080.0129.63
5.0.10.0030.0119.63
5.0.00.0040.0319.63
4.4.90.0080.0079.63
4.4.80.0030.0189.63
4.4.70.0000.0159.63
4.4.60.0040.0209.63
4.4.50.0010.0109.63
4.4.40.0050.0239.63
4.4.30.0020.0179.63
4.4.20.0000.0149.63
4.4.10.0030.0199.63
4.4.00.0030.0119.63
4.3.110.0010.0139.63
4.3.100.0050.0089.63
4.3.90.0030.0109.63
4.3.80.0070.0279.63
4.3.70.0020.0169.63
4.3.60.0020.0149.63
4.3.50.0030.0109.63
4.3.40.0040.0149.63
4.3.30.0040.0159.63
4.3.20.0030.0109.63
4.3.10.0030.0119.63
4.3.00.0020.0129.63

preferences:
57.31 ms | 400 KiB | 5 Q