3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Authenticator { protected $isloggedin; protected $session; public function __construct(Session $session) { $this->session = $session; if ( ! empty($session->get('isloggedin')) && $session->get('isloggedin') == true) { //$isl = $session->get('isloggedin'); //if ( ! empty($isl) && $isl == true) { $this->isloggedin = true; } } } interface Session { public function set($key, $val=true); public function get($key); } class BasicSession implements Session { protected $session = array(); public function __construct() { if ( ! session_start() ) { throw new Exception('Could not initiate web session'); } $this->session = $_SESSION; } public function set($key, $val=true) { $this->session[$key] = $val; } public function get($key) { if (isset($this->session[$key])) { return $this->session[$key]; } return false; } } try { $sess = new BasicSession(); $auth = new Authenticator($sess); } catch (Exception $e) { die('System go KA-BOOM! ' . $e->getMessage()); }

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)
8.3.60.0120.00318.33
8.3.50.0070.00921.21
8.3.40.0150.00019.09
8.3.30.0200.00019.35
8.3.20.0080.00020.16
8.3.10.0000.00722.22
8.3.00.0070.00022.42
8.2.180.0110.01116.75
8.2.170.0040.01122.96
8.2.160.0110.00319.37
8.2.150.0000.00824.18
8.2.140.0040.00424.66
8.2.130.0110.00026.16
8.2.120.0080.00019.66
8.2.110.0000.00920.60
8.2.100.0080.00417.85
8.2.90.0040.00418.25
8.2.80.0060.00319.53
8.2.70.0060.00317.63
8.2.60.0030.00617.93
8.2.50.0000.00918.07
8.2.40.0060.00318.16
8.2.30.0060.00318.29
8.2.20.0080.00017.80
8.2.10.0050.00217.83
8.2.00.0060.00317.72
8.1.280.0070.01425.92
8.1.270.0050.00322.17
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0030.00722.33
8.1.230.0070.00420.95
8.1.220.0000.00917.78
8.1.210.0080.00018.82
8.1.200.0030.00617.36
8.1.190.0040.00417.53
8.1.180.0030.00618.73
8.1.170.0030.00718.68
8.1.160.0040.00422.11
8.1.150.0000.00718.68
8.1.140.0040.00417.42
8.1.130.0000.00717.78
8.1.120.0040.00417.47
8.1.110.0000.00817.37
8.1.100.0000.00717.46
8.1.90.0030.00617.52
8.1.80.0030.00517.48
8.1.70.0040.00417.47
8.1.60.0100.00017.65
8.1.50.0040.00417.57
8.1.40.0080.00017.50
8.1.30.0030.00617.67
8.1.20.0090.00017.64
8.1.10.0030.00617.54
8.1.00.0000.00817.64
8.0.300.0070.00020.12
8.0.290.0040.00417.18
8.0.280.0000.00718.52
8.0.270.0030.00317.26
8.0.260.0030.00316.95
8.0.250.0030.00317.12
8.0.240.0030.00616.93
8.0.230.0030.00317.11
8.0.220.0070.00016.98
8.0.210.0030.00316.86
8.0.200.0040.00417.02
8.0.190.0030.00717.03
8.0.180.0040.00417.07
8.0.170.0030.00516.94
8.0.160.0060.00317.00
8.0.150.0000.00816.91
8.0.140.0000.00816.91
8.0.130.0000.00613.38
8.0.120.0040.00416.95
8.0.110.0000.00817.03
8.0.100.0070.00016.89
8.0.90.0000.00716.98
8.0.80.0030.01316.96
8.0.70.0070.00016.96
8.0.60.0000.00816.98
8.0.50.0060.00317.07
8.0.30.0140.00416.98
8.0.20.0100.00917.40
8.0.10.0040.00417.04
8.0.00.0090.00816.98
7.4.330.0040.00015.00
7.4.320.0040.00416.64
7.4.300.0000.00616.61
7.4.290.0030.00316.61
7.4.280.0000.00716.67
7.4.270.0040.00416.47
7.4.260.0050.00316.58
7.4.250.0040.00416.40
7.4.240.0030.00416.59
7.4.230.0040.00416.42
7.4.220.0060.01216.57
7.4.210.0080.00716.51
7.4.200.0070.00016.52
7.4.190.0050.00216.69
7.4.160.0090.00916.54
7.4.150.0120.00917.40
7.4.140.0110.00817.86
7.4.130.0140.00516.59
7.4.120.0070.01016.46
7.4.110.0110.00716.63
7.4.100.0090.01516.39
7.4.90.0130.00416.43
7.4.80.0090.00919.39
7.4.70.0140.00816.43
7.4.60.0030.01216.45
7.4.50.0030.00616.50
7.4.40.0090.00622.77
7.4.30.0100.00616.68
7.4.00.0000.01815.09
7.3.330.0000.00613.29
7.3.320.0030.00313.39
7.3.310.0040.00416.44
7.3.300.0040.00416.15
7.3.290.0040.01316.36
7.3.280.0090.00716.35
7.3.270.0100.00717.40
7.3.260.0090.00616.58
7.3.250.0070.01016.51
7.3.240.0150.00916.62
7.3.230.0060.01116.39
7.3.210.0140.00316.39
7.3.200.0110.00619.39
7.3.190.0110.00716.41
7.3.180.0070.01016.55
7.3.170.0140.00716.58
7.3.160.0080.00816.32
7.3.120.0090.00314.97
7.3.10.0110.00416.43
7.3.00.0110.00216.36
7.2.330.0080.01116.71
7.2.320.0150.00316.66
7.2.310.0080.00816.44
7.2.300.0100.00716.70
7.2.290.0080.00816.91
7.2.130.0070.01016.58
7.2.120.0040.01316.72
7.2.110.0090.00716.46
7.2.100.0110.00716.19
7.2.90.0100.00316.55
7.2.80.0100.00916.61
7.2.70.0050.00816.69
7.2.60.0070.00716.82
7.2.50.0100.01016.82
7.2.40.0120.00616.43
7.2.30.0140.00516.65
7.2.20.0120.00816.56
7.2.10.0160.00416.64
7.2.00.0110.00817.85
7.1.250.0080.00915.44
7.1.240.0090.00615.61
7.1.230.0090.00315.54
7.1.220.0090.00615.76
7.1.210.0030.00915.88
7.1.200.0000.01315.66
7.1.190.0140.00315.84
7.1.180.0070.00715.76
7.1.170.0060.01015.59
7.1.160.0060.00915.64
7.1.150.0090.00315.70
7.1.140.0070.00315.68
7.1.130.0030.01015.69
7.1.120.0000.01415.70
7.1.110.0040.00415.70
7.1.100.0050.00816.80
7.1.90.0090.00515.75
7.1.80.0040.01115.72
7.1.70.0020.01216.49
7.1.60.0100.00917.77
7.1.50.0020.00916.32
7.1.40.0040.00415.65
7.1.30.0060.01015.64
7.1.20.0040.00815.63
7.1.10.0110.00315.40
7.1.00.0040.02119.00
7.0.330.0060.00315.13
7.0.320.0070.00715.32
7.0.310.0110.00315.48
7.0.300.0030.00715.43
7.0.290.0030.00715.17
7.0.280.0060.00315.38
7.0.270.0070.00715.36
7.0.260.0040.00414.89
7.0.250.0110.00015.25
7.0.240.0040.01015.28
7.0.230.0100.00315.03
7.0.220.0110.00315.38
7.0.210.0090.00615.49
7.0.200.0030.00616.10
7.0.190.0000.01115.36
7.0.180.0040.00815.35
7.0.170.0140.00015.41
7.0.160.0040.00815.43
7.0.150.0090.00615.43
7.0.140.0020.04418.59
7.0.130.0100.00715.45
7.0.120.0030.00915.36
7.0.110.0060.02217.68
7.0.100.0020.02717.46
7.0.90.0080.02017.63
7.0.80.0040.02717.58
7.0.70.0210.01917.56
7.0.60.0080.02017.73
7.0.50.0050.02717.62
7.0.40.0030.02116.66
7.0.30.0060.03116.53
7.0.20.0030.02216.45
7.0.10.0070.03516.55
7.0.00.0030.02516.51
5.6.380.0060.00314.41
5.6.370.0160.00614.71
5.6.360.0110.01114.65
5.6.350.0140.00714.28
5.6.340.0070.01814.13
5.6.330.0130.00714.19
5.6.320.0140.00514.48
5.6.310.0110.01114.44
5.6.300.0130.01014.31
5.6.290.0140.00614.38
5.6.280.0120.03817.84
5.6.270.0200.00014.38
5.6.260.0060.02417.58
5.6.250.0060.02217.44
5.6.240.0060.03817.65
5.6.230.0090.02417.51
5.6.220.0080.02417.68
5.6.210.0100.02117.53
5.6.200.0110.02317.39
5.6.190.0090.02117.66
5.6.180.0090.02817.57
5.6.170.0050.02817.42
5.6.160.0050.02217.57
5.6.150.0090.02017.48
5.6.140.0070.03217.41
5.6.130.0120.03317.56
5.6.120.0170.01617.48
5.6.110.0070.03617.56
5.6.100.0160.01917.46
5.6.90.0020.04217.53
5.6.80.0020.02717.17
5.6.70.0050.02417.13
5.6.60.0110.03717.21
5.6.50.0060.02617.13
5.6.40.0090.02217.11
5.6.30.0070.02017.07
5.6.20.0090.02517.13
5.6.10.0050.02217.16
5.6.00.0130.01317.13
5.5.380.0070.03014.35
5.5.370.0050.02314.49
5.5.360.0040.02314.49
5.5.350.0070.02714.38
5.5.340.0020.02514.66
5.5.330.0080.02214.54
5.5.320.0050.02014.64
5.5.310.0040.02014.54
5.5.300.0060.02714.63
5.5.290.0070.03014.85
5.5.280.0030.02814.63
5.5.270.0080.02014.63
5.5.260.0080.02014.78
5.5.250.0060.02414.63
5.5.240.0020.02314.25
5.5.230.0090.03314.23
5.5.220.0040.02814.40
5.5.210.0040.03114.33
5.5.200.0120.02214.34
5.5.190.0060.02614.31
5.5.180.0070.03914.24
5.5.170.0120.00011.33
5.5.160.0060.02314.41
5.5.150.0070.03914.32
5.5.140.0090.02014.38
5.5.130.0140.02714.33
5.5.120.0100.01714.36
5.5.110.0080.02214.38
5.5.100.0120.01814.16
5.5.90.0050.02514.24
5.5.80.0050.02214.26
5.5.70.0020.02914.25
5.5.60.0040.02714.34
5.5.50.0030.02214.16
5.5.40.0080.02214.35
5.5.30.0020.02014.26
5.5.20.0100.02814.21
5.5.10.0060.03514.24
5.5.00.0100.03214.24
5.4.450.0060.02315.38
5.4.440.0040.02215.25
5.4.430.0050.02315.33
5.4.420.0080.01915.42
5.4.410.0040.02915.18
5.4.400.0040.02015.16
5.4.390.0000.02915.12
5.4.380.0050.02315.24
5.4.370.0090.01715.18
5.4.360.0050.02215.06
5.4.350.0150.01815.18
5.4.340.0120.01715.09
5.4.330.0150.00811.18
5.4.320.0120.03415.26
5.4.310.0110.02015.25
5.4.300.0120.03215.24
5.4.290.0120.03415.24
5.4.280.0230.01815.06
5.4.270.0120.01915.13
5.4.260.0100.02515.06
5.4.250.0120.02215.20
5.4.240.0200.01715.16
5.4.230.0100.01815.08
5.4.220.0090.02015.21
5.4.210.0200.03315.24
5.4.200.0080.02015.16
5.4.190.0120.02015.07
5.4.180.0100.01815.22
5.4.170.0180.01715.25
5.4.160.0090.01815.09
5.4.150.0150.01715.20
5.4.140.0130.01813.88
5.4.130.0120.02213.83
5.4.120.0180.02013.78
5.4.110.0150.02313.88
5.4.100.0120.02313.75
5.4.90.0100.01713.74
5.4.80.0020.02013.81
5.4.70.0040.01813.82
5.4.60.0080.01813.86
5.4.50.0150.01713.85
5.4.40.0080.01813.90
5.4.30.0020.02113.82
5.4.20.0050.02513.80
5.4.10.0050.01813.75
5.4.00.0050.01813.53
5.3.290.0140.02712.96
5.3.280.0160.01712.93
5.3.270.0270.01712.89
5.3.260.0080.01812.96
5.3.250.0140.02512.88
5.3.240.0120.02512.94
5.3.230.0110.02412.88
5.3.220.0090.01512.88
5.3.210.0140.02112.91
5.3.200.0160.02012.88
5.3.190.0050.01812.80
5.3.180.0030.02212.87
5.3.170.0030.01912.94
5.3.160.0100.02012.87
5.3.150.0120.02212.91
5.3.140.0050.01912.90
5.3.130.0070.01712.79
5.3.120.0020.02212.84
5.3.110.0060.01812.85
5.3.100.0040.01712.65
5.3.90.0030.02212.61
5.3.80.0050.01812.63
5.3.70.0050.01512.72
5.3.60.0000.02312.62
5.3.50.0050.01812.56
5.3.40.0000.02112.56
5.3.30.0030.01712.53
5.3.20.0040.01812.44
5.3.10.0070.02012.46
5.3.00.0120.01412.33
5.2.170.0040.01311.56
5.2.160.0020.01611.56
5.2.150.0030.01311.56
5.2.140.0000.01611.56
5.2.130.0110.00811.56
5.2.120.0070.01511.56
5.2.110.0100.01411.56
5.2.100.0050.01311.56
5.2.90.0020.01411.56
5.2.80.0040.01511.56
5.2.70.0040.01711.56
5.2.60.0020.01811.56
5.2.50.0050.01611.56
5.2.40.0100.00811.56
5.2.30.0070.01511.56
5.2.20.0050.01711.56
5.2.10.0060.01311.56
5.2.00.0010.01511.56
5.1.60.0030.01011.56
5.1.50.0000.01511.56
5.1.40.0060.01111.56
5.1.30.0000.01511.56
5.1.20.0050.01211.56
5.1.10.0060.01211.56
5.1.00.0040.01011.56
5.0.50.0040.00711.56
5.0.40.0030.00811.56
5.0.30.0020.01511.56
5.0.20.0020.00811.56
5.0.10.0010.01111.56
5.0.00.0060.01311.56
4.4.90.0000.01011.56
4.4.80.0000.01111.56
4.4.70.0000.01011.56
4.4.60.0000.00911.56
4.4.50.0060.00511.56
4.4.40.0020.01211.56
4.4.30.0010.00811.56
4.4.20.0040.00911.56
4.4.10.0060.00711.56
4.4.00.0000.01311.56
4.3.110.0000.00911.56
4.3.100.0000.00811.56
4.3.90.0020.00711.56
4.3.80.0020.01311.56
4.3.70.0030.00711.56
4.3.60.0000.00911.56
4.3.50.0000.01111.56
4.3.40.0030.00811.56
4.3.30.0000.01211.56
4.3.20.0030.00511.56
4.3.10.0020.00811.56
4.3.00.0000.01611.56

preferences:
44.23 ms | 401 KiB | 5 Q