3v4l.org

run code in 500+ PHP versions simultaneously
<?php #[Attribute] class y { function foo() { return __METHOD__; } } #[X, Y] function f() { } $ref = new \ReflectionFunction('\f'); try { if ($ref->getAttributes()[0]->getName() === 'X') { print 'Look mom! No hands' . PHP_EOL; } if ($ref->getAttributes()[1]->getName() === 'Y') { print $ref->getAttributes()[1]->newInstance()->foo(); } } catch (\Error $e) { # other errors var_dump($e->getMessage()); } ?>

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.0060.00216.61
8.5.60.0070.01118.27
8.5.50.0050.00218.48
8.5.30.0110.00618.03
8.5.20.0130.00720.25
8.5.10.0110.00716.72
8.5.00.0110.01019.78
8.4.220.0110.01019.75
8.4.210.0050.00519.66
8.4.180.0140.00721.93
8.4.170.0100.01223.84
8.4.160.0170.00523.80
8.4.150.0060.00516.81
8.4.140.0120.00917.37
8.4.130.0040.00417.91
8.4.120.0070.00320.80
8.4.110.0060.00322.45
8.4.100.0090.01017.82
8.4.90.0050.00317.89
8.4.80.0150.00518.00
8.4.70.0040.00419.68
8.4.60.0120.00917.91
8.4.50.0080.01020.41
8.4.40.0070.01317.65
8.4.30.0110.00318.23
8.4.20.0270.00017.83
8.4.10.0230.00217.30
8.3.310.0100.00918.55
8.3.300.0140.00720.90
8.3.290.0120.01020.91
8.3.280.0090.01418.48
8.3.270.0130.00716.37
8.3.260.0110.00816.80
8.3.250.0080.01119.02
8.3.240.0130.00616.44
8.3.230.0140.00616.57
8.3.220.0090.01017.06
8.3.210.0100.00616.68
8.3.200.0120.00716.25
8.3.190.0040.00316.95
8.3.180.0110.00718.96
8.3.170.0070.01117.09
8.3.160.0240.00316.44
8.3.150.0150.00916.08
8.3.140.0190.00616.55
8.3.130.0120.00916.77
8.3.120.0140.00816.28
8.3.110.0160.00516.34
8.3.100.0230.00216.49
8.3.90.0170.00816.07
8.3.80.0180.00716.48
8.3.70.0220.00316.54
8.3.60.0200.00616.21
8.3.50.0250.00016.48
8.3.40.0160.00217.13
8.3.30.0140.00617.32
8.3.20.0210.00017.35
8.3.10.0200.00017.17
8.3.00.0070.00417.50
8.2.310.0110.00717.97
8.2.300.0110.00921.87
8.2.290.0030.00520.66
8.2.280.0090.00616.59
8.2.270.0190.00016.40
8.2.260.0120.00816.20
8.2.250.0080.01216.35
8.2.240.0160.00316.64
8.2.230.0180.00317.91
8.2.220.0160.00316.55
8.2.210.0160.00416.75
8.2.200.0100.01116.38
8.2.190.0150.00718.23
8.2.180.0140.00516.41
8.2.170.0220.00017.31
8.2.160.0190.00017.63
8.2.150.0170.00317.30
8.2.140.0140.00719.06
8.2.130.0120.00817.34
8.2.120.0190.00017.52
8.2.110.0180.00317.36
8.2.100.0150.00517.62
8.2.90.0170.00417.15
8.2.80.0150.00517.28
8.2.70.0130.00717.38
8.2.60.0150.00517.37
8.2.50.0130.00617.52
8.2.40.0090.00917.07
8.2.30.0140.00417.45
8.2.20.0160.00317.38
8.2.10.0110.00819.06
8.2.00.0110.00819.19
8.1.340.0130.00717.77
8.1.320.0130.00616.19

preferences:
42.4 ms | 866 KiB | 5 Q