3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Spaceship { public $name; public $maxSpeed; public function __construct($name, $maxSpeed) { $this->name = $name; $this->maxSpeed = $maxSpeed; } } $spaceships = [ new Spaceship('Rebel Transport', 20), new Spaceship('Millenium Falcon', 80), new Spaceship('X-Wing Starfighter', 80), new Spaceship('TIE Bomber', 60), new Spaceship('TIE Fighter', 100), new Spaceship('Imperial Star Destroyer', 60), ]; // Sort the spaceships by name (in ascending order) usort($spaceships, function ($ship1, $ship2) { return $ship1->name <=> $ship2->name; });
Output for git.master, git.master_jit, rfc.property-hooks

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