3v4l.org

run code in 300+ PHP versions simultaneously
<?php declare(strict_types=1); final class Foo { public readonly ?int $id; } $object = new Foo(); $reflection = new ReflectionClass($object); $instance = $reflection->newInstanceWithoutConstructor(); $reflectionProperty = $reflection->getProperty('id'); $reflectionProperty->setValue($instance, 42); $reflectionProperty->setValue($instance, null); var_dump($reflectionProperty->getValue($instance));

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.0120.00619.80
8.5.10.0090.00920.14
8.5.00.0130.00819.99
8.4.170.0130.00823.79
8.4.160.0150.00922.98
8.4.150.0070.00616.87
8.4.140.0150.00617.77
8.4.130.0170.00417.67
8.4.120.0130.00824.05
8.4.110.0100.00620.58
8.4.100.0140.00619.03
8.4.90.0090.01120.55
8.4.80.0120.01018.73
8.4.70.0110.00920.55
8.4.60.0130.00718.56
8.4.50.0120.00918.23
8.4.40.0000.00922.34
8.4.30.0030.01318.90
8.4.20.0130.00618.11
8.4.10.0040.01517.83
8.3.300.0110.00920.70
8.3.290.0090.01120.81
8.3.280.0130.00718.45
8.3.270.0100.01016.56
8.3.260.0140.00516.70
8.3.250.0100.00917.17
8.3.240.0100.00817.16
8.3.230.0060.00216.64
8.3.220.0140.00519.04
8.3.210.0130.00518.59
8.3.200.0060.00916.61
8.3.190.0040.00416.97
8.3.180.0040.00516.89
8.3.170.0100.00718.71
8.3.160.0160.00316.85
8.3.150.0100.01018.73
8.3.140.0110.00716.59
8.3.130.0080.00016.55
8.3.50.0130.00616.57
8.2.300.0130.00720.24
8.2.290.0110.00720.16
8.2.280.0090.01118.60
8.2.270.0070.01317.13
8.2.260.0190.00016.54
8.2.250.0070.01116.89
8.2.50.0120.00618.10
8.2.40.0120.00518.10
8.2.30.0170.00018.10
8.2.20.0170.00018.10
8.2.10.0140.00218.10
8.2.00.0130.00318.10
8.1.340.0150.00617.76
8.1.330.0130.00521.86
8.1.320.0100.00916.08
8.1.310.0100.01016.22
8.1.180.0100.00518.10
8.1.170.0140.00218.10
8.1.160.0050.01018.10
8.1.150.0130.00418.10
8.1.140.0000.02018.10
8.1.130.0160.00318.10
8.1.120.0110.00718.10
8.1.110.0080.00818.10
8.1.100.0060.01218.10
8.1.90.0120.00518.10
8.1.80.0000.01618.10
8.1.70.0100.00618.10
8.1.60.0150.00418.10
8.1.50.0130.00418.10
8.1.40.0090.00918.10
8.1.30.0080.00818.10
8.1.20.0090.00918.10
8.1.10.0150.00318.10
8.1.00.0140.00518.10
8.0.280.0090.00618.10
8.0.270.0070.00718.10
8.0.260.0100.00518.10
8.0.250.0110.00418.10
8.0.240.0120.00418.10
8.0.230.0100.00718.10
8.0.220.0110.00418.10
8.0.210.0150.00018.10
8.0.200.0130.00318.10
8.0.190.0070.00718.10
8.0.180.0140.00318.10
8.0.170.0090.00618.10
8.0.160.0100.00518.10
8.0.150.0110.00518.10
8.0.140.0110.00518.10
8.0.130.0050.01018.10
8.0.120.0130.00318.10
8.0.110.0090.00618.10
8.0.100.0120.00318.10
8.0.90.0120.00418.10
8.0.80.0060.00918.10
8.0.70.0160.00018.10
8.0.60.0110.00518.10
8.0.50.0080.00818.10
8.0.30.0100.00718.10
8.0.20.0110.00518.10
8.0.10.0100.00518.10

preferences:
85.23 ms | 403 KiB | 5 Q