3v4l.org

run code in 500+ 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.5.30.0120.00518.24
8.5.20.0110.00719.98
8.5.10.0080.00016.64
8.5.00.0130.01019.77
8.4.180.0080.01319.58
8.4.170.0090.00824.00
8.4.160.0120.01022.11
8.4.150.0080.00416.90
8.4.140.0130.00917.55
8.4.130.0130.00717.59
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.300.0100.01020.79
8.3.290.0050.00420.76
8.3.280.0100.00918.25
8.3.270.0110.01216.74
8.3.260.0110.00816.86
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.300.0070.00220.38
8.2.290.0210.00716.47
8.1.340.0120.00321.63

preferences:
57.71 ms | 601 KiB | 5 Q