3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Connection { public $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 $this->server; echo $this->username; echo $this->password; echo $this->db; } } /*$server="server1"; $username="username1"; $password="password1"; $db="db1";*/ $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.70.0110.00716.63
8.3.60.0170.00316.63
8.3.50.0210.00822.03
8.3.40.0150.00618.61
8.3.30.0120.00619.22
8.3.20.0070.00020.30
8.3.10.0030.00523.66
8.3.00.0030.00717.46
8.2.190.0110.00316.73
8.2.180.0110.01118.16
8.2.170.0120.00622.96
8.2.160.0070.00720.53
8.2.150.0080.00024.18
8.2.140.0060.00324.66
8.2.130.0000.00826.16
8.2.120.0080.00022.25
8.2.110.0080.00022.21
8.2.100.0040.00817.84
8.2.90.0050.00219.08
8.2.80.0000.00817.97
8.2.70.0060.00317.50
8.2.60.0080.00017.93
8.2.50.0000.00818.07
8.2.40.0040.00418.28
8.2.30.0080.00018.08
8.2.20.0080.00017.68
8.2.10.0000.00717.56
8.2.00.0030.00617.61
8.1.280.0130.00725.92
8.1.270.0040.00423.68
8.1.260.0070.00326.35
8.1.250.0000.00728.09
8.1.240.0000.00823.77
8.1.230.0110.00020.79
8.1.220.0040.00417.74
8.1.210.0000.00818.77
8.1.200.0000.00817.23
8.1.190.0040.00417.39
8.1.180.0090.00018.10
8.1.170.0060.00318.41
8.1.160.0000.00921.93
8.1.150.0040.00418.60
8.1.140.0000.00817.40
8.1.130.0040.00417.88
8.1.120.0070.00017.32
8.1.110.0050.00317.40
8.1.100.0050.00317.46
8.1.90.0000.00817.44
8.1.80.0000.00717.37
8.1.70.0000.00717.20
8.1.60.0030.00517.44
8.1.50.0030.00617.43
8.1.40.0030.00517.59
8.1.30.0040.00417.50
8.1.20.0000.00817.67
8.1.10.0040.00417.48
8.1.00.0040.00417.42
8.0.300.0070.00018.77
8.0.290.0070.00017.16
8.0.280.0000.00818.46
8.0.270.0040.00417.26
8.0.260.0060.00316.90
8.0.250.0000.00716.98
8.0.240.0030.00316.88
8.0.230.0000.00716.79
8.0.220.0030.00316.82
8.0.210.0000.00816.90
8.0.200.0000.00616.84
8.0.190.0000.00716.89
8.0.180.0000.00816.90
8.0.170.0040.00416.96
8.0.160.0040.00416.79
8.0.150.0040.00316.69
8.0.140.0030.00316.83
8.0.130.0080.00013.25
8.0.120.0080.00016.79
8.0.110.0040.00416.81
8.0.100.0000.00716.62
8.0.90.0040.00416.67
8.0.80.0060.01516.82
8.0.70.0050.00316.70
8.0.60.0050.00216.72
8.0.50.0040.00416.91
8.0.30.0100.00916.95
8.0.20.0090.01117.40
8.0.10.0000.00816.82
8.0.00.0080.00816.76
7.4.330.0050.00015.15
7.4.320.0030.00316.45
7.4.300.0000.00716.54
7.4.290.0030.00516.43
7.4.280.0050.00316.60
7.4.270.0000.00616.43
7.4.260.0030.00316.52
7.4.250.0030.00316.57
7.4.240.0020.00616.54
7.4.230.0040.00416.41
7.4.220.0030.01516.54
7.4.210.0080.00816.56
7.4.200.0060.00316.64
7.4.190.0070.00016.42
7.4.160.0120.00916.60
7.4.150.0130.00317.40
7.4.140.0050.01317.86
7.4.130.0110.00516.52
7.4.120.0120.00616.56
7.4.110.0060.01616.74
7.4.100.0070.01016.64
7.4.90.0070.01016.42
7.4.80.0030.01319.39
7.4.70.0070.00916.51
7.4.60.0100.00716.43
7.4.50.0020.00216.23
7.4.40.0070.00722.77
7.4.30.0110.00816.46
7.4.00.0060.01215.17
7.3.330.0000.00513.35
7.3.320.0000.00613.24
7.3.310.0000.00716.23
7.3.300.0030.00316.08
7.3.290.0090.00616.32
7.3.280.0140.00516.25
7.3.270.0040.01417.40
7.3.260.0120.01216.48
7.3.250.0100.00716.40
7.3.240.0120.00816.21
7.3.230.0000.01816.50
7.3.210.0060.01716.19
7.3.200.0070.01019.39
7.3.190.0090.01316.51
7.3.180.0090.00616.37
7.3.170.0080.01116.34
7.3.160.0090.00616.32
7.3.120.0030.01014.48
7.2.330.0060.01216.75
7.2.320.0120.00916.79
7.2.310.0060.01116.83
7.2.300.0000.01716.77
7.2.290.0130.00516.84
7.2.00.0060.00619.47
7.1.100.0060.00318.09
7.1.70.0030.00617.00
7.1.60.0040.01819.31
7.1.50.0040.01816.88
7.1.00.0070.07322.48
7.0.200.0030.01016.47
7.0.140.0000.07722.11
7.0.60.0000.04319.77
7.0.50.0030.07317.87
7.0.40.0030.04320.18
7.0.30.0330.07320.14
7.0.20.0170.04020.07
7.0.10.0130.04320.23
7.0.00.0200.06720.26
5.6.280.0070.07021.13
5.6.210.0100.07720.73
5.6.200.0000.04318.20
5.6.190.0100.08020.77
5.6.180.0070.04320.61
5.6.170.0300.07020.51
5.6.160.0100.05320.52
5.6.150.0130.08018.21
5.6.140.0030.05318.25
5.6.130.0070.08718.17
5.6.120.0100.06720.98
5.6.110.0130.06321.01
5.6.100.0030.06021.00
5.6.90.0170.05720.97
5.6.80.0170.07020.55
5.6.70.0330.07320.38
5.5.350.0000.08720.33
5.5.340.0070.08317.95
5.5.330.0130.07720.57
5.5.320.0070.04720.52
5.5.310.0230.05720.26
5.5.300.0070.04018.03
5.5.290.0070.06317.99
5.5.280.0100.07720.98
5.5.270.0100.08020.77
5.5.260.0070.06020.80
5.5.250.0070.08020.70
5.5.240.0170.06720.26
5.4.450.1000.04019.46
5.4.440.0070.06019.21
5.4.430.0700.04319.66
5.4.420.0700.04319.55
5.4.410.0300.06019.42
5.4.400.0400.05719.25
5.4.390.0030.06019.16
5.4.380.0330.08318.75
5.4.370.0270.05018.57
5.4.360.0130.06018.52
5.4.350.0170.06018.64
5.4.340.0230.05318.57
5.4.320.0050.03812.50
5.4.310.0050.04112.50
5.4.300.0060.03612.50
5.4.290.0060.03812.50
5.4.280.0080.03312.40
5.4.270.0070.03812.40
5.4.260.0070.03612.40
5.4.250.0060.04412.40
5.4.240.0030.03812.40
5.4.230.0030.04012.39
5.4.220.0080.03612.39
5.4.210.0070.04112.39
5.4.200.0020.04512.39
5.4.190.0130.04712.38
5.4.180.0160.04112.38
5.4.170.0130.04612.39
5.4.160.0250.06412.38
5.4.150.0110.04812.38
5.4.140.0160.04212.07
5.4.130.0190.04112.05
5.4.120.0170.03912.01
5.4.110.0120.04412.01
5.4.100.0170.04112.01
5.4.90.0120.04812.01
5.4.80.0180.03912.01
5.4.70.0160.04012.00
5.4.60.0120.04412.00
5.4.50.0180.03912.00
5.4.40.0210.03612.00
5.4.30.0220.06611.99
5.4.20.0160.04411.99
5.4.10.0120.04511.98
5.4.00.0140.04211.48
5.3.290.0070.04012.80
5.3.280.0100.03612.71
5.3.270.0290.06112.72
5.3.260.0150.04912.72
5.3.250.0190.04112.72
5.3.240.0170.04412.72
5.3.230.0150.04812.71
5.3.220.0200.04212.68
5.3.210.0140.04712.68
5.3.200.0170.04412.68
5.3.190.0180.04312.68
5.3.180.0160.04412.67
5.3.170.0160.04412.67
5.3.160.0170.04312.68
5.3.150.0160.04912.67
5.3.140.0170.04512.66
5.3.130.0240.06912.66
5.3.120.0140.04712.66
5.3.110.0160.04712.66
5.3.100.0210.04212.13
5.3.90.0170.04512.11
5.3.80.0130.05112.09
5.3.70.0180.04812.10
5.3.60.0170.04812.08
5.3.50.0180.04212.03
5.3.40.0170.04912.04
5.3.30.0150.04512.00
5.3.20.0170.04111.78
5.3.10.0370.08511.74
5.3.00.0180.03911.71
5.2.170.0150.0349.23
5.2.160.0120.0349.22
5.2.150.0130.0359.22
5.2.140.0110.0359.22
5.2.130.0150.0349.19
5.2.120.0130.0359.19
5.2.110.0190.0309.19
5.2.100.0160.0359.19
5.2.90.0160.0319.19
5.2.80.0150.0339.18
5.2.70.0120.0369.18
5.2.60.0130.0339.13
5.2.50.0150.0339.10
5.2.40.0250.0559.07
5.2.30.0130.0339.05
5.2.20.0160.0319.05
5.2.10.0140.0338.95
5.2.00.0170.0288.80
5.1.60.0230.0498.09
5.1.50.0120.0308.09
5.1.40.0170.0238.08
5.1.30.0150.0298.42
5.1.20.0120.0308.45
5.1.10.0070.0358.16
5.1.00.0150.0278.16
5.0.50.0090.0246.65
5.0.40.0090.0236.50
5.0.30.0100.0356.32
5.0.20.0090.0236.29
5.0.10.0090.0236.26
5.0.00.0090.0376.25
4.4.90.0060.0204.78
4.4.80.0110.0164.76
4.4.70.0090.0194.76
4.4.60.0060.0194.76
4.4.50.0070.0184.77
4.4.40.0090.0294.71
4.4.30.0090.0194.76
4.4.20.0070.0194.84
4.4.10.0100.0174.85
4.4.00.0070.0294.76
4.3.110.0060.0214.67
4.3.100.0210.0334.67
4.3.90.0070.0174.63
4.3.80.0060.0284.59
4.3.70.0040.0204.63
4.3.60.0080.0164.63
4.3.50.0060.0204.63
4.3.40.0100.0244.54
4.3.30.0060.0183.29
4.3.20.0040.0223.29
4.3.10.0060.0193.25
4.3.00.0130.01315.59

preferences:
55.23 ms | 401 KiB | 5 Q