3v4l.org

run code in 300+ PHP versions simultaneously
<?php class config { const AA = "test"; public static $Image="/images"; } class layout { public $name = "NAME!"; public function writeLogo() { $text = <<<ABC <img class="Logo" title="My Logo" alt="Logo" src="{config::AA}/Logo.gif" /> <img class="Logo" title="My Logo" alt="Logo" src="{config::$Image}/Logo.gif" /> <img class="Logo" title="My Logo" alt="Logo" src="{$this->name}/Logo.gif" /> ABC; echo($text); } } $sample = new layout(); $sample->writeLogo(); ?>
Output for git.master, git.master_jit, rfc.property-hooks
Warning: Undefined variable $Image in /in/9IOLN on line 15 <img class="Logo" title="My Logo" alt="Logo" src="{config::AA}/Logo.gif" /> <img class="Logo" title="My Logo" alt="Logo" src="{config::}/Logo.gif" /> <img class="Logo" title="My Logo" alt="Logo" src="NAME!/Logo.gif" />

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:
43.6 ms | 402 KiB | 8 Q