3v4l.org

run code in 300+ PHP versions simultaneously
<?php #[Attribute(Attribute::TARGET_FUNCTION)] class FunctionAttribute { } $closure = #[FunctionAttribute] fn() => true; class Something { public function get(Closure $closure) { return (new ReflectionFunction($closure)) ->getAttributes(FunctionAttribute::class)[0] ->newInstance(); } } (new Something)->get($closure);

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.10.0110.00718.42
8.5.00.0140.01119.88
8.4.150.0020.00014.05
8.4.140.0120.00817.60
8.4.130.0130.00817.92
8.4.120.0120.00820.71
8.4.110.0130.00622.53
8.4.100.0130.00817.55
8.4.90.0090.00718.73
8.4.80.0130.00717.71
8.4.70.0080.01217.75
8.4.60.0130.00818.52
8.4.50.0140.00618.64
8.4.40.0090.01219.33
8.4.30.0160.00018.63
8.4.20.0160.00017.79
8.4.10.0130.00322.20
8.3.280.0100.01118.21
8.3.270.0110.00816.43
8.3.260.0120.00816.22
8.3.250.0110.00818.64
8.3.240.0120.00716.51
8.3.230.0090.01016.46
8.3.220.0060.00217.20
8.3.210.0090.00716.48
8.3.200.0040.00416.49
8.3.190.0100.00519.16
8.3.180.0100.00916.57
8.3.170.0070.00318.84
8.3.160.0070.01119.00
8.3.150.0140.00417.02
8.3.140.0110.00016.42
8.3.130.0100.00716.66
8.3.120.0000.00920.53
8.3.110.0070.00420.94
8.3.100.0050.00324.06
8.3.90.0060.01026.77
8.3.80.0110.00018.56
8.3.70.0120.00918.30
8.3.60.0120.00318.30
8.3.50.0070.01419.78
8.3.40.0040.01118.46
8.3.30.0090.00618.96
8.3.20.0040.00424.18
8.3.10.0050.00324.66
8.3.00.0030.00626.16
8.2.290.0130.00620.41
8.2.280.0040.00420.31
8.2.270.0070.01119.22
8.2.260.0000.00816.42
8.2.250.0040.00418.39
8.2.240.0110.00416.88
8.2.230.0040.00422.58
8.2.220.0030.00637.54
8.2.210.0040.00426.77
8.2.200.0040.00418.29
8.2.190.0120.00316.63
8.2.180.0110.00725.92
8.2.170.0160.00318.95
8.2.160.0070.00722.96
8.2.150.0040.00425.66
8.2.140.0040.00424.66
8.2.130.0000.00826.16
8.2.120.0080.00019.36
8.2.110.0060.00320.39
8.2.100.0060.00320.53
8.1.330.0120.00720.48
8.1.320.0100.01216.03
8.1.310.0040.00418.47
8.1.300.0060.00316.65
8.1.290.0080.00430.84
8.1.280.0040.01225.92
8.1.270.0040.00423.99
8.1.260.0040.00426.35
8.1.250.0000.00728.09
8.1.240.0060.00318.72
8.1.230.0070.00320.36
8.1.40.0050.00517.43
8.0.00.0130.00217.40
7.4.50.0220.00517.40

preferences:
102.01 ms | 403 KiB | 5 Q