3v4l.org

run code in 300+ PHP versions simultaneously
<?php interface b { public const PRIORITY_DEFAULT = 1024; public const PRIORITY_LOW = 2000; public function getPriority():int; } class a implements b { public function __construct() { echo self::PRIORITY_DEFAULT; } public function getPriority():int { return self::PRIORITY_LOW; } } $a = new a(); echo "\n".$a->getPriority();
Output for git.master, git.master_jit, rfc.property-hooks
1024 2000

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:
57.38 ms | 401 KiB | 8 Q