3v4l.org

run code in 300+ PHP versions simultaneously
<?php enum Marker {} #[Marker] class C {} class D {} function has_marker(string $class) { return !empty((new ReflectionClass($class))->getAttributes(Marker::class)); } var_dump(has_marker(C::class)); var_dump(has_marker(D::class));

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.0110.00924.18
8.4.110.0120.00722.35
8.4.100.0390.00917.63
8.4.90.0410.00717.71
8.4.80.0340.01117.63
8.3.250.0100.00818.88
8.3.240.0090.00916.98
8.3.230.0270.00716.81
8.3.220.0240.00816.22
8.3.180.0300.00616.82
8.3.50.0310.00716.64
8.2.290.0210.00716.47

preferences:
33.33 ms | 403 KiB | 5 Q