3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Connection { public $server, $username, $password, $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.60.0130.00618.55
8.3.50.0150.00717.26
8.3.40.0060.00918.73
8.3.30.0040.01118.57
8.3.20.0030.00518.77
8.3.10.0040.00420.53
8.3.00.0040.00417.50
8.2.180.0040.01416.75
8.2.170.0110.00422.96
8.2.160.0040.01120.43
8.2.150.0060.00324.18
8.2.140.0040.00424.66
8.2.130.0000.00726.16
8.2.120.0040.00419.97
8.2.110.0130.01020.96
8.2.100.0040.00817.91
8.2.90.0000.00819.22
8.2.80.0050.00317.80
8.2.70.0000.00817.50
8.2.60.0000.00817.90
8.2.50.0060.00318.07
8.2.40.0090.00019.82
8.2.30.0040.00417.94
8.2.20.0000.00717.71
8.2.10.0040.00417.63
8.2.00.0060.00317.50
8.1.280.0080.00625.92
8.1.270.0070.00024.66
8.1.260.0000.00826.35
8.1.250.0040.00428.09
8.1.240.0180.00320.88
8.1.230.0090.00321.02
8.1.220.0040.00417.74
8.1.210.0040.00418.85
8.1.200.0040.00417.13
8.1.190.0080.00017.40
8.1.180.0000.00818.10
8.1.170.0060.00318.75
8.1.160.0080.00018.75
8.1.150.0080.00018.59
8.1.140.0000.00717.38
8.1.130.0000.00717.81
8.1.120.0000.00717.41
8.1.110.0060.00317.38
8.1.100.0000.00817.40
8.1.90.0070.00017.38
8.1.80.0040.00417.36
8.1.70.0000.00717.40
8.1.60.0000.00717.60
8.1.50.0050.00217.48
8.1.40.0000.00717.36
8.1.30.0000.00817.69
8.1.20.0040.00417.68
8.1.10.0090.00017.54
8.1.00.0030.00617.42
8.0.300.0090.00019.93
8.0.290.0040.00416.75
8.0.280.0040.00418.32
8.0.270.0040.00417.14
8.0.260.0080.00018.51
8.0.250.0000.00716.96
8.0.240.0040.00416.80
8.0.230.0030.00316.95
8.0.220.0050.00216.84
8.0.210.0040.00416.70
8.0.200.0040.00416.73
8.0.190.0080.00016.91
8.0.180.0000.00816.85
8.0.170.0030.00616.92
8.0.160.0000.00716.88
8.0.150.0000.00716.82
8.0.140.0040.00716.78
8.0.130.0060.00013.26
8.0.120.0080.00016.72
8.0.110.0000.00816.63
8.0.100.0040.00416.82
8.0.90.0070.00016.85
8.0.80.0070.01416.81
8.0.70.0040.00416.71
8.0.60.0040.00416.62
8.0.50.0000.00716.79
8.0.30.0130.00516.96
8.0.20.0090.00917.28
8.0.10.0030.00516.80
8.0.00.0100.00716.59
7.4.330.0030.00314.71
7.4.320.0070.00016.39
7.4.300.0060.00016.49
7.4.290.0030.00316.50
7.4.280.0060.00316.61
7.4.270.0000.00916.57
7.4.260.0000.00513.31
7.4.250.0030.00516.62
7.4.240.0040.00416.50
7.4.230.0000.00816.62
7.4.220.0100.01116.50
7.4.210.0120.00516.59
7.4.200.0040.00416.70
7.4.190.0030.00316.46
7.4.160.0070.01016.43
7.4.150.0090.00917.07
7.4.140.0070.01017.20
7.4.130.0090.00816.44
7.4.120.0100.00816.49
7.4.110.0070.01016.59
7.4.100.0120.00616.41
7.4.90.0100.00716.50
7.4.80.0060.01318.80
7.4.70.0070.01116.31
7.4.60.0100.00716.49
7.4.50.0000.00416.50
7.4.40.0070.00722.27
7.4.30.0060.01216.58
7.4.00.0100.00315.05
7.3.330.0000.00613.20
7.3.320.0000.00513.04
7.3.310.0050.00316.23
7.3.300.0030.00316.24
7.3.290.0090.00616.25
7.3.280.0070.00716.26
7.3.270.0090.00617.07
7.3.260.0080.01318.24
7.3.250.0110.00916.23
7.3.240.0070.01016.27
7.3.230.0040.01316.50
7.3.210.0100.00716.36
7.3.200.0070.01419.39
7.3.190.0090.01216.37
7.3.180.0130.00316.38
7.3.170.0060.00916.45
7.3.160.0080.00816.31
7.3.120.0000.01414.95
7.3.10.0140.00716.18
7.3.00.0160.00316.33
7.2.330.0100.01316.59
7.2.320.0030.01316.34
7.2.310.0100.00716.55
7.2.300.0090.00816.66
7.2.290.0060.01116.51
7.2.130.0070.01116.47
7.2.120.0140.00716.64
7.2.110.0120.01216.24
7.2.100.0140.00716.71
7.2.90.0150.00816.34
7.2.80.0150.00316.28
7.2.70.0100.00716.64
7.2.60.0110.00616.67
7.2.50.0100.01016.61
7.2.40.0140.00316.64
7.2.30.0150.00916.34
7.2.20.0170.00616.50
7.2.10.0100.00716.74
7.2.00.0100.00718.03
7.1.250.0150.00315.15
7.1.200.0030.01315.56
7.1.100.0040.00818.26
7.1.70.0040.00416.91
7.1.60.0070.01519.40
7.1.50.0030.01416.93
7.1.00.0000.06322.46
7.0.200.0040.00416.41
7.0.140.0030.07021.97
7.0.120.0100.03022.15
7.0.60.0130.07719.95
7.0.50.0130.07717.88
7.0.40.0000.08320.31
7.0.30.0230.05020.09
7.0.20.0270.06720.10
7.0.10.0100.05720.26
7.0.00.0200.03020.33
5.6.280.0030.07321.07
5.6.210.0170.07320.73
5.6.200.0070.06018.29
5.6.190.0100.05320.50
5.6.180.4370.04720.57
5.6.170.0270.07320.54
5.6.160.0070.07720.38
5.6.150.0100.07018.15
5.6.140.0070.08018.24
5.6.130.0100.04318.28
5.6.120.0100.07321.01
5.6.110.0000.04321.09
5.6.100.0070.08020.96
5.6.90.0070.06721.10
5.6.80.0070.03720.54
5.6.70.3100.02720.28
5.5.350.0230.07720.50
5.5.340.0030.03718.02
5.5.330.0100.08020.56
5.5.320.5000.04020.27
5.5.310.0400.07720.32
5.5.300.0100.04717.98
5.5.290.0100.07717.99
5.5.280.0070.07020.79
5.5.270.0100.08020.89
5.5.260.0100.08320.76
5.5.250.0100.04320.58
5.5.240.0170.04020.37
5.4.450.0070.06319.30
5.4.440.0030.04019.47
5.4.430.0030.06319.17
5.4.420.0100.05319.47
5.4.410.0030.04719.28
5.4.400.0100.06718.98
5.4.390.0030.04719.00
5.4.380.0100.04719.14
5.4.370.0100.03319.00
5.4.360.0100.07319.20
5.4.350.0030.05719.16
5.4.340.0070.04718.86
5.4.320.0030.07019.20
5.4.310.0070.07019.08
5.4.300.0030.07719.14
5.4.290.0030.06318.85
5.4.280.0030.05318.85
5.4.270.0100.03719.08
5.4.260.0100.07718.98
5.4.250.0130.04719.14
5.4.240.0030.05318.87
5.4.230.0100.04319.15
5.4.220.0130.06318.84
5.4.210.0100.07019.14
5.4.200.0170.07719.24
5.4.190.0070.07318.84
5.4.180.0070.04319.13
5.4.170.0100.07019.23
5.4.160.0030.07319.22
5.4.150.0070.07719.13
5.4.140.0030.07316.26
5.4.130.0030.06316.45
5.4.120.0030.03716.50
5.4.110.0000.04016.41
5.4.100.0100.03716.52
5.4.90.0130.07016.39
5.4.80.0000.05016.39
5.4.70.0070.04016.40
5.4.60.0030.04716.64
5.4.50.0070.07016.36
5.4.40.0130.06016.36
5.4.30.0170.04016.38
5.4.20.0100.03016.24
5.4.10.0070.07316.43
5.4.00.0170.05015.95
5.3.290.0170.05714.72
5.3.280.0170.06714.53
5.3.270.0100.06314.76
5.3.260.0130.06714.63
5.3.250.0030.06714.63
5.3.240.0030.04014.67
5.3.230.0100.04014.74
5.3.220.0100.06314.59
5.3.210.0100.07714.49
5.3.200.0070.03714.72
5.3.190.0070.04014.64
5.3.180.0070.04014.49
5.3.170.0070.04714.61
5.3.160.0130.05014.72
5.3.150.0030.07714.64
5.3.140.0130.05014.48
5.3.130.0030.05014.55
5.3.120.0070.03714.72
5.3.110.0070.03714.58
5.3.100.0170.06714.06
5.3.90.0170.06314.03
5.3.80.0030.07714.10
5.3.70.0030.08013.96
5.3.60.0000.06013.96
5.3.50.0030.04314.11
5.3.40.0000.05714.09
5.3.30.0030.04013.96
5.3.20.0130.03713.77
5.3.10.0170.06313.81
5.3.00.0170.03713.68
5.2.170.0070.03311.23
5.2.160.0030.06011.21
5.2.150.0000.05011.18
5.2.140.0070.06011.07
5.2.130.0100.05711.11
5.2.120.0130.05011.19
5.2.110.0100.05311.26
5.2.100.0030.06711.16
5.2.90.0030.05011.05
5.2.80.0030.07011.02
5.2.70.0070.06011.25
5.2.60.0030.05011.01
5.2.50.0030.03710.97
5.2.40.0000.03011.00
5.2.30.0070.02710.97
5.2.20.0000.03011.13
5.2.10.0070.02710.82
5.2.00.0000.03010.68
5.1.60.0030.0239.97
5.1.50.0100.0379.95
5.1.40.0100.0479.95
5.1.30.0070.05310.36
5.1.20.0030.04310.36
5.1.10.0070.0439.98
5.1.00.0070.05010.07
5.0.50.0030.0278.57
5.0.40.0030.0178.46
5.0.30.0000.0678.28
5.0.20.0070.0438.18
5.0.10.0100.0278.22
5.0.00.0000.0438.23
4.4.90.0070.0277.81
4.4.80.0070.0307.81
4.4.70.0000.0177.81
4.4.60.0030.0277.81
4.4.50.0000.0207.81
4.4.40.0100.0437.81
4.4.30.0030.0337.81
4.4.20.0000.0377.81
4.4.10.0030.0137.81
4.4.00.0000.0537.81
4.3.110.0070.0337.81
4.3.100.0030.0337.81
4.3.90.0000.0337.81
4.3.80.0070.0507.81
4.3.70.0030.0177.81
4.3.60.0000.0377.81
4.3.50.0000.0207.81
4.3.40.0070.0477.81
4.3.30.0030.0307.81
4.3.20.0000.0377.81
4.3.10.0030.0377.81
4.3.00.0000.0307.81

preferences:
53.98 ms | 401 KiB | 5 Q