3v4l.org

run code in 300+ PHP versions simultaneously
<?php #[Attribute(Attribute::TARGET_FUNCTION)] class Test {} class Foo { #[Test] public int $test; } echo "Creating foo: "; $f = new Foo(); echo "done\n"; echo "Performing reflection: "; $foo = new ReflectionClass($f); $test = $foo->getProperty('test'); $attributes = $test->getAttributes(); echo "done\n"; echo "instantiating attribute ["; foreach ($attributes as $attribute) { echo $attribute->getName() . ']: '; $attribute->newInstance(); } echo "\n";

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.4.120.0120.00723.94
8.4.110.0140.00520.70
8.4.100.0150.00517.90
8.4.90.0100.01117.83
8.4.80.0160.01117.89
8.4.70.0160.00718.53
8.4.60.0300.00917.78
8.4.50.0310.00717.82
8.4.40.0280.00817.60
8.4.30.0340.00717.47
8.4.20.0340.00417.61
8.4.10.0270.00817.47
8.3.250.0140.00418.76
8.3.240.0060.00216.96
8.3.230.0100.00816.70
8.3.220.0120.00616.97
8.3.210.0130.00416.97
8.3.200.0290.00716.97
8.3.190.0330.00616.97
8.3.180.0350.00616.97
8.3.170.0350.00516.97
8.3.160.0230.00516.97
8.3.150.0240.00716.97
8.3.140.0260.00716.97
8.3.130.0260.00616.97
8.3.120.0180.00416.97
8.3.110.0250.00516.97
8.3.100.0330.00716.97
8.3.90.0360.00616.97
8.3.80.0350.00816.97
8.3.70.0360.00716.97
8.3.60.0350.00816.97
8.3.50.0340.00716.97
8.3.40.0260.00717.64
8.3.30.0250.00517.61
8.3.20.0380.00817.35
8.3.10.0390.01117.50
8.3.00.0250.00517.44
8.2.290.0100.00520.38
8.2.280.0170.00616.97
8.2.270.0250.00616.97
8.2.260.0250.00516.97
8.2.250.0180.00716.97
8.2.240.0210.00616.97
8.2.230.0240.00516.97
8.2.220.0230.00516.97
8.2.210.0190.00616.97
8.2.200.0210.00616.97
8.2.190.0220.00716.97
8.2.180.0250.00816.97
8.2.170.0230.00517.78
8.2.160.0290.00617.79
8.2.150.0320.00717.47
8.2.140.0280.00717.25
8.2.130.0220.00717.50
8.2.120.0250.00417.58
8.2.110.0290.00617.54
8.2.100.0290.00617.63
8.2.90.0280.00517.55
8.2.80.0280.00817.50
8.2.70.0290.00717.47
8.2.60.0240.00517.55
8.2.50.0250.00517.39
8.2.40.0280.00517.50
8.2.30.0240.00517.49
8.2.20.0280.00617.35
8.2.10.0280.00617.31
8.2.00.0220.00717.53

preferences:
27.77 ms | 403 KiB | 5 Q