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]; $ra->getArguments();

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.01516.58
8.3.60.0070.00718.55
8.3.50.0110.00420.11
8.3.40.0140.00319.87
8.3.30.0110.00418.53
8.3.20.0070.00024.18
8.3.10.0060.00324.66
8.3.00.0080.00026.16
8.2.190.0100.01016.88
8.2.180.0140.00725.92
8.2.170.0090.00619.13
8.2.160.0100.00322.96
8.2.150.0070.00025.66
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0080.00026.16
8.2.110.0000.01120.97
8.2.100.0040.00817.88
8.2.90.0080.00017.72
8.2.80.0060.00317.97
8.2.70.0000.00817.50
8.2.60.0050.00317.38
8.2.50.0040.00418.03
8.2.40.0060.00318.16
8.2.30.0040.00418.05
8.2.20.0040.00420.50
8.2.10.0000.00717.59
8.2.00.0040.00419.23
8.1.280.0070.00725.92
8.1.270.0030.00623.99
8.1.260.0040.00426.35
8.1.250.0080.00028.09
8.1.240.0000.00919.61
8.1.230.0030.00817.83
8.1.220.0090.00017.78
8.1.210.0060.00318.77
8.1.200.0060.00317.36
8.1.190.0000.00817.23
8.1.180.0070.00718.10
8.1.170.0030.00617.62
8.1.160.0050.00218.86
8.1.150.0000.00718.57
8.1.140.0030.00517.38
8.1.130.0040.00418.85
8.1.120.0000.00817.45
8.1.110.0040.00417.48
8.1.100.0040.00417.48
8.1.90.0050.00317.36
8.1.80.0090.00017.36
8.1.70.0070.00017.49
8.1.60.0030.00517.59
8.1.50.0050.00317.52
8.1.40.0050.00317.51
8.1.30.0040.00417.58
8.1.20.0190.00817.64
8.1.10.0210.00417.38
8.1.00.0160.00317.34
8.0.300.0080.00018.77
8.0.290.0080.00016.75
8.0.280.0030.00318.45
8.0.270.0070.00016.88
8.0.260.0030.00318.46
8.0.250.0050.00317.00
8.0.240.0000.00616.89
8.0.230.0000.00717.00
8.0.220.0090.00016.88
8.0.210.0040.00416.92
8.0.200.0030.00317.03
8.0.190.0070.00016.99
8.0.180.0030.00616.94
8.0.170.0030.00716.76
8.0.160.0120.00016.87
8.0.150.0040.00416.91
8.0.140.0150.00516.77
8.0.130.0120.00816.80
8.0.120.0160.00416.91
8.0.110.0140.00716.70
8.0.100.0190.00316.72
8.0.90.0150.00816.85
8.0.80.0130.00916.82
8.0.70.0110.01116.81
8.0.60.0190.00316.70
8.0.50.0200.00316.97
8.0.30.0130.01016.79
8.0.20.0220.00016.88
8.0.10.0180.00416.92
7.4.330.0050.00015.55
7.4.320.0060.00316.54
7.4.300.0000.00716.53
7.4.290.0000.00816.46
7.4.280.0040.00416.59
7.4.270.0000.00716.52
7.4.260.0240.00016.51
7.4.250.0240.00016.61
7.4.240.0090.00616.58
7.4.230.0150.00916.41
7.4.220.0100.00716.50
7.4.210.0160.00416.42
7.4.200.0180.00716.63
7.4.190.0170.00516.67
7.4.180.0130.00916.66
7.4.160.0170.00316.57
7.4.150.0110.00716.51
7.4.140.0120.00816.53
7.4.130.0180.00316.38
7.4.120.0160.00516.59
7.4.110.0180.00416.45
7.4.100.0160.00516.46
7.4.90.0160.00416.35
7.4.80.0160.00316.45
7.4.70.0180.00416.49
7.4.60.0180.00016.37
7.4.50.0120.00716.32
7.4.40.0000.01116.19
7.4.30.0080.00416.47
7.4.20.0080.01016.54
7.4.10.0080.00516.50
7.4.00.0100.00216.50

preferences:
17.4 ms | 401 KiB | 5 Q