3v4l.org

run code in 300+ PHP versions simultaneously
<?php class MyBool { const MY_TRUE = 1; const MY_FALSE = 0; private $_type; private function __construct($type) { $this->_type = $type; } function Type() { return $this->_type; } static function MyTrue() { return new self(self::MY_TRUE); } static function MyFalse() { return new self(self::MY_FALSE); } } var_dump(MyBool::MyTrue());
Output for git.master, git.master_jit, rfc.property-hooks
object(MyBool)#1 (1) { ["_type":"MyBool":private]=> int(1) }

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