3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Config { private string $host, $username, $password, $dbname; public function __construct(?array $config = null, \mysqli $connection = null) { if (empty($this->host) || empty($this->username) || empty($this->password) || empty($this->dbname)) { throw new \InvalidArgumentException("Connection string expects values for ['host', 'username', 'password', 'dbname']"); } } } new Config();

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.4.130.0130.00718.20
8.4.120.0090.01022.26
8.4.110.0090.01318.61
8.4.100.0120.01017.86
8.4.90.0120.00817.84
8.4.80.0050.00418.05
8.4.70.0110.01017.80
8.4.60.0050.00417.90
8.4.50.0120.00919.83
8.4.40.0090.00017.75
8.4.30.0090.00920.41
8.4.20.0100.00717.79
8.4.10.0130.00721.94
8.3.260.0090.01016.68
8.3.250.0080.00818.79
8.3.240.0100.00819.06
8.3.230.0090.01016.80
8.3.220.0030.00516.73
8.3.210.0090.00716.84
8.3.200.0140.00616.63
8.3.190.0110.00816.68
8.3.180.0110.00916.79
8.3.170.0110.00717.29
8.3.160.0120.00616.56
8.3.150.0120.00620.54
8.3.140.0110.00718.44
8.3.130.0060.00318.39
8.3.120.0060.00318.94
8.3.110.0080.00020.94
8.3.100.0040.00416.76
8.3.90.0080.00026.77
8.3.80.0030.00617.97
8.3.70.0160.00018.43
8.3.60.0120.00918.43
8.3.50.0060.00916.82
8.3.40.0080.01121.90
8.3.30.0090.00619.17
8.3.20.0100.00724.18
8.3.10.0190.00024.66
8.3.00.0110.00726.16
8.2.290.0100.00819.09
8.2.280.0110.00718.48
8.2.270.0030.00617.01
8.2.260.0090.00918.71
8.2.250.0030.00616.55
8.2.240.0090.00018.93
8.2.230.0080.00022.58
8.2.220.0040.00424.06
8.2.210.0070.01126.77
8.2.200.0030.00616.88
8.2.190.0110.00616.58
8.2.180.0140.00416.38
8.2.170.0080.00622.96
8.2.160.0170.00322.96
8.2.150.0120.00625.66
8.2.140.0200.00024.66
8.2.130.0140.00426.16
8.2.120.0000.00822.13
8.2.110.0130.01021.05
8.2.100.0090.00317.91
8.2.90.0260.00917.50
8.2.80.0240.01017.25
8.2.70.0230.00817.61
8.2.60.0300.00017.50
8.2.50.0270.00317.38
8.2.40.0220.00417.38
8.2.30.0270.00017.63
8.2.20.0260.00317.38
8.2.10.0210.00717.34
8.2.00.0220.00517.50
8.1.330.0140.00516.29
8.1.320.0050.01415.98
8.1.310.0040.01116.80
8.1.300.0090.00917.87
8.1.290.0060.00330.84
8.1.280.0140.00325.92
8.1.270.0040.00424.66
8.1.260.0000.01426.35
8.1.250.0100.00728.09
8.1.240.0000.00923.74
8.1.230.0060.00622.66
8.1.220.0220.00617.13
8.1.210.0240.00717.13
8.1.200.0290.00017.11
8.1.190.0220.00416.88
8.1.180.0190.00916.75
8.1.170.0170.01017.00
8.1.160.0210.00516.75
8.1.150.0210.00716.98
8.1.140.0250.00317.00
8.1.130.0170.01016.88
8.1.120.0270.00017.25
8.1.110.0210.00517.13
8.1.100.0210.00617.00
8.1.90.0270.00017.22
8.1.80.0340.00017.00
8.1.70.0230.00617.00
8.1.60.0190.00817.22
8.1.50.0270.00017.00
8.1.40.0140.01417.50
8.1.30.0280.00017.63
8.1.20.0200.00717.35
8.1.10.0230.00317.25
8.1.00.0300.00017.38
8.0.300.0260.00316.55
8.0.290.0250.00516.73
8.0.280.0270.00016.63
8.0.270.0230.00416.55
8.0.260.0160.01216.63
8.0.250.0230.00616.55
8.0.240.0250.00316.55
8.0.230.0200.00716.63
8.0.220.0170.01016.63
8.0.210.0200.00716.55
8.0.200.0290.00016.63
8.0.190.0260.00416.55
8.0.180.0260.00316.55
8.0.170.0180.01116.63
8.0.160.0280.00016.63
8.0.150.0220.00616.55
8.0.140.0220.00616.63
8.0.130.0280.00016.55
8.0.120.0210.00616.63
8.0.110.0210.00416.63
8.0.100.0180.00716.55
8.0.90.0190.01016.74
8.0.80.0230.00416.59
8.0.70.0220.00716.55
8.0.60.0230.00316.63
8.0.50.0200.00716.63
8.0.30.0280.00016.61
8.0.20.0160.01216.55
8.0.10.0230.00316.55

preferences:
92.1 ms | 403 KiB | 5 Q