3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Stapler { protected $color; public function __construct($color) { $this->color = $color; } public function staple($paper1, $paper2) { echo "the ".$this->color." stapler, staples ".$paper1.' '.$paper2.' together'; } } $redStapler = new Stapler('red'); $blackStapler = new Stapler('black'); $redStapler->staple('cat', 'dog'); echo "\n"; $blackStapler->staple('sign', 'tree');
Output for git.master, git.master_jit, rfc.property-hooks
the red stapler, staples cat dog together the black stapler, staples sign tree together

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