3v4l.org

run code in 300+ PHP versions simultaneously
<?php class ConfigApp { const dbhost = "localhost"; const dbname = "secretdbname"; const dbuser = "secretdbsuer"; const dbpass = "secretdbpass"; const var1 = "something"; const var2 = "nothingToDoWithDB"; const var3 = "something else else"; } class Dbh extends ConfigApp{ public function __construct() { $this->connect(); } protected function connect() { echo self::dbhost.PHP_EOL; echo self::dbname.PHP_EOL; echo self::dbuser.PHP_EOL; echo self::dbpass.PHP_EOL; } } $dbh = new Dbh();

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.70.0120.00616.63
8.3.60.0130.00718.27
8.3.50.0180.00316.47
8.3.40.0150.00021.68
8.3.30.0110.00418.60
8.3.20.0040.00424.18
8.3.10.0040.00424.66
8.3.00.0070.00026.16
8.2.190.0040.01516.75
8.2.180.0130.00316.50
8.2.170.0120.00618.72
8.2.160.0030.01622.96
8.2.150.0090.00325.66
8.2.140.0070.00024.66
8.2.130.0040.00426.16
8.2.120.0040.00421.04
8.2.110.0140.00722.25
8.2.100.0060.00618.22
8.2.90.0030.00619.09
8.2.80.0030.00617.97
8.2.70.0030.00517.25
8.2.60.0030.00517.93
8.2.50.0080.00818.10
8.2.40.0070.01018.10
8.2.30.0100.00618.10
8.2.20.0150.00018.10
8.2.10.0140.00518.10
8.2.00.0120.00618.10
8.1.280.0110.00725.92
8.1.270.0050.00324.66
8.1.260.0030.00626.35
8.1.250.0000.00728.09
8.1.240.0100.00721.89
8.1.230.0110.00019.07
8.1.220.0000.00817.74
8.1.210.0000.00818.77
8.1.200.0060.00317.35
8.1.190.0030.00617.13
8.1.180.0040.00418.10
8.1.170.0120.00618.10
8.1.160.0060.01218.10
8.1.150.0110.00718.10
8.1.140.0140.00418.10
8.1.130.0040.01118.10
8.1.120.0160.00018.10
8.1.110.0110.00618.10
8.1.100.0110.00718.10
8.1.90.0140.00518.10
8.1.80.0130.00418.10
8.1.70.0100.00718.10
8.1.60.0090.01018.10
8.1.50.0120.00518.10
8.1.40.0130.00518.10
8.1.30.0090.00918.10
8.1.20.0110.00718.10
8.1.10.0180.00018.10
8.1.00.0140.00318.10
8.0.300.0040.00418.77
8.0.290.0000.00716.73
8.0.280.0110.00618.10
8.0.270.0060.00918.10
8.0.260.0130.00518.10
8.0.250.0150.00018.10
8.0.240.0150.00218.10
8.0.230.0120.00618.10
8.0.220.0110.00518.10
8.0.210.0190.00018.10
8.0.200.0150.00318.10
8.0.190.0140.00318.10
8.0.180.0110.00618.10
8.0.170.0160.00018.10
8.0.160.0120.00318.10
8.0.150.0160.00318.10
8.0.140.0090.00618.10
8.0.130.0130.00418.10
8.0.120.0170.00018.10
8.0.110.0030.01418.10
8.0.100.0100.00518.10
8.0.90.0110.00518.10
8.0.80.0130.00318.10
8.0.70.0160.00018.10
8.0.60.0080.00818.10
8.0.50.0170.00418.10
8.0.30.0120.00618.10
8.0.20.0040.01318.10
8.0.10.0130.00418.10

preferences:
32.79 ms | 401 KiB | 5 Q