3v4l.org

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

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.00.0140.01219.98
8.4.150.0010.00114.05
8.4.140.0110.00617.46
8.4.130.0020.00819.35
8.4.120.0110.00920.88
8.4.110.0070.00722.39
8.4.100.0150.00617.80
8.4.90.0150.00618.64
8.4.80.0040.00517.59
8.4.70.0120.00817.76
8.4.60.0300.00817.88
8.4.50.0240.00718.23
8.4.40.0260.01218.41
8.4.30.0230.00819.08
8.4.20.0230.00817.75
8.4.10.0220.00719.75
8.3.280.0130.00918.35
8.3.270.0110.00816.43
8.3.260.0120.00816.63
8.3.250.0120.01018.80
8.3.240.0030.00616.61
8.3.230.0140.00416.67
8.3.220.0040.00617.09
8.3.210.0110.00816.41
8.3.200.0220.00516.40
8.3.190.0270.00416.80
8.3.180.0180.00716.38
8.3.170.0170.00516.57
8.3.160.0200.00717.38
8.3.150.0240.00916.44
8.3.140.0260.00617.68
8.3.130.0190.00517.49
8.3.120.0200.00418.66
8.3.110.0200.00817.46
8.3.100.0230.00416.43
8.3.90.0180.00721.51
8.3.80.0180.00517.36
8.3.70.0220.00916.48
8.3.60.0230.00917.50
8.3.50.0250.00818.29
8.3.40.0180.01318.03
8.3.30.0220.00718.14
8.3.20.0200.00420.71
8.3.10.0150.00521.18
8.3.00.0080.00721.84
8.2.290.0110.00720.58
8.2.280.0210.00518.36
8.2.270.0210.00817.66
8.2.260.0240.01016.55
8.2.250.0120.00317.57
8.2.240.0190.00417.02
8.2.230.0100.00518.79
8.2.220.0100.00320.46
8.2.210.0110.00621.54
8.2.200.0120.00416.43
8.2.190.0130.00616.53
8.2.180.0180.01121.28
8.2.170.0230.00718.29
8.2.160.0210.00520.29
8.2.150.0140.00421.68
8.2.140.0230.00521.13
8.2.130.0190.00621.84
8.2.120.0210.00421.94
8.2.110.0220.00418.46
8.2.100.0220.00417.73
8.2.90.0180.00617.88
8.2.80.0170.00918.35
8.2.70.0190.00817.44
8.2.60.0150.00717.68
8.2.50.0170.00517.81
8.2.40.0180.00618.81
8.2.30.0200.00617.79
8.2.20.0190.00518.90
8.2.10.0150.00817.87
8.2.00.0160.00718.40
8.1.330.0100.00820.18
8.1.320.0190.00916.18
8.1.310.0170.01117.31
8.1.300.0160.00917.10
8.1.290.0170.00823.52
8.1.280.0190.00521.06
8.1.270.0120.00320.73
8.1.260.0200.00321.85
8.1.250.0170.01022.75
8.1.240.0170.00620.62
8.1.230.0140.00719.04
8.1.220.0130.00817.53
8.1.210.0180.00618.08
8.1.200.0200.00517.26
8.1.190.0180.00317.18
8.1.180.0180.00417.54
8.1.170.0140.00817.66
8.1.160.0160.00618.05
8.1.150.0140.00917.80
8.1.140.0180.00617.28
8.1.130.0150.00818.00
8.1.120.0130.00817.28
8.1.110.0190.00317.24
8.1.100.0170.00217.33
8.1.90.0110.00417.38
8.1.80.0060.00617.28
8.1.70.0100.00617.29
8.1.60.0140.00317.38
8.1.50.0160.00417.43
8.1.40.0060.00517.40
8.1.30.0230.00917.49
8.1.20.0240.00517.51
8.1.10.0210.00617.39
8.1.00.0220.00817.39
8.0.300.0170.00419.13
8.0.290.0120.00716.54
8.0.280.0190.00517.38
8.0.270.0160.00417.26
8.0.260.0190.00317.38
8.0.250.0180.00616.65
8.0.240.0150.00716.64
8.0.230.0150.00716.80
8.0.220.0180.00416.75
8.0.210.0150.00716.62
8.0.200.0140.01116.82
8.0.190.0170.00516.76
8.0.180.0140.00916.80
8.0.170.0260.00616.65
8.0.160.0220.00416.79
8.0.150.0200.00716.64
8.0.140.0210.00716.72
8.0.130.0150.00716.82
8.0.120.0200.00616.76
8.0.110.0170.00916.66
8.0.100.0240.00516.68
8.0.90.0310.00716.66
8.0.80.0270.00716.79
8.0.70.0220.00716.73
8.0.60.0290.00416.74
8.0.50.0200.00516.61
8.0.30.0220.00616.77
8.0.20.0210.00816.75
8.0.10.0210.00816.59
7.4.330.0090.00315.96
7.4.320.0100.00516.44
7.4.300.0160.00216.39
7.4.290.0180.00516.31
7.4.280.0170.00216.48
7.4.270.0170.00516.32
7.4.260.0250.00516.32
7.4.250.0190.00816.33
7.4.240.0230.00416.42
7.4.230.0240.00216.33
7.4.220.0200.00616.46
7.4.210.0200.00616.39
7.4.200.0150.00616.40
7.4.190.0150.00616.36
7.4.180.0100.00516.47
7.4.160.0190.00416.43
7.4.150.0210.00516.33
7.4.140.0200.00716.35
7.4.130.0140.00616.33
7.4.120.0160.00816.33
7.4.110.0150.00816.24
7.4.100.0180.00216.29
7.4.90.0190.00616.25
7.4.80.0230.00616.33
7.4.70.0240.00716.34
7.4.60.0230.00816.24
7.4.50.0180.00616.30
7.4.40.0200.00516.19
7.4.30.0170.00916.27
7.4.20.0240.00416.30
7.4.10.0220.00616.26
7.4.00.0210.00816.32

preferences:
91.42 ms | 406 KiB | 6 Q