3v4l.org

run code in 300+ PHP versions simultaneously
<?php class πŸš—πŸ­ { private πŸš— $πŸš—; public function __construct() { $this->πŸš— = new πŸš—(); } public function withπŸͺ‘(): self { $this->πŸš—->πŸͺ‘ = true; return $this; } public function build(): πŸš— { return clone $this->πŸš—; } } class πŸš— { public bool $πŸͺ‘ = false; public function getInfo(): string { return $this->πŸͺ‘ ? 'this car with chair' : 'this car without chair' ; } } $πŸš—πŸ­ = new πŸš—πŸ­(); $πŸš— = $πŸš—πŸ­->build(); var_dump($πŸš—->getInfo()); $πŸš— = $πŸš—πŸ­->withπŸͺ‘()->build(); var_dump($πŸš—->getInfo());
Output for git.master, git.master_jit, rfc.property-hooks
string(22) "this car without chair" string(19) "this car with chair"

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:
28.39 ms | 405 KiB | 5 Q