3v4l.org

run code in 300+ PHP versions simultaneously
<?php #[Attribute] class SomeAttr {} /** * Class comment */ #[SomeAttr] class SomeClass { /** * Property comment */ #[SomeAttr] private string $someProperty; /** * Method comment */ #[SomeAttr] public function someMethod(string $someParam): void { } } $reflection = new ReflectionClass(SomeClass::class); echo (string) $reflection; echo (string) $reflection->getMethod('someMethod'); echo (string) $reflection->getProperty('someProperty'); echo $reflection->getMethod('someMethod')->getAttributes()[0];

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.70.0000.01416.58
8.3.60.0060.01616.73
8.3.50.0100.00716.45
8.3.40.0160.00318.79
8.3.30.0150.00318.84
8.3.20.0040.00424.18
8.3.10.0030.00624.66
8.3.00.0040.00426.16
8.2.190.0110.00316.63
8.2.180.0100.00325.92
8.2.170.0110.00319.09
8.2.160.0070.00722.96
8.2.150.0060.00325.66
8.2.140.0000.00724.66
8.2.130.0110.00026.16
8.2.120.0050.00326.35
8.2.110.0000.01122.26
8.2.100.0100.00317.91
8.2.90.0040.00417.91
8.2.80.0030.00519.11
8.2.70.0030.01017.93
8.2.60.0060.00318.16
8.2.50.0030.00618.10
8.2.40.0060.00319.30
8.2.30.0030.00619.39
8.2.20.0040.00418.19
8.2.10.0040.00419.30
8.2.00.0000.00719.35
8.1.280.0060.00925.92
8.1.270.0070.00023.99
8.1.260.0070.00028.09
8.1.250.0060.00628.09
8.1.240.0040.00422.61
8.1.230.0110.00022.82
8.1.220.0060.00317.74
8.1.210.0080.00318.77
8.1.200.0000.00817.10
8.1.190.0040.00416.99
8.1.180.0040.00418.10
8.1.170.0030.00618.56
8.1.160.0000.00819.06
8.1.150.0040.00418.88
8.1.140.0000.00718.82
8.1.130.0070.00019.95
8.1.120.0030.00317.30
8.1.110.0040.00417.42
8.1.100.0040.00417.41
8.1.90.0000.00817.50
8.1.80.0000.00917.47
8.1.70.0000.00917.48
8.1.60.0030.00617.56
8.1.50.0030.00517.54
8.1.40.0080.00017.54
8.1.30.0050.00317.64
8.1.20.0040.00417.63
8.1.10.0040.00417.53
8.1.00.0050.00517.52
8.0.300.0050.00320.07
8.0.290.0000.00816.75
8.0.280.0040.00418.36
8.0.270.0040.00416.93
8.0.260.0000.00818.37
8.0.250.0040.00416.92
8.0.240.0040.00417.02
8.0.230.0030.00316.96
8.0.220.0000.00716.79
8.0.210.0000.00816.96
8.0.200.0040.00416.82
8.0.190.0060.00316.86
8.0.180.0050.00216.91
8.0.170.0040.00416.89
8.0.160.0040.00416.86
8.0.150.0080.00016.82
8.0.140.0040.00416.87
8.0.130.0030.00313.36
8.0.120.0000.00816.87
8.0.110.0040.00416.86
8.0.100.0040.00416.87
8.0.90.0000.00716.88
8.0.80.0070.00916.92
8.0.70.0030.00516.77
8.0.60.0040.00416.80
8.0.50.0070.00016.78
8.0.30.0130.00316.92
8.0.20.0100.00716.88
8.0.10.0060.01217.01
8.0.00.0120.00617.15
7.4.330.0000.00515.55
7.4.320.0040.00416.44
7.4.300.0000.00716.61
7.4.290.0000.00816.55
7.4.280.0060.00316.54
7.4.270.0030.00316.49
7.4.260.0030.00313.16
7.4.250.0030.00316.40
7.4.240.0030.00316.59
7.4.230.0030.00316.59
7.4.220.0020.00516.52
7.4.210.0060.01016.54
7.4.200.0000.00716.38
7.4.140.0070.01016.66
7.4.130.0120.00616.71
7.4.120.0170.00016.64
7.4.110.0130.00316.69
7.4.100.0110.00716.50
7.4.90.0140.00316.52
7.4.80.0090.01016.59
7.4.70.0070.01116.46
7.4.60.0070.01016.50
7.4.50.0060.01216.65
7.4.40.0140.01116.47
7.4.30.0110.00716.56
7.4.20.0090.00916.66
7.4.10.0100.00716.45
7.4.00.0070.01016.51
7.3.330.0030.00316.16
7.3.320.0060.00013.07
7.3.310.0000.00716.20
7.3.300.0030.00316.18
7.3.290.0100.00416.21
7.3.260.0140.00316.19
7.3.250.0100.00716.21
7.3.240.0060.01016.12
7.3.230.0090.00916.42
7.3.220.0160.00316.17
7.3.210.0060.01016.48
7.3.200.0030.01316.28
7.3.190.0040.01416.18
7.3.180.0070.01016.44
7.3.170.0150.00616.16
7.3.160.0150.00816.20
7.3.150.0100.00716.42
7.3.140.0160.00016.18
7.3.130.0060.00916.18
7.3.120.0070.01016.20
7.3.110.0030.01316.16
7.3.100.0090.00616.42
7.3.90.0060.00916.14
7.3.80.0140.00316.18
7.3.70.0100.00616.21
7.3.60.0110.00616.27
7.3.50.0060.00916.13
7.3.40.0080.00816.06
7.3.30.0110.00516.22
7.3.20.0480.00716.27
7.3.10.0110.00616.19
7.3.00.0110.00516.13

preferences:
48.33 ms | 401 KiB | 5 Q