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);

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).

VersionSystem time (s)User time (s)Memory (MiB)
8.5.20.0290.00717.02
8.5.10.0350.00816.33
8.5.00.0200.01016.50
8.4.170.0280.01120.46
8.4.160.0310.01020.16
8.4.150.0320.01119.49
8.4.140.0380.01017.52
8.4.130.0140.01017.39
8.4.120.0400.01517.62
8.4.110.0430.01117.53
8.4.100.0380.01017.55
8.4.90.0400.00617.74
8.4.80.0370.00817.77
8.4.70.0370.00717.18
8.4.60.0300.01617.75
8.4.50.0370.00917.81
8.4.40.0400.01017.52
8.4.30.0430.00917.73
8.4.20.0450.00617.46
8.4.10.0410.00917.48
8.3.300.0310.00818.27
8.3.290.0350.00618.27
8.3.280.0350.01018.05
8.3.270.0340.01216.50
8.3.260.0340.01216.48
8.3.250.0410.00616.64
8.3.240.0370.00716.51
8.3.230.0370.00816.39
8.3.220.0390.00516.40
8.3.210.0330.01216.62
8.3.200.0370.00616.56
8.3.190.0310.01216.58
8.3.180.0370.00816.43
8.3.170.0430.01016.56
8.3.160.0410.00616.54
8.3.150.0340.01216.44
8.3.140.0400.00616.38
8.3.130.0340.00816.59
8.3.120.0380.00316.34
8.3.110.0310.01016.61
8.3.100.0350.01216.64
8.3.90.0360.01016.64
8.3.80.0380.00916.54
8.3.70.0390.01116.39
8.3.60.0360.01116.53
8.3.50.0370.01116.67
8.3.40.0360.00717.91
8.3.30.0340.00517.69
8.3.20.0300.01017.66
8.3.10.0310.01117.49
8.3.00.0240.01317.79

preferences:
29.81 ms | 403 KiB | 5 Q