3v4l.org

run code in 300+ PHP versions simultaneously
<?php class MonsterTalk { const VERSION = "1.0.1"; 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.4.00.0000.01115.04
7.3.120.0000.01114.60
7.3.110.0000.01114.96
7.3.100.0040.00814.69
7.3.90.0040.00714.82
7.3.80.0000.01114.48
7.3.70.0070.00414.83
7.3.60.0080.00314.61
7.3.50.0000.01014.72
7.3.40.0000.01114.39
7.3.30.0090.00314.70
7.3.20.0020.00916.54
7.3.10.0040.00916.43
7.3.00.0060.00616.47
7.2.250.0080.00414.78
7.2.240.0080.00414.92
7.2.230.0030.00915.02
7.2.220.0000.01114.96
7.2.210.0040.00814.72
7.2.200.0030.00714.55
7.2.190.0080.00414.50
7.2.180.0040.00814.77
7.2.170.0030.00914.75
7.2.160.0070.00414.59
7.2.150.0080.00416.37
7.2.140.0040.00816.73
7.2.130.0030.00816.49
7.2.120.0040.00916.66
7.2.110.0050.01116.75
7.2.100.0040.00716.73
7.2.90.0040.00716.59
7.2.80.0080.01016.39
7.2.70.0050.00716.56
7.2.60.0030.01116.55
7.2.50.0030.00916.46
7.2.40.0100.00416.54
7.2.30.0080.00316.68
7.2.20.0060.00916.57
7.2.10.0090.00716.68
7.2.00.0090.00717.45
7.1.330.0030.00815.65
7.1.320.0040.00715.49
7.1.310.0030.00715.48
7.1.300.0040.00715.26
7.1.290.0000.01015.72
7.1.280.0110.00015.70
7.1.270.0000.01115.59
7.1.260.0030.00715.29
7.1.250.0080.00415.59
7.1.240.0040.00415.62
7.1.230.0080.00315.67
7.1.220.0080.00315.52
7.1.210.0040.00715.54
7.1.200.0040.00615.53
7.1.190.0070.00415.40
7.1.180.0030.00715.53
7.1.170.0050.00515.71
7.1.160.0080.00315.61
7.1.150.0040.00715.64
7.1.140.0040.00715.39
7.1.130.0060.00615.53
7.1.120.0080.00315.57
7.1.110.0040.00715.84
7.1.100.0040.00716.66
7.1.90.0050.00515.44
7.1.80.0070.00415.25
7.1.70.0030.00616.16
7.1.60.0040.01417.41
7.1.50.0030.01316.20
7.1.40.0000.01115.75
7.1.30.0000.01115.57
7.1.20.0040.00715.68
7.1.10.0030.00615.61
7.1.00.0050.04018.86
7.0.330.0000.00915.45
7.0.320.0030.00315.18
7.0.310.0060.00314.95
7.0.300.0030.00715.35
7.0.290.0080.00315.03
7.0.280.0000.00715.39
7.0.270.0030.00715.26
7.0.260.0090.00314.99
7.0.250.0070.00315.29
7.0.240.0030.00815.13
7.0.230.0050.00515.29
7.0.220.0030.00715.21
7.0.210.0070.00315.10
7.0.200.0050.00415.79
7.0.190.0030.00715.17
7.0.180.0030.00715.38
7.0.170.0030.00815.14
7.0.160.0050.00515.03
7.0.150.0030.00715.43
7.0.140.0000.04118.61
7.0.130.0030.00715.15
7.0.120.0070.00415.43
7.0.110.0000.01014.98
7.0.100.0220.04817.46
7.0.90.0200.04517.65
7.0.80.0220.02317.68
7.0.70.0180.03817.53
7.0.60.0220.02717.63
7.0.50.0230.04217.92
7.0.40.0020.05216.68
7.0.30.0070.03816.54
7.0.20.0030.05016.61
7.0.10.0030.04516.66
7.0.00.0130.03816.47
5.6.400.0080.00314.05
5.6.390.0040.00714.29
5.6.380.0080.00414.45
5.6.370.0000.01114.06
5.6.360.0070.00313.82
5.6.350.0030.00714.08
5.6.340.0040.00714.12
5.6.330.0070.00414.33
5.6.320.0040.00713.83
5.6.310.0030.00814.16
5.6.300.0060.00614.08
5.6.290.0070.00414.06
5.6.280.0020.04117.49
5.6.270.0030.00714.27
5.6.260.0070.00413.85
5.6.250.0090.01917.39
5.6.240.0120.04017.38
5.6.230.0070.02317.38
5.6.220.0050.04417.45
5.6.210.0080.04317.33
5.6.200.0050.03617.62
5.6.190.0070.03917.56
5.6.180.0020.03817.58
5.6.170.0080.04517.47
5.6.160.0050.03017.55
5.6.150.0070.03017.41
5.6.140.0130.03917.58
5.6.130.0030.03517.53
5.6.120.0040.04717.63
5.6.110.0050.04717.55
5.6.100.0040.02017.47
5.6.90.0050.03917.59
5.6.80.0090.04217.25
5.6.70.0040.04717.33
5.6.60.0020.03017.30
5.6.50.0070.04017.26
5.6.40.0030.03617.23
5.6.30.0050.03217.16
5.6.20.0040.02417.28
5.6.10.0020.02417.20
5.6.00.0050.04117.22
5.5.380.0110.03217.17
5.5.370.0070.04417.22
5.5.360.0140.02817.28
5.5.350.0090.03617.17
5.5.340.0120.03717.20
5.5.330.0040.04917.43
5.5.320.0060.03517.48
5.5.310.0040.04917.56
5.5.300.0050.02817.44
5.5.290.0110.03817.41
5.5.280.0080.03617.36
5.5.270.0120.04217.42
5.5.260.0060.02317.42
5.5.250.0030.04917.40
5.5.240.0060.04117.00
5.5.230.0050.04717.13
5.5.220.0070.04416.93
5.5.210.0050.03517.10
5.5.200.0050.04217.00
5.5.190.0050.03216.79
5.5.180.0060.04016.99
5.5.170.0020.00913.73
5.5.160.0030.04417.14
5.5.150.0080.03717.09
5.5.140.0050.02816.91
5.5.130.0050.04017.04
5.5.120.0030.02217.16
5.5.110.0040.04516.99
5.5.100.0050.02217.16
5.5.90.0050.04217.02
5.5.80.0050.03816.95
5.5.70.0040.02117.03
5.5.60.0070.03617.15
5.5.50.0040.04317.10
5.5.40.0050.02217.08
5.5.30.0030.02317.04
5.5.20.0070.03216.97
5.5.10.0070.04417.03
5.5.00.0070.04517.10
5.4.450.0030.02615.51
5.4.440.0060.04215.58
5.4.430.0070.03915.56
5.4.420.0040.02515.47
5.4.410.0080.04015.49
5.4.400.0090.04115.40
5.4.390.0100.03715.31
5.4.380.0060.01815.34
5.4.370.0070.03915.44
5.4.360.0020.04415.46
5.4.350.0030.02315.44
5.4.340.0050.02515.44
5.4.330.0030.00511.75
5.4.320.0050.03815.40
5.4.310.0070.03915.30
5.4.300.0000.04115.44
5.4.290.0070.01715.44
5.4.280.0040.02415.45
5.4.270.0050.02915.39
5.4.260.0050.02415.42
5.4.250.0050.02415.43
5.4.240.0070.03515.39
5.4.230.0060.03515.47
5.4.220.0080.03715.39
5.4.210.0040.04015.34
5.4.200.0050.04115.35
5.4.190.0120.03015.39
5.4.180.0030.04115.39
5.4.170.0060.03315.49
5.4.160.0030.02515.38
5.4.150.0070.04215.38
5.4.140.0070.03714.08
5.4.130.0070.03714.02
5.4.120.0060.03114.07
5.4.110.0070.03714.11
5.4.100.0120.03414.14
5.4.90.0020.02214.13
5.4.80.0070.02814.06
5.4.70.0050.03414.12
5.4.60.0090.02514.06
5.4.50.0020.04114.11
5.4.40.0000.02414.13
5.4.30.0020.04214.02
5.4.20.0070.03614.11
5.4.10.0020.02514.03
5.4.00.0040.02913.78
5.3.290.0040.02913.26
5.3.280.0100.03513.17
5.3.270.0050.04213.14
5.3.260.0000.04713.16
5.3.250.0070.03913.24
5.3.240.0050.02913.17
5.3.230.0030.03913.20
5.3.220.0050.03713.13
5.3.210.0120.03313.17
5.3.200.0020.04213.19
5.3.190.0030.02413.17
5.3.180.0030.03713.13
5.3.170.0050.04013.14
5.3.160.0030.03913.22
5.3.150.0070.03713.12
5.3.140.0030.04213.12
5.3.130.0070.03713.18
5.3.120.0050.02613.16
5.3.110.0050.03613.13
5.3.100.0030.03112.94
5.3.90.0040.03412.95
5.3.80.0070.03712.84
5.3.70.0030.04012.90
5.3.60.0040.04012.92
5.3.50.0090.01912.89
5.3.40.0080.02712.91
5.3.30.0020.02312.90
5.3.20.0040.01912.69
5.3.10.0050.01812.74
5.3.00.0070.01712.74
5.2.170.0030.03311.37
5.2.160.0000.05311.37
5.2.150.0030.03011.37
5.2.140.0000.04011.37
5.2.130.0030.03311.37
5.2.120.0070.02311.37
5.2.110.0070.02711.37
5.2.100.0000.03311.37
5.2.90.0030.02711.37
5.2.80.0070.02711.37
5.2.70.0000.03011.37
5.2.60.0070.02311.37
5.2.50.0070.02311.37
5.2.40.0030.02311.37
5.2.30.0000.03311.37
5.2.20.0000.02711.37
5.2.10.0030.02711.37
5.2.00.0030.03711.37
5.1.60.0000.02711.37
5.1.50.0000.03011.37
5.1.40.0000.02711.37
5.1.30.0000.03011.37
5.1.20.0070.02711.37
5.1.10.0030.02311.37
5.1.00.0030.02311.37
5.0.50.0030.02011.37
5.0.40.0000.03311.37
5.0.30.0000.04011.37
5.0.20.0030.01711.37
5.0.10.0000.02011.37
5.0.00.0030.02711.37
4.4.90.0070.01011.37
4.4.80.0000.01711.37
4.4.70.0000.01711.37
4.4.60.0030.01311.37
4.4.50.0000.01711.37
4.4.40.0000.03011.37
4.4.30.0000.01711.37
4.4.20.0000.01311.37
4.4.10.0030.01311.37
4.4.00.0000.02311.37
4.3.110.0030.01311.37
4.3.100.0000.01711.37
4.3.90.0000.01711.37
4.3.80.0030.02311.37
4.3.70.0000.01311.37
4.3.60.0030.01311.37
4.3.50.0000.02011.37
4.3.40.0030.02011.37
4.3.30.0000.01711.37
4.3.20.0000.02011.37
4.3.10.0000.01711.37
4.3.00.0030.01311.37

preferences:
32.83 ms | 400 KiB | 5 Q