3v4l.org

run code in 500+ PHP versions simultaneously
<?php #[Attribute(Attribute::TARGET_CLASS_CONSTANT)] class TestAttribute { public function __construct(public string $value) { } } enum TestNum { #[TestAttribute('alpha value')] case ALPHA; #[TestAttribute('beta value')] case BETA; } var_dump((new \ReflectionClassConstant(TestNum::class, 'ALPHA'))->getAttributes(TestAttribute::class)[0]->newInstance());

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.70.0070.00116.70
8.5.60.0120.00516.62
8.5.50.0070.01118.37
8.5.30.0080.01020.14
8.5.20.0110.00820.16
8.5.10.0070.01018.65
8.5.00.0120.00920.24
8.4.220.0110.00619.53
8.4.210.0090.01219.77
8.4.180.0140.00721.98
8.4.170.0110.01022.05
8.4.160.0110.01123.78
8.4.150.0060.00716.82
8.4.140.0120.00917.52
8.4.130.0110.00917.61
8.4.120.0030.00520.45
8.4.110.0050.00718.92
8.4.100.0130.00817.82
8.4.90.0130.00818.74
8.4.80.0100.00517.77
8.4.70.0120.00717.83
8.4.60.0080.00318.67
8.4.50.0030.00617.67
8.4.40.0070.00317.88
8.4.30.0070.01320.40
8.4.20.0070.01019.75
8.4.10.0040.00419.56
8.3.310.0060.00318.62
8.3.300.0080.01120.21
8.3.290.0150.00920.67
8.3.280.0080.01218.43
8.3.270.0080.01216.82
8.3.260.0070.00216.49
8.3.250.0100.00918.84
8.3.240.0110.00816.49
8.3.230.0080.00216.79
8.3.220.0080.00817.18
8.3.210.0060.00416.69
8.3.200.0030.00618.49
8.3.190.0120.00317.02
8.3.180.0130.00616.53
8.3.170.0070.01117.34
8.3.160.0090.00918.26
8.3.150.0150.00417.19
8.3.140.0040.00416.80
8.3.130.0040.00418.56
8.3.120.0030.00620.58
8.3.110.0080.00022.58
8.3.100.0090.00620.94
8.3.90.0070.00020.94
8.3.50.0090.00020.94
8.2.310.0110.01018.11
8.2.300.0110.00922.27
8.2.290.0100.00920.77
8.2.280.0120.00718.61
8.2.270.0200.00016.65
8.2.260.0090.00619.18
8.2.250.0080.00018.71
8.2.240.0100.00017.32
8.2.230.0060.00320.94
8.2.220.0080.00022.58
8.2.210.0030.00622.58
8.1.340.0100.01019.51
8.1.330.0110.00820.54
8.1.320.0130.00616.21
8.1.310.0000.01516.60
8.1.300.0060.01017.99
8.1.20.0100.00517.57
8.1.10.0200.00417.42
8.1.00.0120.00917.39
8.0.150.0090.01116.79
8.0.140.0120.00816.77
8.0.130.0170.00316.78
8.0.120.0160.00216.91
8.0.110.0120.00816.75
8.0.100.0130.00516.66
8.0.90.0140.00416.76
8.0.80.0090.01016.75
8.0.70.0160.00216.80
8.0.60.0160.00316.66
8.0.50.0160.00316.73
8.0.30.0140.00716.82
8.0.20.0150.00416.76
8.0.10.0190.00316.71
7.4.270.0230.00016.34
7.4.260.0210.00216.37
7.4.250.0250.00016.43
7.4.240.0170.00916.18
7.4.230.0220.00616.44
7.4.220.0190.00516.33
7.4.210.0210.00216.35
7.4.200.0190.00316.34
7.4.190.0210.00316.42
7.4.180.0160.00816.47
7.4.160.0180.00716.43
7.4.150.0180.00616.41
7.4.140.0190.00516.19
7.4.130.0160.00516.07
7.4.120.0080.00616.29
7.4.110.0110.01116.11
7.4.100.0130.00716.25
7.4.90.0250.00316.20
7.4.80.0170.00516.22
7.4.70.0150.00616.21
7.4.60.0210.00416.13
7.4.50.0220.00216.25
7.4.40.0120.00916.25
7.4.30.0090.00916.21
7.4.20.0170.00416.29
7.4.10.0190.00016.17
7.4.00.0050.00916.07

preferences:
45.3 ms | 947 KiB | 5 Q