3v4l.org

run code in 300+ PHP versions simultaneously
<?php #[Attribute] enum DemoEnum {} #[Attribute] trait DemoTrait {} #[Attribute] abstract class DemoAbstract {} #[Attribute] interface DemoInterface {} #[DemoEnum] #[DemoTrait] #[DemoAbstract] #[DemoInterface] function usesWrongAttrib() {} $r = new ReflectionFunction( 'usesWrongAttrib' ); $a = $r->getAttributes(); var_dump( $a ); foreach ( $a as $attrib ) { try { $attrib->newInstance(); } catch ( Error $e ) { echo get_class( $e ) . ": " . $e->getMessage() . "\n"; } }

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.4.130.0120.00918.00
8.4.120.0110.01020.41
8.4.110.0140.00618.66
8.4.100.0360.00719.51
8.4.90.0310.00919.65
8.4.80.0310.00719.57
8.4.70.0330.01319.56
8.4.60.0250.00519.50
8.4.50.0190.00619.67
8.4.40.0240.00619.38
8.4.30.0220.00519.39
8.4.20.0190.00619.28
8.4.10.0230.00419.45
8.3.260.0120.00816.71
8.3.250.0130.00618.87
8.3.240.0050.00318.50
8.3.230.0180.00718.35
8.3.220.0190.00418.54
8.3.210.0230.00618.38
8.3.200.0170.00618.28
8.3.190.0200.00518.35
8.3.180.0190.00718.21
8.3.170.0220.00518.37
8.3.160.0220.00518.54
8.3.150.0180.00618.37
8.3.140.0160.00818.42
8.3.130.0180.00418.49
8.3.120.0160.00518.52
8.3.110.0140.00718.43
8.3.100.0210.00618.44
8.3.90.0200.00518.44
8.3.80.0200.00518.65
8.3.70.0210.00618.18
8.3.60.0220.00618.49
8.3.50.0250.00518.31
8.3.40.0200.00519.39
8.3.30.0160.00419.51
8.3.20.0180.00219.32
8.3.10.0200.00319.53
8.3.00.0120.00619.23
8.2.290.0250.00718.57
8.2.280.0250.00718.74
8.2.270.0250.00618.39
8.2.260.0160.00618.54
8.2.250.0170.00618.65
8.2.240.0230.00218.54
8.2.230.0170.00518.37
8.2.220.0160.00418.49
8.2.210.0140.00518.46
8.2.200.0180.00618.48
8.2.190.0180.00518.39
8.2.180.0180.00318.38
8.2.170.0200.00319.53
8.2.160.0170.00519.55
8.2.150.0170.00519.66
8.2.140.0190.00519.45
8.2.130.0200.00419.49
8.2.120.0180.00519.34
8.2.110.0210.00519.59
8.2.100.0180.00619.55
8.2.90.0250.00819.41
8.2.80.0280.00519.35
8.2.70.0160.00719.16
8.2.60.0180.00519.33
8.2.50.0200.00719.28
8.2.40.0170.00519.40
8.2.30.0140.00519.33
8.2.20.0140.00619.48
8.2.10.0150.00619.33
8.2.00.0180.00419.36

preferences:
28.38 ms | 403 KiB | 5 Q