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($server, $username, $password, $db){ 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.0180.00316.85
8.3.50.0070.01122.00
8.3.40.0120.00318.96
8.3.30.0100.00319.09
8.3.20.0040.00420.21
8.3.10.0040.00423.52
8.3.00.0060.00319.38
8.2.180.0110.00718.41
8.2.170.0110.00422.96
8.2.160.0130.00020.40
8.2.150.0080.00024.18
8.2.140.0080.00024.66
8.2.130.0040.00426.16
8.2.120.0040.00422.16
8.2.110.0030.00622.20
8.2.100.0110.00017.66
8.2.90.0040.00419.05
8.2.80.0040.00417.97
8.2.70.0070.00317.38
8.2.60.0080.00017.80
8.2.50.0080.00018.07
8.2.40.0000.00718.09
8.2.30.0040.00817.88
8.2.20.0040.00417.63
8.2.10.0040.00418.00
8.2.00.0040.00417.74
8.1.280.0100.00725.92
8.1.270.0120.00822.06
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0060.00323.96
8.1.230.0120.00019.15
8.1.220.0050.00317.74
8.1.210.0040.00418.77
8.1.200.0060.00317.00
8.1.190.0050.00317.54
8.1.180.0060.00318.10
8.1.170.0000.00818.39
8.1.160.0030.00522.00
8.1.150.0040.00418.64
8.1.140.0050.00217.27
8.1.130.0000.00817.43
8.1.120.0000.00717.38
8.1.110.0040.00417.36
8.1.100.0000.00717.40
8.1.90.0000.00717.30
8.1.80.0040.00417.45
8.1.70.0050.00317.25
8.1.60.0050.00317.45
8.1.50.0080.00017.48
8.1.40.0000.00817.51
8.1.30.0030.00517.58
8.1.20.0050.00217.59
8.1.10.0060.00317.56
8.1.00.0060.00317.40
8.0.300.0070.00018.77
8.0.290.0000.00716.93
8.0.280.0030.00318.30
8.0.270.0000.00717.12
8.0.260.0030.00316.86
8.0.250.0070.00016.84
8.0.240.0000.00716.93
8.0.230.0030.00416.97
8.0.220.0030.00316.95
8.0.210.0030.00716.77
8.0.200.0000.00616.92
8.0.190.0040.00416.86
8.0.180.0040.00416.89
8.0.170.0000.00716.93
8.0.160.0050.00216.85
8.0.150.0000.00716.86
8.0.140.0060.00316.81
8.0.130.0060.00013.29
8.0.120.0040.00416.89
8.0.110.0080.00016.86
8.0.100.0000.00716.74
8.0.90.0040.00416.86
8.0.80.0060.01016.93
8.0.70.0040.00416.86
8.0.60.0000.00816.87
8.0.50.0040.00416.69
8.0.30.0120.00716.92
8.0.20.0080.01117.40
8.0.10.0070.00017.00
8.0.00.0090.00916.82
7.4.330.0020.00215.15
7.4.320.0000.00616.46
7.4.300.0060.00016.61
7.4.290.0050.00216.43
7.4.280.0070.00316.59
7.4.270.0030.00316.53
7.4.260.0050.00316.48
7.4.250.0000.00816.36
7.4.240.0000.00816.63
7.4.230.0040.00416.41
7.4.220.0140.00316.55
7.4.210.0080.00616.64
7.4.200.0070.00016.59
7.4.190.0070.00016.55
7.4.160.0130.01016.49
7.4.150.0100.01717.40
7.4.140.0110.00617.86
7.4.130.0030.01416.54
7.4.120.0110.00616.52
7.4.110.0150.00316.43
7.4.100.0130.00716.54
7.4.90.0160.00316.43
7.4.80.0150.00319.39
7.4.70.0040.01416.53
7.4.60.0060.01216.68
7.4.50.0000.00416.56
7.4.40.0100.00822.77
7.4.30.0140.00316.66
7.4.00.0060.00815.18
7.3.330.0030.00313.32
7.3.320.0000.00513.31
7.3.310.0030.00316.18
7.3.300.0060.00016.24
7.3.290.0070.00716.35
7.3.280.0110.00616.37
7.3.270.0000.01817.40
7.3.260.0090.00916.43
7.3.250.0140.00716.48
7.3.240.0160.00016.37
7.3.230.0130.00616.39
7.3.210.0100.01016.61
7.3.200.0100.00719.39
7.3.190.0030.01316.44
7.3.180.0160.00016.56
7.3.170.0030.01316.49
7.3.160.0090.00616.53
7.3.120.0030.01414.93
7.2.330.0100.00716.61
7.2.320.0060.01216.43
7.2.310.0130.00316.54
7.2.300.0120.00916.68
7.2.290.0030.01316.61
7.2.60.0030.01016.56
7.2.00.0090.00319.50
7.1.200.0060.00615.68
7.1.100.0040.00817.89
7.1.70.0080.00317.07
7.1.60.0030.02119.33
7.1.50.0060.00916.52
7.1.00.0030.07722.46
7.0.200.0000.00916.79
7.0.140.0070.07021.93
7.0.60.0070.06719.93
7.0.50.0100.06317.89
7.0.40.0100.07320.09
7.0.30.0330.07720.06
7.0.20.0230.04720.15
7.0.10.0100.08720.14
7.0.00.0000.06320.27
5.6.280.0000.07321.15
5.6.210.0130.08020.45
5.6.200.0170.07018.27
5.6.190.0030.04320.61
5.6.180.0330.04320.68
5.6.170.0100.04320.44
5.6.160.0170.07720.46
5.6.150.0030.04018.19
5.6.140.0000.05018.18
5.6.130.0130.07718.28
5.6.120.0130.07721.13
5.6.110.0170.07721.00
5.6.100.0000.04720.98
5.6.90.0000.04320.98
5.6.80.0100.05720.41
5.6.70.4130.03320.53
5.5.350.0230.05720.41
5.5.340.0100.06018.08
5.5.330.0100.07720.21
5.5.320.0230.04720.37
5.5.310.0270.03720.27
5.5.300.0100.03317.98
5.5.290.0100.06318.06
5.5.280.0070.03720.78
5.5.270.0000.05720.66
5.5.260.0100.08320.87
5.5.250.0070.08720.67
5.5.240.0200.06320.38
5.4.450.0070.06319.39
5.4.440.0670.06019.50
5.4.430.0670.04719.26
5.4.420.0200.04719.28
5.4.410.0670.06019.21
5.4.400.0670.05719.16
5.4.390.0430.05019.24
5.4.380.0330.05018.73
5.4.370.0200.06318.45
5.4.360.0230.05718.64
5.4.350.0170.06318.63
5.4.340.0300.05318.85
5.4.320.0050.03812.51
5.4.310.0070.03712.50
5.4.300.0040.04412.51
5.4.290.0100.03512.50
5.4.280.0060.04212.40
5.4.270.0080.04112.40
5.4.260.0060.03712.40
5.4.250.0060.03712.40
5.4.240.0060.03512.40
5.4.230.0060.04412.39
5.4.220.0060.03512.39
5.4.210.0060.04112.39
5.4.200.0060.03912.39
5.4.190.0170.04412.38
5.4.180.0190.04312.38
5.4.170.0490.07312.39
5.4.160.0360.09012.39
5.4.150.0160.04512.38
5.4.140.0160.04312.06
5.4.130.0200.03912.06
5.4.120.0120.04512.01
5.4.110.0140.04312.00
5.4.100.0150.04412.01
5.4.90.0160.04112.01
5.4.80.0120.04612.01
5.4.70.0120.04512.00
5.4.60.0180.03912.00
5.4.50.0160.04012.00
5.4.40.0260.06112.00
5.4.30.0130.04611.99
5.4.20.0130.04511.99
5.4.10.0150.04111.99
5.4.00.0140.04111.48
5.3.290.0070.04312.80
5.3.280.0070.04712.71
5.3.270.0140.04612.73
5.3.260.0290.06212.72
5.3.250.0190.04112.72
5.3.240.0180.04312.72
5.3.230.0150.04612.71
5.3.220.0130.04712.68
5.3.210.0120.04912.68
5.3.200.0240.06712.68
5.3.190.0120.05012.68
5.3.180.0140.04612.67
5.3.170.0200.04112.67
5.3.160.0160.04612.67
5.3.150.0210.04012.68
5.3.140.0170.04312.66
5.3.130.0160.04712.65
5.3.120.0220.04012.66
5.3.110.0170.04312.66
5.3.100.0170.04312.12
5.3.90.0190.04012.10
5.3.80.0190.04112.09
5.3.70.0140.04612.10
5.3.60.0100.05012.08
5.3.50.0210.03712.03
5.3.40.0170.04212.03
5.3.30.0160.04112.00
5.3.20.0130.04411.78
5.3.10.0170.03911.73
5.3.00.0140.04211.71
5.2.170.0160.0319.22
5.2.160.0230.0869.23
5.2.150.0130.0349.22
5.2.140.0150.0329.23
5.2.130.0090.0389.19
5.2.120.0150.0329.18
5.2.110.0220.0629.19
5.2.100.0140.0369.19
5.2.90.0380.0739.19
5.2.80.0110.0389.18
5.2.70.0150.0359.18
5.2.60.0110.0399.13
5.2.50.0180.0319.10
5.2.40.0120.0369.08
5.2.30.0160.0349.05
5.2.20.0120.0389.05
5.2.10.0120.0378.95
5.2.00.0180.0938.80
5.1.60.0130.0288.09
5.1.50.0170.0258.08
5.1.40.0110.0318.08
5.1.30.0080.0358.42
5.1.20.0120.0348.45
5.1.10.0260.0508.16
5.1.00.0120.0328.16
5.0.50.0130.0226.65
5.0.40.0100.0256.50
5.0.30.0110.0356.32
5.0.20.0100.0236.29
5.0.10.0120.0226.26
5.0.00.0220.0866.26
4.4.90.0100.0154.78
4.4.80.0060.0194.76
4.4.70.0060.0194.75
4.4.60.0050.0204.76
4.4.50.0030.0224.77
4.4.40.0070.0304.71
4.4.30.0220.0344.76
4.4.20.0040.0214.84
4.4.10.0080.0184.85
4.4.00.0100.0264.76
4.3.110.0070.0184.67
4.3.100.0080.0184.66
4.3.90.0090.0164.64
4.3.80.0090.0264.58
4.3.70.0070.0174.63
4.3.60.0020.0234.62
4.3.50.0080.0164.63
4.3.40.0100.0244.54
4.3.30.0070.0163.29
4.3.20.0040.0203.29
4.3.10.0050.0173.25
4.3.00.0070.0177.77

preferences:
40.58 ms | 401 KiB | 5 Q