3v4l.org

run code in 300+ PHP versions simultaneously
<?php class DTO { public string $foo; public string $bar; } $dto = new DTO; $dto->bar = 'bar'; echo '"foo" is ' . (isset($dto->foo) ? 'set' : 'not set'); echo "\n\n"; echo '"bar" is ' . (isset($dto->bar) ? 'set' : 'not set');

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.00.0110.01019.88
8.4.150.0020.00114.05
8.4.140.0130.01017.61
8.4.130.0100.01017.50
8.4.120.0120.00820.25
8.4.110.0120.00822.49
8.4.100.0120.00817.40
8.4.90.0070.00222.19
8.4.80.0150.00519.61
8.4.70.0080.01217.77
8.4.60.0110.01017.63
8.4.50.0120.01020.56
8.4.40.0130.00717.45
8.4.30.0400.00717.53
8.4.20.0300.01317.38
8.4.10.0420.00617.39
8.3.280.0150.00618.35
8.3.270.0140.00516.65
8.3.260.0130.00416.53
8.3.250.0100.00918.83
8.3.240.0100.01016.42
8.3.230.0110.00916.58
8.3.220.0100.00717.13
8.3.210.0120.00416.79
8.3.200.0080.01016.47
8.3.190.0090.00617.29
8.3.180.0120.00718.97
8.3.170.0100.00717.13
8.3.160.0330.01316.33
8.3.150.0350.01016.54
8.3.140.0320.01416.45
8.3.130.0330.00816.43
8.3.120.0220.01516.55
8.3.110.0350.00616.27
8.3.100.0380.01416.20
8.3.90.0380.00916.42
8.3.80.0330.00716.50
8.3.70.0270.01916.34
8.3.60.0340.00916.28
8.3.50.0360.00716.60
8.3.40.0210.01117.58
8.3.30.0390.00716.98
8.3.20.0410.00417.57
8.3.10.0300.01017.43
8.3.00.0120.01217.14
8.2.290.0070.00320.50
8.2.280.0050.00616.67
8.2.270.0330.00916.52
8.2.260.0270.00616.37
8.2.250.0340.00316.34
8.2.240.0250.01216.77
8.2.230.0320.00016.32
8.2.220.0290.01016.65
8.2.210.0350.00316.21
8.2.200.0300.00916.52
8.2.190.0320.00616.59
8.2.180.0350.00316.45
8.2.170.0400.00017.58
8.2.160.0250.00917.71
8.2.150.0260.01317.35
8.2.140.0340.00617.54
8.2.130.0330.00817.00
8.2.120.0380.00317.65
8.2.110.0360.00617.62
8.2.100.0290.00617.65
8.2.90.0440.00617.27
8.2.80.0360.00817.54
8.2.70.0290.00617.36
8.2.60.0330.00717.52
8.2.50.0330.00717.37
8.2.40.0270.00917.72
8.2.30.0290.00717.45
8.2.20.0270.00917.43
8.2.10.0340.00717.43
8.2.00.0250.00817.32
8.1.320.0130.00715.96

preferences:
29.34 ms | 403 KiB | 5 Q