3v4l.org

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

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.0030.01718.43
8.3.50.0050.01117.69
8.3.40.0120.00619.01
8.3.30.0060.00919.00
8.3.20.0090.00018.76
8.3.10.0000.00920.71
8.3.00.0060.00317.63
8.2.180.0150.00317.00
8.2.170.0090.00622.96
8.2.160.0110.00322.26
8.2.150.0000.00824.18
8.2.140.0060.00324.66
8.2.130.0000.00826.16
8.2.120.0020.00519.64
8.2.110.0100.00021.00
8.2.100.0060.00617.91
8.2.90.0000.00819.22
8.2.80.0030.00618.04
8.2.70.0040.00417.63
8.2.60.0030.00517.93
8.2.50.0000.00918.07
8.2.40.0060.00318.03
8.2.30.0070.00018.07
8.2.20.0040.00417.63
8.2.10.0040.00417.69
8.2.00.0000.00817.71
8.1.280.0090.00625.92
8.1.270.0040.00424.66
8.1.260.0080.00026.35
8.1.250.0080.00028.09
8.1.240.0000.01022.42
8.1.230.0080.00321.04
8.1.220.0040.00418.77
8.1.210.0000.00818.86
8.1.200.0090.00017.25
8.1.190.0050.00317.39
8.1.180.0040.00418.10
8.1.170.0070.00018.60
8.1.160.0000.00718.90
8.1.150.0070.00018.58
8.1.140.0000.00717.45
8.1.130.0070.00017.70
8.1.120.0070.00017.25
8.1.110.0000.00717.39
8.1.100.0050.00317.31
8.1.90.0030.00417.42
8.1.80.0030.00317.27
8.1.70.0000.00817.37
8.1.60.0000.00817.55
8.1.50.0020.00517.39
8.1.40.0040.00417.52
8.1.30.0070.00017.58
8.1.20.0000.00817.65
8.1.10.0050.00217.64
8.1.00.0030.00617.40
8.0.300.0000.00919.88
8.0.290.0070.00016.75
8.0.280.0040.00418.31
8.0.270.0040.00417.21
8.0.260.0000.00616.77
8.0.250.0070.00016.88
8.0.240.0000.00816.98
8.0.230.0030.00316.93
8.0.220.0020.00516.96
8.0.210.0030.00716.79
8.0.200.0000.00717.00
8.0.190.0110.00416.50
8.0.180.0000.00716.96
8.0.170.0000.00916.89
8.0.160.0000.00716.89
8.0.150.0040.00416.80
8.0.140.0030.00716.82
8.0.130.0000.00613.25
8.0.120.0030.00516.89
8.0.110.0000.00816.71
8.0.100.0030.00516.77
8.0.90.0030.00416.70
8.0.80.0030.01216.89
8.0.70.0040.00416.90
8.0.60.0040.00416.88
8.0.50.0070.00016.84
8.0.30.0120.00917.05
8.0.20.0100.00817.16
8.0.10.0040.00416.97
8.0.00.0110.01016.80
7.4.330.0030.00312.92
7.4.320.0030.00316.36
7.4.300.0000.00616.60
7.4.290.0040.00416.43
7.4.280.0060.00316.61
7.4.270.0030.00316.51
7.4.260.0060.00013.27
7.4.250.0020.00516.63
7.4.240.0000.00716.57
7.4.230.0030.00316.62
7.4.220.0150.00616.68
7.4.210.0090.00716.59
7.4.200.0000.00716.71
7.4.190.0030.00316.47
7.4.160.0130.01016.56
7.4.150.0030.01516.39
7.4.140.0090.00917.17
7.4.130.0120.00716.60
7.4.120.0070.01016.51
7.4.110.0100.00716.53
7.4.100.0040.01716.48
7.4.90.0040.01716.66
7.4.80.0110.01516.60
7.4.70.0160.00316.49
7.4.60.0090.00916.66
7.4.50.0000.00916.53
7.4.40.0030.01317.88
7.4.30.0090.00616.46
7.4.00.0030.01214.91
7.3.330.0000.00613.38
7.3.320.0050.00013.32
7.3.310.0030.00616.25
7.3.300.0040.00416.32
7.3.290.0050.01016.32
7.3.280.0090.00816.31
7.3.270.0140.00417.07
7.3.260.0110.00617.79
7.3.250.0120.00616.42
7.3.240.0080.00816.51
7.3.230.0090.00916.57
7.3.210.0140.00416.49
7.3.200.0110.00519.39
7.3.190.0150.00616.37
7.3.180.0060.01916.45
7.3.170.0030.01416.40
7.3.160.0150.00016.56
7.3.120.0110.00714.87
7.2.330.0140.00316.39
7.2.320.0140.00316.64
7.2.310.0130.01216.53
7.2.300.0080.00816.61
7.2.290.0090.00916.73
7.2.60.0090.00616.86
7.2.00.0040.00819.39
7.1.200.0060.00915.76
7.1.100.0000.01317.88
7.1.70.0030.00717.09
7.1.60.0070.01719.40
7.1.50.0180.01134.77
7.1.00.0030.04322.36
7.0.200.0000.01216.86
7.0.140.0070.06722.11
7.0.120.0000.03322.08
7.0.110.0130.06320.02
7.0.100.0030.05319.98
7.0.90.0230.07719.78
7.0.80.0100.09019.89
7.0.70.0170.07319.89
7.0.60.0200.08319.84
7.0.50.0100.04320.46
7.0.40.0030.08720.01
7.0.30.0100.05720.22
7.0.20.0130.06020.14
7.0.10.0070.04019.90
7.0.00.0070.04320.13
5.6.280.0130.06020.82
5.6.250.0170.06320.46
5.6.240.0070.08720.65
5.6.230.0070.08720.50
5.6.220.0100.07320.41
5.6.210.0100.07020.56
5.6.200.0070.09021.00
5.6.190.0100.07721.04
5.6.180.0070.07321.25
5.6.170.0030.04321.10
5.6.160.0030.06721.09
5.6.150.0070.04321.05
5.6.140.0030.04021.07
5.6.130.0030.04321.00
5.6.120.0100.03721.00
5.6.110.0070.04021.06
5.6.100.0000.04720.94
5.6.90.0030.08721.07
5.6.80.0000.07720.29
5.6.70.0030.04020.32
5.6.60.0030.07020.45
5.6.50.0070.04720.35
5.6.40.0070.03720.50
5.6.30.0070.06020.59
5.6.20.0030.04020.47
5.6.10.0030.04720.40
5.6.00.0030.04020.59
5.5.380.0100.07720.50
5.5.370.0030.08720.49
5.5.360.0030.08320.49
5.5.350.0070.08020.48
5.5.340.0130.06020.86
5.5.330.0100.07720.66
5.5.320.0100.06720.91
5.5.310.0070.04020.80
5.5.300.0000.04320.93
5.5.290.0070.03720.99
5.5.280.0000.04320.93
5.5.270.0100.04720.95
5.5.260.0030.04320.82
5.5.250.0070.08020.47
5.5.240.0070.08020.16
5.5.230.0100.07320.27
5.5.220.0030.04020.35
5.5.210.0070.04020.24
5.5.200.0070.04720.13
5.5.190.0070.04720.09
5.5.180.0030.04020.15
5.5.160.0070.03320.09
5.5.150.0030.04020.18
5.5.140.0070.03320.19
5.5.130.0070.03720.00
5.5.120.0000.04020.27
5.5.110.0070.04020.24
5.5.100.0100.03320.21
5.5.90.0070.03720.10
5.5.80.0100.03320.10
5.5.70.0030.04020.09
5.5.60.0130.03020.05
5.5.50.0030.04019.91
5.5.40.0030.04020.13
5.5.30.0030.04319.98
5.5.20.0070.05020.07
5.5.10.0000.04019.91
5.5.00.0170.02719.88
5.4.450.0030.04319.43
5.4.440.0030.05719.31
5.4.430.0070.03719.52
5.4.420.0030.04319.32
5.4.410.0000.07319.20
5.4.400.0000.04019.16
5.4.390.0070.05319.25
5.4.380.0000.04019.16
5.4.370.0030.05019.02
5.4.360.0030.03719.21
5.4.350.0030.03718.99
5.4.340.0000.04019.00
5.4.320.0100.03019.31
5.4.310.0000.04019.03
5.4.300.0030.03719.24
5.4.290.0130.03019.20
5.4.280.0070.03319.32
5.4.270.0070.03319.19
5.4.260.0070.03319.19
5.4.250.0100.05719.02
5.4.240.0000.04018.99
5.4.230.0100.03019.03
5.4.220.0030.04019.30
5.4.210.0100.03019.25
5.4.200.0000.08018.98
5.4.190.0100.03318.94
5.4.180.0070.03319.29
5.4.170.0100.03019.23
5.4.160.0070.05318.97
5.4.150.0030.03719.14
5.4.140.0000.04716.29
5.4.130.0030.04016.26
5.4.120.0000.07716.44
5.4.110.0070.07016.50
5.4.100.0070.07716.55
5.4.90.0000.07716.55
5.4.80.0070.05016.53
5.4.70.0000.04316.40
5.4.60.0000.08316.63
5.4.50.0130.06016.28
5.4.40.0130.06716.44
5.4.30.0030.07316.28
5.4.20.0100.07016.20
5.4.10.0070.07716.20
5.4.00.0030.07015.72
5.3.290.0030.03714.81
5.3.280.0070.03714.61
5.3.270.0030.03714.61
5.3.260.0000.04014.59
5.3.250.0000.05714.61
5.3.240.0070.04314.65
5.3.230.0070.04714.73
5.3.220.0070.06314.60
5.3.210.0100.07014.72
5.3.200.0030.07314.44
5.3.190.0030.06014.43
5.3.180.0000.06714.59
5.3.170.0070.03314.82
5.3.160.0070.04014.57
5.3.150.0030.04014.60
5.3.140.0130.07014.57
5.3.130.0030.05014.58
5.3.120.0100.04014.69
5.3.110.0030.05014.54
5.3.100.0030.08014.13
5.3.90.0100.07014.07
5.3.80.0130.06713.98
5.3.70.0130.06714.02
5.3.60.0100.07314.11
5.3.50.0030.07714.09
5.3.40.0030.07714.01
5.3.30.0030.06714.04
5.3.20.0070.05713.73
5.3.10.0000.07713.67
5.3.00.0030.06313.65
5.2.170.0130.05711.14
5.2.160.0100.06011.16
5.2.150.0030.05011.29
5.2.140.0170.05311.12
5.2.130.0100.03011.07
5.2.120.0100.06011.12
5.2.110.0030.06311.16
5.2.100.0030.06711.25
5.2.90.0130.05011.06
5.2.80.0030.06711.23
5.2.70.0000.05311.07
5.2.60.0030.05311.20
5.2.50.0030.06011.12
5.2.40.0070.05711.09
5.2.30.0030.05711.21
5.2.20.0130.05311.20
5.2.10.0030.06011.10
5.2.00.0070.06010.80
5.1.60.0200.03710.17
5.1.50.0030.0509.98
5.1.40.0000.0579.81
5.1.30.0100.04710.37
5.1.20.0000.06010.34
5.1.10.0030.03310.15
5.1.00.0030.05310.13
5.0.50.0070.0478.98
5.0.40.0000.0378.98
5.0.30.0030.0678.98
5.0.20.0070.0408.98
5.0.10.0030.0378.98
5.0.00.0030.0708.98
4.4.90.0030.0338.98
4.4.80.0030.0378.98
4.4.70.0030.0338.98
4.4.60.0100.0308.98
4.4.50.0000.0378.98
4.4.40.0000.0408.98
4.4.30.0070.0138.98
4.4.20.0070.0338.98
4.4.10.0000.0308.98
4.4.00.0030.0538.98
4.3.110.0030.0338.98
4.3.100.0030.0338.98
4.3.90.0070.0308.98
4.3.80.0100.0508.98
4.3.70.0000.0338.98
4.3.60.0000.0378.98
4.3.50.0030.0338.98
4.3.40.0070.0438.98
4.3.30.0000.0338.98
4.3.20.0030.0308.98
4.3.10.0030.0338.98
4.3.00.0070.0308.98

preferences:
53.25 ms | 401 KiB | 5 Q