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();
Output for git.master, git.master_jit, rfc.property-hooks
localhost secretdbname secretdbsuer secretdbpass

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
27.72 ms | 405 KiB | 5 Q