3v4l.org

run code in 300+ PHP versions simultaneously
<?php // Library code final readonly class Renderer { public function __construct(private string $name, private object $object) {} public function render(callable $formatter): string { return $formatter($this->name, $this->object); } } // My code $formatter = ucfirst(...);$formatter = ucfirst(...); echo (new Renderer('name', new stdClass()))->render($formatter);
Output for git.master_jit, git.master
Fatal error: Uncaught ArgumentCountError: ucfirst() expects exactly 1 argument, 2 given in /in/10gCI:7 Stack trace: #0 /in/10gCI(7): ucfirst('name', Object(stdClass)) #1 /in/10gCI(13): Renderer->render(Object(Closure)) #2 {main} thrown in /in/10gCI on line 7
Process exited with code 255.

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.57 ms | 405 KiB | 5 Q