3v4l.org

run code in 500+ PHP versions simultaneously
<?php final class Word { private $word; public function __construct(string $word) { $this->word = $word; } public function reverse(): self { return new self(strrev($this->word)); } public function __toString() { return $this->word; } } $word = new Word('potato'); echo $word->reverse();
Output for git.master, git.master_jit, rfc.property-hooks
otatop

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:
65.81 ms | 1763 KiB | 4 Q