3v4l.org

run code in 300+ PHP versions simultaneously
<?php declare(strict_types=1); class TestCommand { public function __construct( private string $name, public bool $isDeveloper, public int $age, public int $id, ) {} } /* $testCommand = new TestCommand('John', 25, true); var_dump($testCommand); echo serialize($testCommand); */ $serializedClass = 'O:11:"TestCommand":3:{s:4:"name";s:4:"John";s:3:"age";i:25;s:11:"isDeveloper";b:1;}'; $testCommand = unserialize($serializedClass); var_dump($testCommand);
Output for git.master_jit, git.master
object(TestCommand)#1 (3) { ["name":"TestCommand":private]=> string(4) "John" ["isDeveloper"]=> bool(true) ["age"]=> int(25) ["id"]=> uninitialized(int) }

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