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(); echo $connect->serialize(); ?>

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.0120.00318.91
8.3.30.0180.00418.90
8.3.20.0040.00420.13
8.3.10.0040.00423.66
8.3.00.0040.00420.50
8.2.170.0070.01422.96
8.2.160.0070.00722.26
8.2.150.0000.00824.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0060.00317.63
8.2.110.0060.00322.08
8.2.100.0040.00718.03
8.2.90.0000.00819.17
8.2.80.0040.00418.03
8.2.70.0040.00717.47
8.2.60.0040.00417.93
8.2.50.0040.00418.07
8.2.40.0040.00419.95
8.2.30.0030.00618.13
8.2.20.0000.00717.64
8.2.10.0040.00417.82
8.2.00.0070.00017.60
8.1.270.0060.00323.88
8.1.260.0060.00326.35
8.1.250.0040.00428.09
8.1.240.0060.00323.97
8.1.230.0040.00719.12
8.1.220.0000.00817.74
8.1.210.0000.00818.77
8.1.200.0000.01017.35
8.1.190.0090.00017.66
8.1.180.0040.00418.10
8.1.170.0040.00818.46
8.1.160.0000.00721.89
8.1.150.0040.00418.60
8.1.140.0070.00017.41
8.1.130.0000.00817.89
8.1.120.0000.00717.42
8.1.110.0040.00417.46
8.1.100.0040.00417.38
8.1.90.0000.00717.40
8.1.80.0000.00717.47
8.1.70.0030.00317.30
8.1.60.0030.00517.59
8.1.50.0030.00617.57
8.1.40.0040.00417.55
8.1.30.0080.00017.69
8.1.20.0040.00417.68
8.1.10.0030.00617.47
8.1.00.0060.00317.43
8.0.300.0000.00718.77
8.0.290.0040.00417.16
8.0.280.0070.00018.58
8.0.270.0000.00717.27
8.0.260.0030.00316.80
8.0.250.0000.00716.99
8.0.240.0000.00717.01
8.0.230.0040.00416.93
8.0.220.0000.00716.96
8.0.210.0000.00616.91
8.0.200.0030.00316.94
8.0.190.0030.00516.96
8.0.180.0000.00716.81
8.0.170.0030.00516.91
8.0.160.0000.00717.03
8.0.150.0040.00316.88
8.0.140.0080.00016.84
8.0.130.0030.00313.27
8.0.120.0040.00416.81
8.0.110.0000.00716.92
8.0.100.0040.00416.76
8.0.90.0050.00316.79
8.0.80.0100.00716.83
8.0.70.0000.00716.77
8.0.60.0000.00716.81
8.0.50.0040.00417.00
8.0.30.0110.00816.96
8.0.20.0060.01317.40
8.0.10.0020.00517.09
8.0.00.0120.00816.87
7.4.330.0030.00315.00
7.4.320.0000.00716.57
7.4.300.0030.00316.57
7.4.290.0030.00616.54
7.4.280.0030.00316.50
7.4.270.0070.00016.50
7.4.260.0030.00316.37
7.4.250.0000.00716.62
7.4.240.0040.00416.59
7.4.230.0070.00016.52
7.4.220.0040.02216.47
7.4.210.0080.00816.59
7.4.200.0000.00716.71
7.4.190.0030.00316.69
7.4.160.0110.00616.43
7.4.150.0130.00617.40
7.4.140.0150.00617.86
7.4.130.0060.01116.45
7.4.120.0120.00516.55
7.4.110.0080.00816.64
7.4.100.0000.02116.52
7.4.90.0090.00916.37
7.4.80.0040.01416.41
7.4.70.0090.00916.48
7.4.60.0100.00616.58
7.4.50.0000.00816.35
7.4.40.0070.01022.77
7.4.30.0150.00716.37
7.4.00.0000.01614.96
7.3.330.0000.00513.39
7.3.320.0030.00313.45
7.3.310.0050.00216.37
7.3.300.0070.00016.29
7.3.290.0080.00816.34
7.3.280.0110.00616.33
7.3.270.0110.01517.40
7.3.260.0030.03916.39
7.3.250.0150.00616.41
7.3.240.0110.01016.61
7.3.230.0100.00616.39
7.3.210.0120.01216.45
7.3.200.0140.01019.39
7.3.190.0070.01116.33
7.3.180.0130.00716.47
7.3.170.0000.01616.57
7.3.160.0130.00316.43
7.3.120.0040.01115.02
7.3.10.0070.01315.86
7.3.00.0090.00916.20
7.2.330.0070.01016.68
7.2.320.0210.00316.42
7.2.310.0090.00916.61
7.2.300.0080.00816.57
7.2.290.0100.00716.84
7.2.130.0060.00916.73
7.2.120.0120.00617.07
7.2.110.0090.00616.80
7.2.100.0080.00516.49
7.2.90.0100.00716.86
7.2.80.0100.01016.82
7.2.70.0120.00316.59
7.2.60.0120.00416.53
7.2.50.0140.00916.52
7.2.40.0110.01117.00
7.2.30.0160.00316.76
7.2.20.0200.00516.64
7.2.10.0080.01016.82
7.2.00.0020.01017.80
7.1.250.0090.00915.83
7.1.200.0060.00615.78
7.1.70.0060.00917.07
7.1.60.0000.01116.93
7.1.50.0110.00734.63
7.1.00.0070.07322.31
7.0.200.0100.00616.65
7.0.140.0030.07022.07
7.0.60.0170.08719.79
7.0.50.0170.07017.88
7.0.40.0100.05320.41
7.0.30.0200.08020.09
7.0.20.0300.07720.23
7.0.10.0370.07320.29
7.0.00.0000.09020.22
5.6.280.0000.07721.07
5.6.210.0070.08020.48
5.6.200.0130.07718.29
5.6.190.0070.09020.47
5.6.180.0070.08020.41
5.6.170.0330.07320.48
5.6.160.0100.05320.56
5.6.150.0070.04018.21
5.6.140.0100.08318.18
5.6.130.0100.07318.13
5.6.120.0170.07721.11
5.6.110.0000.09320.98
5.6.100.0030.08020.99
5.6.90.0070.07020.88
5.6.80.0070.07720.39
5.5.350.0230.06720.45
5.5.340.0200.04317.99
5.5.330.0130.07020.43
5.5.320.0070.06720.34
5.5.310.0170.05320.23
5.5.300.0070.07717.98
5.5.290.0100.03717.97
5.5.280.0070.08320.88
5.5.270.0070.04720.77
5.5.260.0070.08320.97
5.5.250.0070.08320.65
5.5.240.0200.07320.13
5.4.450.0670.04319.46
5.4.440.0330.04319.64
5.4.430.0070.02719.51
5.4.420.0730.05019.23
5.4.410.0570.04719.34
5.4.400.0230.05718.52
5.4.390.0970.07018.78
5.4.380.0070.08318.59
5.4.370.0270.04018.79
5.4.360.0200.06018.53
5.4.350.0270.04718.78
5.4.340.0200.05318.50
5.4.320.0050.03712.50
5.4.310.0080.03612.50
5.4.300.0070.03512.51
5.4.290.0070.04412.50
5.4.280.0060.03612.40
5.4.270.0040.03812.40
5.4.260.0080.03512.40
5.4.250.0060.03712.40
5.4.240.0050.03812.39
5.4.230.0080.03512.39
5.4.220.0060.03812.39
5.4.210.0090.03912.39
5.4.200.0070.03712.39
5.4.190.0130.05012.39
5.4.180.0180.04612.38
5.4.170.0110.04912.39
5.4.160.0350.08712.39
5.4.150.0190.04112.38
5.4.140.0100.04912.07
5.4.130.0160.04512.05
5.4.120.0160.04112.01
5.4.110.0130.04512.01
5.4.100.0200.04412.00
5.4.90.0170.04312.01
5.4.80.0170.04112.01
5.4.70.0180.03812.00
5.4.60.0200.04212.00
5.4.50.0190.04312.00
5.4.40.0160.04411.99
5.4.30.0250.09811.99
5.4.20.0150.04411.99
5.4.10.0180.04311.99
5.4.00.0150.04311.48
5.3.290.0030.04112.80
5.3.280.0070.03612.71
5.3.270.0320.06412.72
5.3.260.0150.04912.72
5.3.250.0130.04912.71
5.3.240.0260.06612.72
5.3.230.0190.04612.71
5.3.220.0190.04412.68
5.3.210.0370.09012.68
5.3.200.0190.04412.68
5.3.190.0150.04812.68
5.3.180.0150.04712.68
5.3.170.0180.04612.66
5.3.160.0170.04712.67
5.3.150.0230.03912.68
5.3.140.0440.08412.66
5.3.130.0170.04512.66
5.3.120.0540.07312.66
5.3.110.0200.04512.65
5.3.100.0200.04212.13
5.3.90.0200.04312.11
5.3.80.0390.08912.09
5.3.70.0200.04612.10
5.3.60.0210.04312.08
5.3.50.0260.06812.03
5.3.40.0150.04412.03
5.3.30.0170.04012.00
5.3.20.0170.04311.78
5.3.10.0100.04611.73
5.3.00.0160.04211.72
5.2.170.0120.0379.23
5.2.160.0110.0379.23
5.2.150.0240.0889.22
5.2.140.0160.0329.22
5.2.130.0160.0329.18
5.2.120.0100.0379.18
5.2.110.0120.0369.19
5.2.100.0150.0319.19
5.2.90.0200.0269.19
5.2.80.0170.0319.18
5.2.70.0130.0359.18
5.2.60.0080.0409.14
5.2.50.0110.0389.10
5.2.40.0090.0379.08
5.2.30.0180.0289.05
5.2.20.0140.0329.05
5.2.10.0110.0348.96
5.2.00.0140.0328.80
5.1.60.0090.0308.09
5.1.50.0120.0288.08
5.1.40.0130.0288.08
5.1.30.0190.0248.42
5.1.20.0080.0348.45
5.1.10.0100.0328.16
5.1.00.0140.0278.16
5.0.50.0110.0236.66
5.0.40.0110.0216.50
5.0.30.0080.0366.32
5.0.20.0130.0196.29
5.0.10.0090.0226.27
5.0.00.0090.0356.25
4.4.90.0040.0214.78
4.4.80.0110.0154.76
4.4.70.0100.0174.76
4.4.60.0070.0194.75
4.4.50.0060.0224.77
4.4.40.0090.0294.70
4.4.30.0050.0204.76
4.4.20.0070.0194.84
4.4.10.0070.0194.85
4.4.00.0100.0264.76
4.3.110.0100.0154.67
4.3.100.0100.0144.66
4.3.90.0090.0154.64
4.3.80.0160.0804.59
4.3.70.0060.0184.63
4.3.60.0090.0154.63
4.3.50.0080.0174.63
4.3.40.0050.0304.54
4.3.30.0050.0193.30
4.3.20.0040.0203.29
4.3.10.0050.0183.24
4.3.00.0030.01315.45

preferences:
49.03 ms | 400 KiB | 5 Q