3v4l.org

run code in 300+ PHP versions simultaneously
<?php interface factory { public static function new(): factory; } #[Value] class Value { public int $value; public function __construct(int $value) { $this->value = $value; } } #[Value(value: 42)] class One implements factory { public static function new(): One { return new One; } } #[Value(value: 2)] class Two implements factory { public static function new(): Two { return new Two; } } #[Value(value: 3)] class Three implements factory { public static function new(): Three { return new Three; } } $arrayOfClasses = [One::new(), Two::new(), Three::new()]; function dumpAttributeData(ReflectionClass $reflection) { $attributes = $reflection->getAttributes(); foreach ($attributes as $attribute) { var_dump($attribute->getName()); var_dump($attribute->getArguments()); } } foreach ($arrayOfClasses as $class) { dumpAttributeData(new ReflectionClass($class::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.3.60.0120.00916.63
8.3.50.0070.01017.99
8.3.40.0090.00618.67
8.3.30.0170.00718.66
8.3.20.0150.00424.18
8.3.10.0040.00424.66
8.3.00.0060.01226.16
8.2.180.0120.00325.92
8.2.170.0070.00718.93
8.2.160.0030.01322.96
8.2.150.0080.00025.66
8.2.140.0070.00024.66
8.2.130.0060.01226.16
8.2.120.0000.00826.35
8.2.110.0000.00920.52
8.2.100.0000.00921.02
8.1.280.0070.00725.92
8.1.270.0040.00723.99
8.1.260.0040.00428.09
8.1.250.0000.00828.09
8.1.240.0030.00619.00
8.1.230.0060.00318.63
8.0.20.0060.01317.16
8.0.10.0090.00917.09
8.0.00.0120.00617.13
7.4.150.0040.01416.25
7.4.140.0090.00916.23
7.4.130.0070.01116.35
7.4.120.0070.01116.48
7.4.110.0090.00916.37
7.4.100.0130.00716.41
7.4.90.0030.01316.23
7.4.80.0060.01216.39
7.4.70.0150.00316.22
7.4.60.0110.00716.16
7.4.50.0120.00616.18
7.4.40.0140.00316.49
7.4.30.0130.00316.27
7.4.20.0090.00916.36
7.4.10.0110.00616.31
7.4.00.0050.01116.25
7.3.270.0090.01216.27
7.3.260.0130.00316.31
7.3.250.0070.01016.27
7.3.240.0170.00716.10
7.3.230.0110.00816.13
7.3.220.0000.01616.16
7.3.210.0070.01016.20
7.3.200.0110.00716.10
7.3.190.0060.00916.32
7.3.180.0130.00316.42
7.3.170.0060.01216.13
7.3.160.0100.00716.11
7.3.150.0130.00316.29
7.3.140.0100.00716.17
7.3.130.0030.01216.15
7.3.120.0000.01716.13
7.3.110.0150.00316.19
7.3.100.0090.00716.27
7.3.90.0130.00416.06
7.3.80.0060.01216.17
7.3.70.0130.00316.28
7.3.60.0140.00716.14
7.3.50.0130.01016.04
7.3.40.0070.01016.08
7.3.30.0090.00916.26
7.3.20.0090.01616.27
7.3.10.0100.00716.17
7.3.00.0140.01016.05

preferences:
39.52 ms | 400 KiB | 5 Q