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 a(){ var_dump( $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.0150.00618.43
8.3.50.0130.00822.17
8.3.40.0070.01018.79
8.3.30.0060.00819.09
8.3.20.0000.00820.25
8.3.10.0080.00022.04
8.3.00.0040.00420.65
8.2.180.0040.01116.50
8.2.170.0120.00322.96
8.2.160.0040.01119.25
8.2.150.0120.00324.18
8.2.140.0040.00424.66
8.2.130.0070.00026.16
8.2.120.0050.00319.36
8.2.110.0110.00021.02
8.2.100.0070.00418.09
8.2.90.0000.00819.22
8.2.80.0000.00817.97
8.2.70.0060.00317.49
8.2.60.0030.00617.66
8.2.50.0040.00418.10
8.2.40.0030.00520.55
8.2.30.0070.00019.30
8.2.20.0000.00717.82
8.2.10.0000.00817.84
8.2.00.0000.00717.67
8.1.280.0120.00625.92
8.1.270.0040.00422.05
8.1.260.0000.00726.35
8.1.250.0040.00428.09
8.1.240.0000.01121.12
8.1.230.0070.00420.31
8.1.220.0040.00417.74
8.1.210.0040.00418.77
8.1.200.0080.00017.36
8.1.190.0000.00817.23
8.1.180.0040.00418.10
8.1.170.0060.00318.64
8.1.160.0000.00818.85
8.1.150.0070.00020.03
8.1.140.0000.00817.44
8.1.130.0000.00717.79
8.1.120.0030.00417.29
8.1.110.0040.00417.43
8.1.100.0040.00417.28
8.1.90.0040.00417.39
8.1.80.0040.00417.27
8.1.70.0030.00317.26
8.1.60.0060.00317.60
8.1.50.0040.00417.54
8.1.40.0030.00617.52
8.1.30.0040.00417.63
8.1.20.0030.00517.53
8.1.10.0000.00717.52
8.1.00.0050.00317.38
8.0.300.0040.00418.77
8.0.290.0000.00716.88
8.0.280.0000.00718.46
8.0.270.0000.00717.16
8.0.260.0030.00316.80
8.0.250.0070.00016.95
8.0.240.0000.00817.09
8.0.230.0030.00616.91
8.0.220.0000.00816.89
8.0.210.0070.00016.79
8.0.200.0040.00416.94
8.0.190.0030.00516.90
8.0.180.0050.00316.92
8.0.170.0000.00816.76
8.0.160.0050.00216.89
8.0.150.0030.00316.86
8.0.140.0020.00516.86
8.0.130.0030.00313.29
8.0.120.0030.00516.82
8.0.110.0000.00716.93
8.0.100.0040.00416.74
8.0.90.0040.00416.80
8.0.80.0060.00916.92
8.0.70.0040.00416.77
8.0.60.0000.00716.84
8.0.50.0030.00516.73
8.0.30.0090.01416.86
8.0.20.0130.00617.40
8.0.10.0050.00216.95
8.0.00.0080.01516.80
7.4.330.0060.00015.00
7.4.320.0030.00316.44
7.4.300.0060.00016.58
7.4.290.0030.00316.60
7.4.280.0080.00316.63
7.4.270.0000.00716.50
7.4.260.0000.00716.59
7.4.250.0040.00416.55
7.4.240.0020.00516.59
7.4.230.0050.00216.30
7.4.220.0170.00016.52
7.4.210.0090.00916.54
7.4.200.0040.00416.62
7.4.190.0000.00616.48
7.4.160.0120.00616.59
7.4.150.0100.00717.40
7.4.140.0090.00917.86
7.4.130.0110.00716.64
7.4.120.0090.00816.49
7.4.110.0030.01316.57
7.4.100.0080.00916.37
7.4.90.0090.00916.58
7.4.80.0060.00919.39
7.4.70.0110.00516.53
7.4.60.0100.01316.44
7.4.50.0030.00516.40
7.4.40.0060.00922.77
7.4.30.0040.01816.49
7.4.00.0090.01014.87
7.3.330.0030.00313.16
7.3.320.0050.00013.10
7.3.310.0000.00716.36
7.3.300.0000.00716.26
7.3.290.0070.01416.32
7.3.280.0090.00616.27
7.3.270.0090.00917.40
7.3.260.0180.00016.32
7.3.250.0070.01116.53
7.3.240.0110.01216.20
7.3.230.0030.01416.59
7.3.210.0130.00716.48
7.3.200.0150.00619.39
7.3.190.0080.00816.25
7.3.180.0080.00816.30
7.3.170.0000.01516.55
7.3.160.0040.01116.40
7.3.120.0050.01214.66
7.3.110.0070.00714.86
7.3.100.0060.00614.94
7.3.90.0070.00714.73
7.3.80.0000.01214.50
7.3.70.0070.00714.87
7.3.60.0030.01014.78
7.3.50.0060.00614.80
7.3.40.0030.00714.80
7.3.30.0040.00714.54
7.3.20.0090.00616.57
7.3.10.0070.00316.87
7.3.00.0100.00316.60
7.2.330.0120.00616.63
7.2.320.0030.01416.53
7.2.310.0040.01216.52
7.2.300.0090.00616.71
7.2.290.0060.01116.70
7.2.250.0070.01414.73
7.2.240.0060.01514.63
7.2.230.0090.00615.09
7.2.220.0080.00415.24
7.2.210.0070.00715.32
7.2.200.0000.01715.09
7.2.190.0000.01014.80
7.2.180.0100.00415.05
7.2.170.0110.00314.90
7.2.00.0060.00919.50
7.1.330.0140.00315.62
7.1.320.0090.00615.83
7.1.310.0040.01115.81
7.1.300.0030.01015.70
7.1.290.0030.00715.68
7.1.280.0070.00716.02
7.1.270.0140.00015.87
7.1.260.0090.00015.71
7.1.100.0060.00618.23
7.1.70.0000.00717.25
7.1.60.0060.01919.82
7.1.50.0160.00616.84
7.1.00.0100.06722.54
7.0.200.0070.00416.50
7.0.140.0030.07322.08
7.0.60.0070.05319.90
7.0.50.0000.04317.73
7.0.40.0100.05020.09
7.0.30.0300.03020.11
7.0.20.0300.05320.10
7.0.10.0070.04320.08
7.0.00.0170.04320.10
5.6.280.0070.07021.13
5.6.210.0170.07320.54
5.6.200.0030.08318.18
5.6.190.0100.04020.55
5.6.180.0400.05020.55
5.6.170.0200.06720.57
5.6.160.0070.04020.47
5.6.150.0070.08018.28
5.6.140.0070.05318.14
5.6.130.0100.07718.15
5.6.120.0030.07320.84
5.6.110.0030.09021.01
5.6.100.0070.07320.89
5.6.90.0170.07720.96
5.6.80.0000.04320.38
5.5.350.0300.07020.30
5.5.340.0030.04317.99
5.5.330.0130.08020.29
5.5.320.0370.07020.20
5.5.310.0300.08020.27
5.5.300.0070.05717.97
5.5.290.0000.04317.94
5.5.280.0170.07320.88
5.5.270.0100.08320.89
5.5.260.0070.06720.65
5.5.250.0130.04720.80
5.5.240.0200.07320.16
5.4.450.0670.03319.17
5.4.440.1370.03319.32
5.4.430.0600.04019.27
5.4.420.1100.04019.46
5.4.410.1300.04319.29
5.4.400.1100.04719.22
5.4.390.0530.07018.98
5.4.380.0300.05318.73
5.4.370.0400.05318.79
5.4.360.0200.07018.50
5.4.350.0270.05318.83
5.4.340.0400.05718.54
5.4.320.0050.03612.50
5.4.310.0110.03212.50
5.4.300.0080.04612.50
5.4.290.0070.03712.50
5.4.280.0080.03312.40
5.4.270.0050.05012.40
5.4.260.0040.03812.39
5.4.250.0040.03912.39
5.4.240.0060.05012.40
5.4.230.0040.03812.39
5.4.220.0050.03612.39
5.4.210.0050.03512.39
5.4.200.0060.03612.39
5.4.190.0030.06318.88
5.4.180.0100.05718.89
5.4.170.0070.05718.93
5.4.160.0000.06018.73
5.4.150.0100.05019.00
5.4.140.0170.04316.43
5.4.130.0030.05016.53
5.4.120.0100.04716.30
5.4.110.0000.05316.55
5.4.100.0100.04716.35
5.4.90.0070.06716.47
5.4.80.0170.03716.44
5.4.70.0070.05016.39
5.4.60.0070.04716.63
5.4.50.0130.05016.34
5.4.40.0070.05016.37
5.4.30.0070.05016.38
5.4.20.0100.04716.62
5.4.10.0200.04316.26
5.4.00.0000.05715.84
5.3.290.0040.04612.80
5.3.280.0070.03612.71
5.3.270.0070.07714.45
5.3.260.0030.05714.76
5.3.250.0100.05714.67
5.3.240.0170.05714.61
5.3.230.0170.04714.43
5.3.220.0070.05014.59
5.3.210.0030.05714.55
5.3.200.0100.04714.48
5.3.190.0200.03714.55
5.3.180.0070.05014.54
5.3.170.0030.05314.54
5.3.160.0070.05014.65
5.3.150.0030.05314.40
5.3.140.0130.04714.39
5.3.130.0000.05714.54
5.3.120.0000.05714.74
5.3.110.0130.04714.59
5.3.100.0030.05314.13
5.3.90.0100.04714.09
5.3.80.0130.05014.02
5.3.70.0170.04714.18
5.3.60.0000.05314.02
5.3.50.0030.05014.04
5.3.40.0030.05014.04
5.3.30.0030.05014.07
5.3.20.0170.04313.78
5.3.10.0070.04713.67
5.3.00.0100.04713.73
5.2.170.0100.03311.10
5.2.160.0030.04011.22
5.2.150.0030.04311.21
5.2.140.0000.07011.23
5.2.130.0100.04011.01
5.2.120.0100.04711.11
5.2.110.0030.04311.20
5.2.100.0070.03711.19
5.2.90.0070.05011.06
5.2.80.0000.04311.27
5.2.70.0000.04311.27
5.2.60.0030.04711.04
5.2.50.0030.05311.01
5.2.40.0070.03710.91
5.2.30.0030.04011.06
5.2.20.0070.03711.04
5.2.10.0100.03710.93
5.2.00.0200.04310.79
5.1.60.0070.03010.05
5.1.50.0100.03010.01
5.1.40.0030.05010.03
5.1.30.0100.04710.41
5.1.20.0030.03710.26
5.1.10.0070.0509.91
5.1.00.0000.05710.27
5.0.50.0070.0278.55
5.0.40.0000.0438.52
5.0.30.0070.0378.28
5.0.20.0030.0278.03
5.0.10.0030.0308.27
5.0.00.0030.0408.16
4.4.90.0000.0235.84
4.4.80.0100.0235.96
4.4.70.0100.0205.85
4.4.60.0030.0205.84
4.4.50.0030.0205.83
4.4.40.0070.0335.96
4.4.30.0030.0205.84
4.4.20.0000.0235.93
4.4.10.0030.0335.90
4.4.00.0070.0435.88
4.3.110.0030.0235.91
4.3.100.0000.0235.75
4.3.90.0100.0135.74
4.3.80.0030.0305.79
4.3.70.0000.0205.73
4.3.60.0030.0175.75
4.3.50.0000.0235.74
4.3.40.0000.0375.73
4.3.30.0030.0235.59
4.3.20.0070.0175.59
4.3.10.0030.0205.59
4.3.00.0070.02014.47

preferences:
42.35 ms | 401 KiB | 5 Q