3v4l.org

run code in 300+ PHP versions simultaneously
<?php class MonsterTalk { protected $namespace = "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.10.0060.01014.76
7.4.00.0040.01414.81
7.3.130.0090.00614.46
7.3.120.0070.01014.42
7.3.110.0060.00914.90
7.3.100.0030.01014.75
7.3.90.0060.00314.62
7.3.80.0070.00714.92
7.3.70.0070.00714.45
7.3.60.0070.00414.70
7.3.50.0040.01114.43
7.3.40.0030.01014.29
7.3.30.0000.01314.67
7.3.20.0030.00916.44
7.3.10.0080.00316.30
7.3.00.0000.01316.56
7.2.260.0120.00815.13
7.2.250.0080.00314.93
7.2.240.0070.00715.02
7.2.230.0090.00614.81
7.2.220.0090.00614.84
7.2.210.0070.00714.95
7.2.200.0130.00314.59
7.2.190.0060.00614.79
7.2.180.0100.00314.70
7.2.170.0000.01414.86
7.2.160.0060.00314.86
7.2.150.0060.00916.91
7.2.140.0030.00916.46
7.2.130.0060.00316.80
7.2.120.0090.00016.75
7.2.110.0270.00816.38
7.2.100.0090.00316.64
7.2.90.0070.01016.92
7.2.80.0120.00316.74
7.2.70.0100.01016.86
7.2.60.0080.00716.76
7.2.50.0060.00316.86
7.2.40.0080.00516.77
7.2.30.0120.00016.75
7.2.20.0040.01116.69
7.2.10.0060.00316.56
7.2.00.0020.00817.96
7.1.330.0120.00315.41
7.1.320.0040.00815.37
7.1.310.0000.01115.57
7.1.300.0060.00615.41
7.1.290.0100.00315.58
7.1.280.0060.00915.62
7.1.270.0070.00715.57
7.1.260.0070.00715.66
7.1.250.0060.00315.54
7.1.240.0030.01015.28
7.1.230.0000.00915.63
7.1.220.0040.01115.76
7.1.210.0090.00015.47
7.1.200.0050.00915.63
7.1.190.0060.01315.61
7.1.180.0000.01315.58
7.1.170.0040.00415.46
7.1.160.0060.00915.30
7.1.150.0070.00715.68
7.1.140.0100.00315.39
7.1.130.0040.00415.60
7.1.120.0040.00915.44
7.1.110.0100.00315.41
7.1.100.0050.00616.73
7.1.90.0030.01015.53
7.1.80.0030.00915.54
7.1.70.0050.00516.34
7.1.60.0050.01317.46
7.1.50.0070.00616.13
7.1.40.0040.00815.47
7.1.30.0080.00815.44
7.1.20.0100.00315.44
7.1.10.0000.01315.49
7.1.00.0050.04018.98
7.0.330.0100.00315.15
7.0.320.0000.00815.12
7.0.310.0000.01414.95
7.0.300.0030.00615.37
7.0.290.0080.00515.36
7.0.280.0040.00415.24
7.0.270.0040.00415.27
7.0.260.0060.00314.96
7.0.250.0040.00715.39
7.0.240.0030.00915.41
7.0.230.0000.01215.02
7.0.220.0060.00615.37
7.0.210.0130.00015.29
7.0.200.0010.00815.92
7.0.190.0100.00315.34
7.0.180.0080.00515.22
7.0.170.0100.00615.35
7.0.160.0050.00315.17
7.0.150.0040.01115.18
7.0.140.0020.04018.64
7.0.130.0060.00615.43
7.0.120.0110.00415.44
7.0.110.0090.00915.22
7.0.100.0050.04817.55
7.0.90.0070.03817.53
7.0.80.0070.04217.57
7.0.70.0150.04417.50
7.0.60.0170.02817.54
7.0.50.0050.04217.86
7.0.40.0080.03516.69
7.0.30.0100.04116.60
7.0.20.0050.04216.68
7.0.10.0030.04516.71
7.0.00.0130.03516.71
5.6.400.0110.00414.00
5.6.390.0060.00314.31
5.6.380.0050.00514.32
5.6.370.0070.01114.13
5.6.360.0030.01014.25
5.6.350.0070.00314.41
5.6.340.0030.00614.22
5.6.330.0060.00613.80
5.6.320.0040.01114.35
5.6.310.0030.01013.83
5.6.300.0030.01013.94
5.6.290.0000.00814.28
5.6.280.0100.03517.42
5.6.270.0040.01114.00
5.6.260.0070.01014.24
5.6.250.0070.02817.46
5.6.240.0110.03717.50
5.6.230.0080.04217.26
5.6.220.0050.03517.56
5.6.210.0050.02517.35
5.6.200.0090.02517.52
5.6.190.0080.04517.56
5.6.180.0070.03517.55
5.6.170.0030.03417.62
5.6.160.0090.04217.42
5.6.150.0090.03917.56
5.6.140.0030.04917.53
5.6.130.0080.04317.54
5.6.120.0050.04217.56
5.6.110.0070.04317.50
5.6.100.0150.02717.59
5.6.90.0100.04217.46
5.6.80.0070.02217.19
5.6.70.0070.03017.29
5.6.60.0100.04017.24
5.6.50.0100.04017.24
5.6.40.0070.04217.18
5.6.30.0100.02917.40
5.6.20.0080.03617.31
5.6.10.0080.04317.28
5.6.00.0080.03017.18
5.5.380.0100.04017.22
5.5.370.0050.04517.29
5.5.360.0070.04017.08
5.5.350.0040.03017.13
5.5.340.0110.04017.46
5.5.330.0070.04717.36
5.5.320.0080.02817.54
5.5.310.0070.04217.24
5.5.300.0100.04317.41
5.5.290.0050.04817.21
5.5.280.0090.04117.38
5.5.270.0030.04817.42
5.5.260.0090.04017.35
5.5.250.0070.04417.27
5.5.240.0050.03717.08
5.5.230.0130.03217.09
5.5.220.0090.03517.16
5.5.210.0070.04417.03
5.5.200.0070.02716.94
5.5.190.0070.03917.17
5.5.180.0020.03916.96
5.5.170.0030.01013.78
5.5.160.0070.03916.96
5.5.150.0110.02117.04
5.5.140.0130.02817.06
5.5.130.0070.04117.17
5.5.120.0070.03016.88
5.5.110.0080.04416.94
5.5.100.0080.04316.90
5.5.90.0070.04017.01
5.5.80.0080.04016.92
5.5.70.0050.03216.96
5.5.60.0090.02017.06
5.5.50.0050.02417.14
5.5.40.0050.02017.00
5.5.30.0040.02417.11
5.5.20.0020.02816.82
5.5.10.0090.01916.86
5.5.00.0050.02217.05
5.4.450.0040.03815.14
5.4.440.0090.03515.07
5.4.430.0090.03015.13
5.4.420.0120.02815.03
5.4.410.0080.03715.06
5.4.400.0050.03514.99
5.4.390.0040.03714.91
5.4.380.0090.02814.92
5.4.370.0060.02214.92
5.4.360.0000.03614.91
5.4.350.0050.04014.82
5.4.340.0050.02914.82
5.4.330.0060.00610.84
5.4.320.0110.03714.91
5.4.310.0070.03814.83
5.4.300.0050.04714.91
5.4.290.0030.04514.96
5.4.280.0000.02914.97
5.4.270.0050.03014.98
5.4.260.0090.04214.99
5.4.250.0060.04014.97
5.4.240.0060.03514.99
5.4.230.0020.04215.01
5.4.220.0020.02814.98
5.4.210.0100.02014.84
5.4.200.0050.02414.92
5.4.190.0020.03214.94
5.4.180.0050.02714.84
5.4.170.0030.02014.91
5.4.160.0030.02214.97
5.4.150.0030.02214.95
5.4.140.0020.02713.58
5.4.130.0060.01813.55
5.4.120.0050.02113.57
5.4.110.0030.02013.58
5.4.100.0050.02213.66
5.4.90.0020.02313.56
5.4.80.0020.02113.65
5.4.70.0020.02113.63
5.4.60.0030.01813.62
5.4.50.0030.02613.56
5.4.40.0050.01913.67
5.4.30.0020.02413.63
5.4.20.0030.02013.63
5.4.10.0070.02013.60
5.4.00.0050.02213.30
5.3.290.0100.03812.76
5.3.280.0050.02212.75
5.3.270.0030.01812.76
5.3.260.0050.02112.72
5.3.250.0020.02512.76
5.3.240.0030.02212.72
5.3.230.0030.03312.73
5.3.220.0030.02712.72
5.3.210.0050.02112.74
5.3.200.0030.02112.72
5.3.190.0060.02412.72
5.3.180.0050.02012.72
5.3.170.0040.01812.72
5.3.160.0030.02112.75
5.3.150.0030.02112.73
5.3.140.0030.02212.72
5.3.130.0020.02212.72
5.3.120.0050.01712.72
5.3.110.0020.02212.72
5.3.100.0030.02512.72
5.3.90.0020.02312.72
5.3.80.0010.02412.72
5.3.70.0010.02112.72
5.3.60.0050.01812.72
5.3.50.0030.02212.72
5.3.40.0020.02212.72
5.3.30.0030.02312.72
5.3.20.0050.02012.72
5.3.10.0060.01612.72
5.3.00.0030.02312.72
5.2.170.0000.03314.66
5.2.160.0030.02714.66
5.2.150.0030.03014.66
5.2.140.0030.02714.66
5.2.130.0030.02714.66
5.2.120.0000.03314.66
5.2.110.0030.02314.66
5.2.100.0070.06014.66
5.2.90.0070.04714.66
5.2.80.0030.05714.66
5.2.70.0070.06014.66
5.2.60.0000.06014.66
5.2.50.0230.04014.66
5.2.40.0070.06014.66
5.2.30.0030.06314.66
5.2.20.0100.05314.66
5.2.10.0030.06314.66
5.2.00.0030.06014.66
5.1.60.0070.05014.66
5.1.50.0130.04314.66
5.1.40.0170.04014.66
5.1.30.0070.05314.66
5.1.20.0030.05314.66
5.1.10.0070.05014.66
5.1.00.0070.05314.66
5.0.50.0070.04014.66
5.0.40.0030.04714.66
5.0.30.0030.06714.66
5.0.20.0000.03014.66
5.0.10.0100.03314.66
5.0.00.0030.06314.66
4.4.90.0000.02714.66
4.4.80.0000.01714.66
4.4.70.0030.03314.66
4.4.60.0000.03714.66
4.4.50.0030.03714.66
4.4.40.0030.05314.66
4.4.30.0000.03314.66
4.4.20.0000.02314.66
4.4.10.0100.03014.66
4.4.00.0000.04714.66
4.3.110.0000.03714.66
4.3.100.0000.03714.66
4.3.90.0130.02714.66
4.3.80.0030.05714.66
4.3.70.0100.02714.66
4.3.60.0030.03314.66
4.3.50.0070.03314.66
4.3.40.0030.05014.66
4.3.30.0000.02314.66
4.3.20.0030.03014.66
4.3.10.0000.03714.66
4.3.00.0000.03714.66

preferences:
40.2 ms | 400 KiB | 5 Q