3v4l.org

run code in 300+ PHP versions simultaneously
<?php class C { static function f() { $php = ' $c = new class () { const U = 21; function f() { return #[A(self::U)] static function () {}; } }; return $c->f(); '; return eval($php); } } $rf = new \ReflectionFunction(C::f()); $ra = $rf->getAttributes()[0]; print $ra->getArguments()[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.60.0040.01118.18
8.3.50.0110.00420.06
8.3.40.0060.00919.96
8.3.30.0110.00418.71
8.3.20.0050.00224.18
8.3.10.0030.00624.66
8.3.00.0080.00026.16
8.2.180.0100.01025.92
8.2.170.0110.00318.73
8.2.160.0070.00722.96
8.2.150.0040.00425.66
8.2.140.0040.00424.66
8.2.130.0080.00026.16
8.2.120.0000.00726.16
8.2.110.0060.00319.39
8.2.100.0090.00317.91
8.2.90.0060.00317.73
8.2.80.0050.00318.54
8.2.70.0090.00017.63
8.2.60.0040.00417.75
8.2.50.0060.00317.98
8.2.40.0070.00018.09
8.2.30.0000.00718.15
8.2.20.0040.00420.34
8.2.10.0030.00617.74
8.2.00.0040.00419.21
8.1.280.0090.00625.92
8.1.270.0090.00023.99
8.1.260.0040.00426.35
8.1.250.0030.00528.09
8.1.240.0030.00620.76
8.1.230.0070.00720.97
8.1.220.0040.00418.55
8.1.210.0060.00319.02
8.1.200.0090.00317.35
8.1.190.0000.00817.35
8.1.180.0090.00018.10
8.1.170.0000.00817.68
8.1.160.0000.00718.90
8.1.150.0070.00018.57
8.1.140.0070.00017.48
8.1.130.0040.00418.79
8.1.120.0040.00417.50
8.1.110.0000.00817.36
8.1.100.0040.00417.49
8.1.90.0030.00517.39
8.1.80.0000.00917.43
8.1.70.0000.00817.52
8.1.60.0040.00417.61
8.1.50.0030.00517.53
8.1.40.0040.00417.43
8.1.30.0050.00317.64
8.1.20.0170.00717.68
8.1.10.0230.00717.52
8.1.00.0150.00417.46
8.0.300.0040.00419.91
8.0.290.0000.00716.63
8.0.280.0070.00018.48
8.0.270.0070.00016.76
8.0.260.0030.00318.46
8.0.250.0000.00717.01
8.0.240.0030.00316.85
8.0.230.0000.00717.00
8.0.220.0000.00816.84
8.0.210.0050.00216.86
8.0.200.0070.00017.00
8.0.190.0040.00416.98
8.0.180.0040.00416.98
8.0.170.0030.00716.82
8.0.160.0030.00616.86
8.0.150.0070.00316.82
8.0.140.0190.00416.86
8.0.130.0180.00216.75
8.0.120.0180.00316.83
8.0.110.0170.00316.88
8.0.100.0180.00516.79
8.0.90.0150.00716.82
8.0.80.0140.00616.95
8.0.70.0140.00916.90
8.0.60.0210.00316.83
8.0.50.0160.00616.79
8.0.30.0110.01116.76
8.0.20.0160.00716.86
8.0.10.0210.00316.95
7.4.330.0030.00315.55
7.4.320.0030.00516.45
7.4.300.0030.00316.66
7.4.290.0040.00416.46
7.4.280.0070.00016.53
7.4.270.0030.00616.57
7.4.260.0120.01216.48
7.4.250.0210.00316.45
7.4.240.0080.00816.53
7.4.230.0160.00616.60
7.4.220.0110.00316.46
7.4.210.0170.00316.41
7.4.200.0170.00516.41
7.4.190.0180.00416.65
7.4.180.0190.00316.67
7.4.160.0180.00016.60
7.4.150.0130.00516.43
7.4.140.0150.00416.33
7.4.130.0140.00416.48
7.4.120.0180.00316.57
7.4.110.0190.00016.41
7.4.100.0200.00316.54
7.4.90.0200.00016.30
7.4.80.0170.00216.30
7.4.70.0170.00316.53
7.4.60.0140.00616.56
7.4.50.0160.00316.39
7.4.40.0040.00816.34
7.4.30.0000.01116.39
7.4.20.0100.00716.38
7.4.10.0110.00016.52
7.4.00.0110.00516.44

preferences:
33.05 ms | 400 KiB | 5 Q