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 implode(',',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(); echo $conect->__sleep(); ?>

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.40.0070.01018.75
8.3.30.0110.00319.17
8.3.20.0070.00020.34
8.3.10.0080.00022.14
8.3.00.0050.00322.64
8.2.170.0150.00022.96
8.2.160.0130.00720.94
8.2.150.0020.00524.18
8.2.140.0000.00924.66
8.2.130.0050.00326.16
8.2.120.0040.00419.48
8.2.110.0070.00322.05
8.2.100.0090.00319.57
8.2.90.0040.00419.23
8.2.80.0030.00519.54
8.2.70.0040.00417.50
8.2.60.0030.00617.93
8.2.50.0050.00318.07
8.2.40.0080.00017.91
8.2.30.0040.00418.10
8.2.20.0030.00517.80
8.2.10.0040.00417.64
8.2.00.0040.00417.63
8.1.270.0040.00422.02
8.1.260.0060.00326.35
8.1.250.0040.00428.09
8.1.240.0080.00023.84
8.1.230.0070.00419.14
8.1.220.0050.00317.74
8.1.210.0000.00818.77
8.1.200.0070.00317.22
8.1.190.0050.00317.43
8.1.180.0040.00418.10
8.1.170.0050.00318.47
8.1.160.0040.00421.80
8.1.150.0080.00018.69
8.1.140.0070.00017.39
8.1.130.0040.00417.84
8.1.120.0050.00217.32
8.1.110.0000.00717.32
8.1.100.0000.00717.37
8.1.90.0040.00417.35
8.1.80.0070.00017.42
8.1.70.0000.00817.28
8.1.60.0020.00517.48
8.1.50.0000.00817.49
8.1.40.0030.00617.43
8.1.30.0080.00017.67
8.1.20.0000.00817.63
8.1.10.0030.00617.46
8.1.00.0000.00717.49
8.0.300.0030.00318.77
8.0.290.0000.00717.05
8.0.280.0000.00718.38
8.0.270.0000.00717.27
8.0.260.0030.00318.44
8.0.250.0030.00316.91
8.0.240.0030.00617.02
8.0.230.0060.00316.79
8.0.220.0000.00716.76
8.0.210.0030.00416.73
8.0.200.0000.00716.88
8.0.190.0030.00516.86
8.0.180.0030.00316.86
8.0.170.0050.00316.90
8.0.160.0040.00416.87
8.0.150.0000.00716.80
8.0.140.0050.00316.70
8.0.130.0050.00013.23
8.0.120.0000.00816.79
8.0.110.0050.00216.84
8.0.100.0000.00716.95
8.0.90.0050.00316.67
8.0.80.0070.01416.87
8.0.70.0040.00416.72
8.0.60.0040.00416.87
8.0.50.0040.00416.70
8.0.30.0110.00817.19
8.0.20.0130.00617.40
8.0.10.0040.00416.95
8.0.00.0170.00216.69
7.4.330.0060.00015.05
7.4.320.0030.00316.57
7.4.300.0070.00016.49
7.4.290.0040.00416.47
7.4.280.0030.00316.56
7.4.270.0000.00716.63
7.4.260.0080.00316.61
7.4.250.0030.00516.49
7.4.240.0040.00316.57
7.4.230.0000.00816.52
7.4.220.0130.00616.68
7.4.210.0070.01116.56
7.4.200.0000.00816.41
7.4.190.0040.00416.51
7.4.160.0090.00616.48
7.4.150.0060.01217.40
7.4.140.0120.00817.86
7.4.130.0090.00716.55
7.4.120.0100.00716.54
7.4.110.0100.00716.42
7.4.100.0200.00316.37
7.4.90.0140.00316.46
7.4.80.0090.00919.39
7.4.70.0120.00416.52
7.4.60.0060.01216.59
7.4.50.0040.00416.57
7.4.40.0070.01122.77
7.4.30.0090.00916.47
7.4.00.0040.00814.88
7.3.330.0050.00013.25
7.3.320.0000.00513.20
7.3.310.0060.00316.30
7.3.300.0030.00316.30
7.3.290.0120.00416.25
7.3.280.0040.01116.24
7.3.270.0100.00617.40
7.3.260.0110.00516.17
7.3.250.0110.00916.26
7.3.240.0090.01316.50
7.3.230.0090.00916.39
7.3.210.0120.00316.42
7.3.200.0060.01519.39
7.3.190.0030.01616.51
7.3.180.0080.00816.41
7.3.170.0080.00816.50
7.3.160.0030.01516.28
7.3.120.0100.00714.78
7.2.330.0060.01216.84
7.2.320.0160.00316.63
7.2.310.0060.01716.50
7.2.300.0230.01416.64
7.2.290.0200.00316.41
7.2.00.0090.00919.46
7.1.100.0060.00618.01
7.1.70.0000.01016.95
7.1.60.0140.01019.82
7.1.50.0100.01016.94
7.1.00.0070.07322.29
7.0.200.0000.00716.65
7.0.140.0030.07322.09
7.0.110.0030.08720.07
7.0.100.0100.07720.08
7.0.90.0100.05019.85
7.0.80.0000.06320.01
7.0.70.0030.08019.93
7.0.60.0170.07020.04
7.0.50.0130.07719.88
7.0.40.0030.08319.89
7.0.30.0130.07319.88
7.0.20.0100.08319.66
7.0.10.0030.08019.74
7.0.00.0070.08019.84
5.6.280.0000.07720.87
5.6.260.0030.08320.52
5.6.250.0200.07320.66
5.6.240.0100.06320.64
5.6.230.0100.08320.47
5.6.220.0000.09720.68
5.6.210.0030.08720.59
5.6.200.0070.08320.63
5.6.190.0030.06720.59
5.6.180.0100.07720.65
5.6.170.0070.08020.86
5.6.160.0100.04020.57
5.6.150.0100.07720.57
5.6.140.0100.07720.66
5.6.130.0070.08020.86
5.6.120.0130.07320.86
5.6.110.0070.08320.85
5.6.100.0170.08020.69
5.6.90.0070.03720.63
5.6.80.0030.05320.00
5.6.70.0030.04020.01
5.6.60.0030.04020.07
5.6.50.0130.03020.09
5.6.40.0030.04020.03
5.6.30.0030.03719.92
5.6.20.0030.04319.82
5.6.10.0100.07020.06
5.6.00.0100.07719.98
5.5.380.0030.07317.53
5.5.370.0100.08317.47
5.5.360.0100.08017.68
5.5.350.0030.08017.50
5.5.340.0130.08017.91
5.5.330.0030.08318.09
5.5.320.0070.06317.91
5.5.310.0100.07717.91
5.5.300.0070.08718.27
5.5.290.0170.06718.09
5.5.280.0130.07717.83
5.5.270.0100.04718.09
5.5.260.0070.08718.04
5.5.250.0030.05717.72
5.5.240.0000.04017.43
5.5.230.0000.04317.30
5.5.220.0000.04017.20
5.5.210.0070.03317.30
5.5.200.0100.03317.22
5.5.190.0030.03717.26
5.5.180.0100.03317.44
5.5.160.0000.03717.40
5.5.150.0030.05317.26
5.5.140.0100.07317.27
5.5.130.0030.03717.27
5.5.120.0030.05317.44
5.5.110.0100.03317.44
5.5.100.0000.04017.38
5.5.90.0030.06017.16
5.5.80.0070.03017.34
5.5.70.0070.03317.41
5.5.60.0030.03717.46
5.5.50.0130.02717.36
5.5.40.0100.03317.07
5.5.30.0030.04017.31
5.5.20.0100.03017.32
5.5.10.0030.03717.36
5.5.00.0070.06017.16
5.4.450.0130.07019.55
5.4.440.0030.08319.27
5.4.430.0030.08319.41
5.4.420.0130.03719.34
5.4.410.0030.03719.44
5.4.400.0030.05719.14
5.4.390.0000.04019.02
5.4.380.0030.04318.99
5.4.370.0030.03718.99
5.4.360.0130.02719.16
5.4.350.0000.04019.18
5.4.340.0070.03319.23
5.4.320.0070.07718.99
5.4.310.0070.07719.16
5.4.300.0100.07319.18
5.4.290.0000.04319.22
5.4.280.0030.04719.00
5.4.270.0070.04018.98
5.4.260.0070.03019.22
5.4.250.0030.03719.02
5.4.240.0030.07019.00
5.4.230.0070.03319.03
5.4.220.0070.06719.33
5.4.210.0030.04319.22
5.4.200.0030.03719.33
5.4.190.0030.04719.02
5.4.180.0030.04019.17
5.4.170.0070.06319.01
5.4.160.0070.03318.98
5.4.150.0030.04019.12
5.4.140.0000.04016.44
5.4.130.0030.03716.53
5.4.120.0030.05316.50
5.4.110.0000.03716.65
5.4.100.0000.06716.26
5.4.90.0000.03716.42
5.4.80.0070.03316.57
5.4.70.0000.03716.53
5.4.60.0000.05316.45
5.4.50.0100.03016.40
5.4.40.0000.04316.52
5.4.30.0070.04716.59
5.4.20.0030.03716.38
5.4.10.0130.06316.48
5.4.00.0000.06315.96
5.3.290.0070.04314.69
5.3.280.0030.07014.56
5.3.270.0000.07714.76
5.3.260.0100.02714.63
5.3.250.0070.06014.47
5.3.240.0000.03714.47
5.3.230.0100.05714.56
5.3.220.0070.03314.56
5.3.210.0030.06714.61
5.3.200.0030.04314.55
5.3.190.0030.05014.61
5.3.180.0100.05714.59
5.3.170.0030.04314.65
5.3.160.0070.05314.61
5.3.150.0070.03314.54
5.3.140.0000.05014.54
5.3.130.0070.03314.55
5.3.120.0100.06314.68
5.3.110.0070.07714.57
5.3.100.0000.08714.18
5.3.90.0030.07714.18
5.3.80.0070.05013.88
5.3.70.0070.03714.00
5.3.60.0100.04713.99
5.3.50.0130.06313.97
5.3.40.0030.07314.03
5.3.30.0070.04714.15
5.3.20.0030.04313.66
5.3.10.0130.06713.81
5.3.00.0130.07013.64
5.2.170.0000.06311.12
5.2.160.0070.05311.19
5.2.150.0070.06311.16
5.2.140.0130.05311.16
5.2.130.0030.06311.07
5.2.120.0070.04711.07
5.2.110.0100.04011.10
5.2.100.0100.05311.13
5.2.90.0000.07011.12
5.2.80.0100.05711.14
5.2.70.0030.04011.06
5.2.60.0000.06011.01
5.2.50.0030.06011.04
5.2.40.0030.06311.02
5.2.30.0070.05711.12
5.2.20.0070.05711.05
5.2.10.0070.06310.95
5.2.00.0030.05710.73
5.1.60.0030.05010.10
5.1.50.0070.0479.97
5.1.40.0030.0579.95
5.1.30.0000.06010.32
5.1.20.0100.03010.36
5.1.10.0030.06010.08
5.1.00.0100.0509.91
5.0.50.0030.0509.73
5.0.40.0030.0439.73
5.0.30.0030.0609.73
5.0.20.0030.0409.73
5.0.10.0070.0379.73
5.0.00.0070.0609.73
4.4.90.0000.0379.73
4.4.80.0030.0309.73
4.4.70.0000.0209.73
4.4.60.0030.0339.73
4.4.50.0000.0379.73
4.4.40.0070.0509.73
4.4.30.0000.0409.73
4.4.20.0000.0339.73
4.4.10.0100.0279.73
4.4.00.0070.0539.73
4.3.110.0030.0239.73
4.3.100.0000.0379.73
4.3.90.0030.0339.73
4.3.80.0030.0379.73
4.3.70.0030.0339.73
4.3.60.0000.0279.73
4.3.50.0000.0409.73
4.3.40.0100.0479.73
4.3.30.0070.0339.73
4.3.20.0030.0239.73
4.3.10.0000.0379.73
4.3.00.0000.0379.73

preferences:
42.06 ms | 400 KiB | 5 Q