3v4l.org

run code in 500+ PHP versions simultaneously
<?php #[\Attribute(\Attribute::TARGET_CLASS | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)] class HookWithDependency { public function __construct( public readonly string $name, public readonly ?string $type = 'module', ) { } } #[HookWithDependency(name: 'bar')] class Example {} $reflectionClass = new \ReflectionClass(Example::class); var_dump($reflectionClass->getAttributes()[0]->newInstance());

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.14
8.5.20.0110.00720.27
8.5.10.0080.01116.65
8.5.00.0110.01022.76
8.4.180.0130.01019.46
8.4.170.0130.00923.97
8.4.160.0110.01022.10
8.4.150.0080.00417.84
8.4.140.0170.00817.86
8.4.130.0370.00917.39
8.4.120.0410.01317.50
8.4.110.0380.00817.58
8.4.100.0360.01317.82
8.4.90.0350.01317.34
8.4.80.0440.00617.32
8.4.70.0480.00917.21
8.4.60.0400.01217.34
8.4.50.0380.01117.63
8.4.40.0300.00917.67
8.4.30.0190.00217.47
8.4.20.0320.00717.45
8.4.10.0220.01017.30
8.3.300.0090.01020.63
8.3.290.0110.00920.79
8.3.280.0100.01118.40
8.3.270.0380.00516.44
8.3.260.0380.01216.61
8.3.250.0380.01116.25
8.3.240.0360.00916.38
8.3.230.0340.01216.35
8.3.220.0360.01216.53
8.3.210.0410.01116.27
8.3.200.0350.01216.43
8.3.190.0360.01416.72
8.3.180.0360.01216.63
8.3.170.0390.01316.47
8.3.160.0510.00516.35
8.3.150.0450.01016.50
8.3.140.0380.01216.63
8.3.130.0300.01416.32
8.3.120.0320.01116.39
8.3.110.0340.01116.26
8.3.100.0380.00616.13
8.3.90.0400.00916.57
8.3.80.0410.00716.71
8.3.70.0370.00916.67
8.3.60.0400.00916.53
8.3.50.0380.00916.35
8.3.40.0380.01017.15
8.3.30.0350.01017.47
8.3.20.0350.01217.35
8.3.10.0360.00817.42
8.3.00.0370.00817.29
8.2.300.0120.00820.31
8.2.290.0300.01016.79
8.2.280.0310.00716.56
8.2.270.0340.00816.44
8.2.260.0380.00616.79
8.2.250.0330.00716.49
8.2.240.0240.01516.46
8.2.230.0310.01116.49
8.2.220.0330.01016.21
8.2.210.0390.01116.37
8.2.200.0300.01016.36
8.2.190.0350.00816.42
8.2.180.0320.00816.69
8.2.170.0370.00717.25
8.2.160.0340.00617.67
8.2.150.0360.01117.36
8.2.140.0310.01017.41
8.2.130.0320.00917.38
8.2.120.0350.00817.43
8.2.110.0310.01117.62
8.2.100.0360.00717.70
8.2.90.0330.00717.70
8.2.80.0320.00817.46
8.2.70.0270.01517.30
8.2.60.0440.00617.25
8.2.50.0300.01117.46
8.2.40.0370.00617.38
8.2.30.0250.01217.38
8.2.20.0310.00717.32
8.2.10.0340.00517.57
8.2.00.0280.00917.28
8.1.340.0130.01021.80

preferences:
42.83 ms | 841 KiB | 5 Q