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 a(){ echo $server; echo $username; echo $password; echo $db; } } $conect= new Connection("server1", "username1", "password1", "db1"); $conect->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.0110.00418.42
8.3.50.0130.00822.01
8.3.40.0100.00318.92
8.3.30.0100.00319.14
8.3.20.0080.00020.39
8.3.10.0040.00423.61
8.3.00.0000.00820.64
8.2.180.0030.01316.50
8.2.170.0070.01122.96
8.2.160.0130.00020.52
8.2.150.0080.00024.18
8.2.140.0060.00324.66
8.2.130.0040.00426.16
8.2.120.0080.00022.25
8.2.110.0090.00022.25
8.2.100.0130.00017.78
8.2.90.0000.00919.22
8.2.80.0040.00417.97
8.2.70.0060.00317.75
8.2.60.0040.00817.66
8.2.50.0060.00318.07
8.2.40.0050.00219.38
8.2.30.0080.00018.07
8.2.20.0040.00417.59
8.2.10.0040.00417.73
8.2.00.0030.00917.85
8.1.280.0210.00025.92
8.1.270.0000.00823.92
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0040.00723.96
8.1.230.0070.00419.15
8.1.220.0080.00017.79
8.1.210.0090.00018.77
8.1.200.0000.00917.13
8.1.190.0000.00817.53
8.1.180.0000.00818.10
8.1.170.0040.00418.64
8.1.160.0000.00921.96
8.1.150.0000.00818.60
8.1.140.0040.00417.23
8.1.130.0040.00417.86
8.1.120.0030.00317.29
8.1.110.0000.00717.35
8.1.100.0030.00417.41
8.1.90.0040.00417.24
8.1.80.0030.00317.44
8.1.70.0040.00417.34
8.1.60.0000.00917.50
8.1.50.0040.00417.54
8.1.40.0000.00817.43
8.1.30.0040.00417.61
8.1.20.0000.00717.64
8.1.10.0040.00417.47
8.1.00.0000.00717.41
8.0.300.0040.00418.77
8.0.290.0030.00517.05
8.0.280.0040.00418.32
8.0.270.0070.00017.17
8.0.260.0000.01116.89
8.0.250.0000.00616.91
8.0.240.0040.00416.91
8.0.230.0000.00716.98
8.0.220.0030.00316.91
8.0.210.0030.00316.77
8.0.200.0030.00316.97
8.0.190.0050.00316.79
8.0.180.0000.00716.82
8.0.170.0000.00816.98
8.0.160.0000.00816.75
8.0.150.0070.00016.91
8.0.140.0070.00016.83
8.0.130.0000.00613.29
8.0.120.0030.00516.86
8.0.110.0000.00716.88
8.0.100.0030.00516.72
8.0.90.0040.00416.70
8.0.80.0070.00816.87
8.0.70.0000.00716.90
8.0.60.0000.00716.73
8.0.50.0040.00416.79
8.0.30.0140.00916.95
8.0.20.0120.00617.44
8.0.10.0040.00416.96
8.0.00.0100.00816.84
7.4.330.0050.00015.00
7.4.320.0000.00616.53
7.4.300.0040.00416.54
7.4.290.0070.00016.46
7.4.280.0000.00716.63
7.4.270.0030.00316.61
7.4.260.0030.00316.60
7.4.250.0000.00716.42
7.4.240.0050.00216.54
7.4.230.0030.00316.36
7.4.220.0060.01316.64
7.4.210.0080.00616.60
7.4.200.0030.00316.60
7.4.190.0050.00216.63
7.4.160.0130.00316.39
7.4.150.0100.00717.40
7.4.140.0120.00617.86
7.4.130.0100.00716.60
7.4.120.0120.00816.52
7.4.110.0110.01116.61
7.4.100.0170.00016.66
7.4.90.0160.00016.30
7.4.80.0060.01016.67
7.4.70.0170.00316.49
7.4.60.0040.01416.44
7.4.50.0000.00816.29
7.4.40.0070.00722.77
7.4.30.0090.01216.63
7.4.00.0110.00415.02
7.3.330.0000.00513.17
7.3.320.0060.00013.30
7.3.310.0050.00216.17
7.3.300.0030.00316.31
7.3.290.0100.00716.30
7.3.280.0080.01116.33
7.3.270.0110.00717.40
7.3.260.0100.00716.52
7.3.250.0130.00616.51
7.3.240.0060.01016.49
7.3.230.0130.01016.60
7.3.210.0150.00316.32
7.3.200.0040.01519.39
7.3.190.0100.00016.27
7.3.180.0090.00916.52
7.3.170.0000.01616.50
7.3.160.0100.00616.34
7.3.120.0070.00714.75
7.2.330.0100.01316.37
7.2.320.0130.01016.80
7.2.310.0170.00016.36
7.2.300.0060.01116.58
7.2.290.0120.01216.63
7.2.120.0120.00616.48
7.2.110.0030.01016.57
7.2.100.0140.00416.47
7.2.90.0060.00816.47
7.2.80.0050.01116.75
7.2.70.0140.00616.69
7.2.60.0090.00917.01
7.2.50.0210.00016.91
7.2.40.0130.00717.09
7.2.30.0120.00317.09
7.2.20.0150.00416.93
7.2.10.0140.00416.91
7.2.00.0050.00718.08
7.1.240.0100.00415.81
7.1.230.0130.00615.41
7.1.220.0130.00015.58
7.1.210.0140.00215.64
7.1.200.0120.00015.70
7.1.190.0150.00015.76
7.1.180.0160.00315.73
7.1.170.0100.00515.59
7.1.160.0150.00415.76
7.1.150.0160.00315.81
7.1.140.0120.00615.49
7.1.130.0060.00915.75
7.1.120.0110.00615.75
7.1.110.0050.00915.82
7.1.100.0060.00716.96
7.1.90.0070.01115.60
7.1.80.0070.01015.56
7.1.70.0070.00616.17
7.1.60.0040.00816.11
7.1.50.0150.00416.11
7.1.40.0030.01015.41
7.1.30.0120.00015.82
7.1.20.0030.01115.73
7.1.10.0090.00915.39
7.1.00.0060.04418.99
7.0.320.0050.01015.55
7.0.310.0170.00015.14
7.0.300.0080.00915.32
7.0.290.0130.00415.36
7.0.280.0060.00615.48
7.0.270.0080.00815.39
7.0.260.0140.00415.40
7.0.250.0120.00415.41
7.0.240.0130.00515.57
7.0.230.0140.00715.52
7.0.220.0120.00615.15
7.0.210.0110.00515.49
7.0.200.0040.01316.10
7.0.190.0100.00615.49
7.0.180.0030.01115.46
7.0.170.0040.01615.21
7.0.160.0160.00015.27
7.0.150.0120.00415.35
7.0.140.0110.03518.70
7.0.130.0100.00715.55
7.0.120.0120.00915.55
7.0.110.0090.00615.46
7.0.100.0100.00315.55
7.0.90.0030.01215.13
7.0.80.0150.00415.36
7.0.70.0140.00415.41
7.0.60.0030.02818.46
7.0.50.0090.04316.61
7.0.40.0110.04316.71
7.0.30.0180.04216.79
7.0.20.0210.04116.79
7.0.10.0040.03116.90
7.0.00.0080.03316.75
5.6.380.0070.00714.64
5.6.370.0140.00614.32
5.6.360.0080.00614.29
5.6.350.0120.00614.08
5.6.340.0060.01014.17
5.6.330.0080.00814.62
5.6.320.0030.01414.43
5.6.310.0090.00614.46
5.6.300.0080.00614.43
5.6.290.0160.00014.28
5.6.280.0060.04017.72
5.6.270.0090.00314.05
5.6.260.0060.01014.41
5.6.250.0070.00714.32
5.6.240.0110.00314.43
5.6.230.0100.00514.27
5.6.220.0120.00314.44
5.6.210.0060.04617.36
5.6.200.0090.02716.24
5.6.190.0110.04117.24
5.6.180.0050.02617.53
5.6.170.0180.02217.38
5.6.160.0070.02816.30
5.6.150.0080.02216.21
5.6.140.0110.04316.20
5.6.130.0100.02116.30
5.6.120.0050.04317.76
5.6.110.0080.04217.65
5.6.100.0030.02817.62
5.6.90.0110.04017.60
5.6.80.0070.04217.24
5.6.70.0100.00714.09
5.6.60.0130.00314.22
5.6.50.0000.01514.44
5.6.40.0100.00314.31
5.6.30.0090.00314.58
5.6.20.0030.01014.16
5.6.10.0040.00714.18
5.6.00.0070.00714.18
5.5.380.0110.00311.17
5.5.370.0080.00411.04
5.5.360.0080.00511.07
5.5.350.0190.03715.88
5.5.340.0070.03714.74
5.5.330.0070.04315.79
5.5.320.0160.02515.59
5.5.310.0150.03015.87
5.5.300.0080.03314.51
5.5.290.0050.04314.66
5.5.280.0050.04516.00
5.5.270.0150.03516.16
5.5.260.0180.03716.05
5.5.250.0050.02215.96
5.5.240.0200.02515.71
5.5.230.0000.01211.21
5.5.220.0030.00311.01
5.5.210.0030.00310.92
5.5.200.0000.01111.19
5.5.190.0080.00311.32
5.5.180.0040.00811.06
5.5.170.0090.00614.29
5.5.160.0030.00911.21
5.5.150.0100.00011.29
5.5.140.0030.00611.38
5.5.130.0060.00011.17
5.5.120.0040.00411.34
5.5.110.0030.00310.93
5.5.100.0040.00711.25
5.5.90.0070.00311.33
5.5.80.0030.00911.39
5.5.70.0030.00610.92
5.5.60.0040.00411.25
5.5.50.0040.00810.99
5.5.40.0030.00610.94
5.5.30.0120.00010.96
5.5.20.0030.00611.23
5.5.10.0090.00311.15
5.5.00.0060.00611.14
5.4.450.0530.02315.24
5.4.440.0030.03715.18
5.4.430.0090.02915.23
5.4.420.0340.00215.13
5.4.410.0100.02914.90
5.4.400.0130.02714.86
5.4.390.0070.03214.83
5.4.380.0170.02614.77
5.4.370.0140.02314.97
5.4.360.0070.02914.72
5.4.350.0050.01811.50
5.4.340.0050.02711.48
5.4.330.0060.00611.18
5.4.320.0050.02211.67
5.4.310.0060.02311.65
5.4.300.0080.01811.81
5.4.290.0080.02411.77
5.4.280.0050.02011.77
5.4.270.0050.02111.60
5.4.260.0050.02311.78
5.4.250.0040.02811.72
5.4.240.0040.02211.65
5.4.230.0060.02211.58
5.4.220.0070.02111.79
5.4.210.0040.02211.66
5.4.200.0080.02911.64
5.4.190.0110.02311.63
5.4.180.0090.02511.58
5.4.170.0080.02611.57
5.4.160.0110.02611.67
5.4.150.0110.02711.66
5.4.140.0130.02211.42
5.4.130.0090.02711.57
5.4.120.0140.02011.50
5.4.110.0100.02511.52
5.4.100.0070.02611.56
5.4.90.0130.02211.53
5.4.80.0110.02511.60
5.4.70.0140.02111.55
5.4.60.0090.02511.53
5.4.50.0110.02311.56
5.4.40.0140.02311.54
5.4.30.0080.02711.44
5.4.20.0120.02211.60
5.4.10.0120.02111.52
5.4.00.0080.02511.27
5.3.290.0050.02111.66
5.3.280.0050.02211.65
5.3.270.0090.02611.72
5.3.260.0100.02511.70
5.3.250.0140.02111.63
5.3.240.0100.02611.47
5.3.230.0090.02711.68
5.3.220.0090.02611.62
5.3.210.0200.04511.59
5.3.200.0120.02411.47
5.3.190.0080.02811.53
5.3.180.0090.02611.68
5.3.170.0090.02411.61
5.3.160.0120.02311.53
5.3.150.0120.02311.70
5.3.140.0120.02411.65
5.3.130.0120.03811.65
5.3.120.0140.02311.64
5.3.110.0090.02411.52
5.3.100.0100.02511.39
5.3.90.0130.02411.42
5.3.80.0090.02711.35
5.3.70.0070.02511.21
5.3.60.0100.02511.31
5.3.50.0110.02511.33
5.3.40.0070.02911.29
5.3.30.0090.02411.31
5.3.20.0190.04611.03
5.3.10.0090.02511.10
5.3.00.0090.02511.04
5.2.170.0120.0319.53
5.2.160.0110.0169.53
5.2.150.0080.0219.53
5.2.140.0060.0219.53
5.2.130.0090.0199.51
5.2.120.0210.0389.51
5.2.110.0100.0199.51
5.2.100.0090.0189.51
5.2.90.0090.0209.51
5.2.80.0040.0269.51
5.2.70.0070.0229.51
5.2.60.0070.0219.48
5.2.50.0100.0199.46
5.2.40.0080.0199.46
5.2.30.0100.0199.45
5.2.20.0090.0209.45
5.2.10.0080.0209.39
5.2.00.0090.0209.32
5.1.60.0090.0188.96
5.1.50.0090.0178.96
5.1.40.0080.0168.96
5.1.30.0120.0139.13
5.1.20.0080.0179.14
5.1.10.0070.0199.00
5.1.00.0110.0159.00
5.0.50.0100.0138.24
5.0.40.0100.0108.17
5.0.30.0090.0188.08
5.0.20.0070.0158.06
5.0.10.0050.0158.05
5.0.00.0090.0338.04
4.4.90.0050.0097.31
4.4.80.0030.0127.29
4.4.70.0040.0137.29
4.4.60.0070.0107.29
4.4.50.0050.0107.30
4.4.40.0050.0167.27
4.4.30.0020.0147.30
4.4.20.0040.0127.34
4.4.10.0040.0127.34
4.4.00.0050.0177.30
4.3.110.0070.0097.25
4.3.100.0040.0117.25
4.3.90.0070.0107.23
4.3.80.0040.0167.21
4.3.70.0040.0117.23
4.3.60.0050.0107.23
4.3.50.0060.0107.23
4.3.40.0060.0157.19
4.3.30.0020.0126.56
4.3.20.0020.0126.56
4.3.10.0050.0106.54
4.3.00.0080.0138.53

preferences:
45.8 ms | 401 KiB | 5 Q