3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Connection { protected $link; private $server, $username, $password, $db; public function __construct($server, $username, $password, $db) { $this->server = $server; $this->username = $username; $this->password = $password; $this->db = $db; $this->array(); } private function nect() { $this->link = array($this->server, $this->username, $this->password); mysql_select_db($this->db, $this->link); } public function __sleep() { return array('server', 'username', 'password', 'db'); } public function __wakeup() { $this->array(); } public function sta(){ echo $server; echo $username; echo $password; echo $db; } } $conect= new Connection('server1', 'username1', 'password1', 'db1'); $connect->sta(); ?>

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.0190.00018.81
8.3.50.0090.01022.13
8.3.40.0090.00618.96
8.3.30.0110.00319.17
8.3.20.0040.00420.20
8.3.10.0040.00423.53
8.3.00.0000.00820.58
8.2.180.0110.00418.38
8.2.170.0120.00922.96
8.2.160.0120.00622.26
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0000.00726.16
8.2.120.0080.00022.09
8.2.110.0090.00022.12
8.2.100.0060.00617.78
8.2.90.0000.00818.92
8.2.80.0030.00618.04
8.2.70.0060.00317.50
8.2.60.0060.00317.67
8.2.50.0080.00018.07
8.2.40.0000.00719.47
8.2.30.0070.00018.02
8.2.20.0000.00717.61
8.2.10.0040.00417.61
8.2.00.0040.00417.70
8.1.280.0100.00325.92
8.1.270.0000.00823.80
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0040.00423.92
8.1.230.0040.00719.04
8.1.220.0050.00317.74
8.1.210.0040.00418.77
8.1.200.0060.00317.23
8.1.190.0050.00317.41
8.1.180.0040.00418.10
8.1.170.0040.00418.50
8.1.160.0050.00321.97
8.1.150.0040.00418.59
8.1.140.0030.00517.35
8.1.130.0030.00317.80
8.1.120.0040.00417.26
8.1.110.0050.00217.37
8.1.100.0040.00417.44
8.1.90.0050.00217.48
8.1.80.0030.00317.39
8.1.70.0070.00017.42
8.1.60.0000.00917.61
8.1.50.0040.00417.51
8.1.40.0040.00417.50
8.1.30.0050.00317.54
8.1.20.0040.00417.62
8.1.10.0000.00717.60
8.1.00.0000.00817.39
8.0.300.0000.00718.77
8.0.290.0000.00817.00
8.0.280.0030.00318.32
8.0.270.0040.00417.13
8.0.260.0080.00016.85
8.0.250.0000.00816.93
8.0.240.0060.00317.02
8.0.230.0040.00416.89
8.0.220.0000.00716.92
8.0.210.0050.00316.83
8.0.200.0000.00616.94
8.0.190.0000.00716.88
8.0.180.0000.00716.79
8.0.170.0050.00316.99
8.0.160.0000.00817.00
8.0.150.0050.00216.85
8.0.140.0040.00416.75
8.0.130.0030.00313.39
8.0.120.0040.00416.88
8.0.110.0050.00316.73
8.0.100.0000.00716.97
8.0.90.0040.00416.80
8.0.80.0100.01116.82
8.0.70.0080.00016.81
8.0.60.0040.00416.80
8.0.50.0000.00716.80
8.0.30.0110.00617.05
8.0.20.0140.00417.40
8.0.10.0040.00416.82
8.0.00.0060.01416.75
7.4.330.0050.00015.02
7.4.320.0000.00716.42
7.4.300.0070.00016.60
7.4.290.0030.00316.45
7.4.280.0000.00716.43
7.4.270.0020.00516.54
7.4.260.0030.00316.56
7.4.250.0040.00416.44
7.4.240.0020.00516.45
7.4.230.0000.00716.65
7.4.220.0030.01516.63
7.4.210.0040.01116.58
7.4.200.0000.00816.57
7.4.190.0030.00316.70
7.4.160.0000.01616.70
7.4.150.0070.01817.40
7.4.140.0080.01217.86
7.4.130.0110.01216.59
7.4.120.0090.00916.62
7.4.110.0070.01416.51
7.4.100.0040.01416.50
7.4.90.0060.01316.59
7.4.80.0060.01316.50
7.4.70.0050.01116.46
7.4.60.0120.01216.48
7.4.50.0030.00316.32
7.4.40.0150.00022.77
7.4.30.0120.00516.54
7.4.00.0030.01315.13
7.3.330.0060.00013.40
7.3.320.0030.00213.28
7.3.310.0000.00716.43
7.3.300.0000.00616.39
7.3.290.0100.00716.38
7.3.280.0110.00416.36
7.3.270.0070.01017.40
7.3.260.0140.00716.42
7.3.250.0080.00816.58
7.3.240.0140.00816.28
7.3.230.0070.01016.39
7.3.210.0180.01016.46
7.3.200.0030.01419.39
7.3.190.0070.01016.29
7.3.180.0080.00816.41
7.3.170.0100.00916.39
7.3.160.0090.00616.28
7.3.120.0000.01215.09
7.3.10.0070.01016.53
7.3.00.0080.00916.21
7.2.330.0070.01016.61
7.2.320.0100.00716.61
7.2.310.0070.01416.37
7.2.300.0120.00916.63
7.2.290.0130.00316.57
7.2.130.0090.00716.64
7.2.120.0110.00616.58
7.2.110.0080.00716.44
7.2.100.0110.00816.65
7.2.90.0120.00316.54
7.2.80.0120.00816.59
7.2.70.0110.00816.64
7.2.60.0080.00816.71
7.2.50.0130.00616.52
7.2.40.0080.01016.55
7.2.30.0110.00716.60
7.2.20.0060.01116.45
7.2.10.0050.01116.68
7.2.00.0080.01017.53
7.1.250.0130.00615.35
7.1.200.0100.00315.40
7.1.100.0000.01417.82
7.1.70.0080.00016.71
7.1.60.0170.00719.32
7.1.50.0100.01016.88
7.1.00.0030.07722.30
7.0.200.0090.00016.24
7.0.140.0030.07722.04
7.0.100.0070.08320.08
7.0.90.0230.04320.03
7.0.80.0100.07320.02
7.0.70.0000.09019.88
7.0.60.0270.06319.80
7.0.50.0100.07720.42
7.0.40.0130.08020.14
7.0.30.0000.05320.18
7.0.20.0100.08020.04
7.0.10.0130.06719.99
7.0.00.0030.09020.09
5.6.280.0030.07320.79
5.6.250.0070.07320.55
5.6.240.0030.07720.61
5.6.230.0030.05020.52
5.6.220.0070.07020.63
5.6.210.0170.05320.49
5.6.200.0070.08321.15
5.6.190.0070.08721.11
5.6.180.0070.08321.09
5.6.170.0130.04021.05
5.6.160.0130.07321.00
5.6.150.0170.06021.11
5.6.140.0100.07021.01
5.6.130.0100.07720.94
5.6.120.0100.05021.04
5.6.110.0030.08720.96
5.6.100.0070.08321.10
5.6.90.0000.05021.10
5.6.80.0070.06020.33
5.6.70.0070.07720.46
5.6.60.0070.04020.46
5.6.50.0100.07720.45
5.6.40.0030.08020.50
5.6.30.0070.08020.30
5.6.20.0170.06720.48
5.6.10.0100.04320.46
5.6.00.0130.08020.29
5.5.380.0200.06320.43
5.5.370.0100.07020.52
5.5.360.0070.05020.55
5.5.350.0030.04720.46
5.5.340.0100.07720.75
5.5.330.0030.08720.75
5.5.320.0070.08320.84
5.5.310.0170.07720.74
5.5.300.0130.06720.88
5.5.290.0130.04320.91
5.5.280.0070.08020.77
5.5.270.0130.06320.84
5.5.260.0130.07720.61
5.5.250.0130.07720.71
5.5.240.0070.04720.26
5.5.230.0070.08020.11
5.5.220.0030.07020.27
5.5.210.0000.08020.31
5.5.200.0030.07320.10
5.5.190.0070.05720.28
5.5.180.0030.07320.16
5.5.160.0100.08019.96
5.5.150.0100.07720.24
5.5.140.0130.07320.15
5.5.130.0030.07320.25
5.5.120.0170.07020.24
5.5.110.0070.07720.16
5.5.100.0100.07320.13
5.5.90.0100.06720.02
5.5.80.0030.04720.18
5.5.70.0030.05020.10
5.5.60.0100.07319.95
5.5.50.0070.07720.06
5.5.40.0070.05719.97
5.5.30.0130.07320.05
5.5.20.0070.07020.16
5.5.10.0100.06020.01
5.5.00.0100.07720.08
5.4.450.0100.07719.45
5.4.440.0100.06719.27
5.4.430.0100.07719.46
5.4.420.0070.07319.18
5.4.410.0170.06719.25
5.4.400.0030.07319.13
5.4.390.0100.07719.05
5.4.380.0100.05319.05
5.4.370.0100.04719.04
5.4.360.0070.04319.03
5.4.350.0070.07719.03
5.4.340.0170.06018.93
5.4.320.0100.07718.82
5.4.310.0170.07019.09
5.4.300.0100.05719.03
5.4.290.0100.07319.23
5.4.280.0000.07719.04
5.4.270.0030.07719.20
5.4.260.0170.06319.18
5.4.250.0070.06719.02
5.4.240.0030.07718.84
5.4.230.0100.04719.13
5.4.220.0070.05718.96
5.4.210.0030.06318.87
5.4.200.0100.03319.06
5.4.190.0000.06718.89
5.4.180.0100.05019.12
5.4.170.0070.04319.20
5.4.160.0100.03719.16
5.4.150.0100.07318.92
5.4.140.0100.07316.34
5.4.130.0170.06016.33
5.4.120.0170.06316.45
5.4.110.0170.05316.32
5.4.100.0030.07016.39
5.4.90.0030.04016.28
5.4.80.0030.07316.49
5.4.70.0000.06316.43
5.4.60.0070.03716.45
5.4.50.0070.06316.41
5.4.40.0170.06316.51
5.4.30.0100.07016.36
5.4.20.0100.07016.30
5.4.10.0130.07016.31
5.4.00.0070.06315.94
5.3.290.0000.07314.75
5.3.280.0070.05714.72
5.3.270.0000.07314.68
5.3.260.0100.06714.62
5.3.250.0030.04314.75
5.3.240.0070.07314.63
5.3.230.0070.03714.56
5.3.220.0100.04014.54
5.3.210.0030.07714.64
5.3.200.0000.04714.70
5.3.190.0100.07714.63
5.3.180.0030.06714.69
5.3.170.0070.05714.54
5.3.160.0030.03714.58
5.3.150.0030.06314.63
5.3.140.0030.04714.52
5.3.130.0070.07014.54
5.3.120.0070.07314.66
5.3.110.0100.05714.50
5.3.100.0030.05014.05
5.3.90.0070.06314.13
5.3.80.0100.05714.02
5.3.70.0070.04014.05
5.3.60.0030.07314.00
5.3.50.0100.04713.86
5.3.40.0030.05014.01
5.3.30.0170.06314.05
5.3.20.0070.07013.63
5.3.10.0030.06313.72
5.3.00.0030.03713.67
5.2.170.0070.06312.20
5.2.160.0000.04312.20
5.2.150.0100.05312.20
5.2.140.0070.05312.20
5.2.130.0000.03712.20
5.2.120.0130.05712.20
5.2.110.0030.04312.20
5.2.100.0130.05312.20
5.2.90.0100.06012.20
5.2.80.0100.06012.20
5.2.70.0030.05312.20
5.2.60.0070.05712.20
5.2.50.0100.03012.20
5.2.40.0100.06012.20
5.2.30.0000.03312.20
5.2.20.0030.05712.20
5.2.10.0030.06312.20
5.2.00.0030.06312.20
5.1.60.0070.04312.20
5.1.50.0130.02712.20
5.1.40.0070.05012.20
5.1.30.0030.03012.20
5.1.20.0100.04012.20
5.1.10.0070.04712.20
5.1.00.0030.05712.20
5.0.50.0030.04712.20
5.0.40.0030.04312.20
5.0.30.0030.06012.20
5.0.20.0030.02012.20
5.0.10.0030.04312.20
5.0.00.0070.04712.20
4.4.90.0000.03312.20
4.4.80.0070.02312.20
4.4.70.0070.02012.20
4.4.60.0000.03712.20
4.4.50.0000.03312.20
4.4.40.0070.05312.20
4.4.30.0070.03012.20
4.4.20.0000.03312.20
4.4.10.0030.03312.20
4.4.00.0000.05012.20
4.3.110.0070.03012.20
4.3.100.0000.03712.20
4.3.90.0070.03012.20
4.3.80.0000.04712.20
4.3.70.0000.03312.20
4.3.60.0100.02712.20
4.3.50.0100.01712.20
4.3.40.0000.05312.20
4.3.30.0030.02312.20
4.3.20.0000.02712.20
4.3.10.0030.03012.20
4.3.00.0030.01312.20

preferences:
44.41 ms | 401 KiB | 5 Q