3v4l.org

run code in 300+ PHP versions simultaneously
<?php #[Attribute(Attribute::TARGET_PROPERTY)] enum Types { case Int32; case Int64; case Float32; } define('Float32', Types::Float32); define('Int64', Types::Int64); define('Int32', Types::Int32); class Test { #[Int32] #[Blah] public int $value; } $t = new Test(); $r = new ReflectionClass($t); $attr = $r->getProperty('value')->getAttributes(); foreach($attr as &$a) { if (class_exists($a->getName())) { $a = $a->newInstance(); } else if(defined($a->getName())) { $a = constant($a->getName()); } } var_dump($attr);

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.20.0100.00720.26
8.5.10.0090.00816.57
8.5.00.0130.00819.98
8.4.170.0180.00422.07
8.4.160.0140.00822.06
8.4.150.0030.00014.05
8.4.140.0080.01317.76
8.4.130.0130.00718.94
8.4.120.0060.00223.97
8.4.110.0110.00918.83
8.4.100.0130.00719.09
8.4.90.0110.00920.57
8.4.80.0120.00817.93
8.4.70.0500.00618.18
8.4.60.0400.00918.18
8.4.50.0310.00918.18
8.4.40.0350.00818.18
8.4.30.0350.00718.18
8.4.20.0330.00718.18
8.4.10.0340.00618.18
8.3.290.0070.00222.57
8.3.280.0070.01418.29
8.3.270.0100.00916.37
8.3.260.0080.00316.51
8.3.250.0120.00818.93
8.3.240.0110.00817.15
8.3.230.0070.00316.84
8.3.220.0140.00518.88
8.3.210.0260.00518.18
8.3.200.0320.00718.18
8.3.190.0280.00818.18
8.3.180.0320.00618.18
8.3.170.0280.00818.18
8.3.160.0290.00618.18
8.3.150.0190.00718.18
8.3.140.0220.00418.18
8.3.130.0290.00818.18
8.3.120.0300.00718.18
8.3.110.0360.00918.18
8.3.100.0400.00918.18
8.3.90.0310.00918.18
8.3.80.0270.00618.18
8.3.70.0270.00618.18
8.3.60.0380.00718.18
8.3.50.0410.01118.18
8.3.40.0450.00618.18
8.3.30.0180.00718.18
8.3.20.0250.01018.18
8.3.10.0340.00918.18
8.3.00.0350.00918.18
8.2.300.0110.00920.41
8.2.290.0110.00820.20
8.2.280.0310.01018.18
8.2.270.0360.00818.18
8.2.260.0330.00818.18
8.2.250.0320.01018.18
8.2.240.0310.00418.18
8.2.230.0240.00718.18
8.2.220.0240.00618.18
8.2.210.0230.00718.18
8.2.200.0260.00418.18
8.2.190.0260.00618.18
8.2.180.0400.00418.18
8.2.170.0310.00618.18
8.2.160.0270.00718.18
8.2.150.0300.00618.18
8.2.140.0330.00818.18
8.2.130.0320.01118.18
8.2.120.0260.00718.18
8.2.110.0280.01018.18
8.2.100.0340.01218.18
8.2.90.0360.00818.18
8.2.80.0400.00718.18
8.2.70.0370.00718.18
8.2.60.0220.00718.18
8.2.50.0310.00618.18
8.2.40.0370.00918.18
8.2.30.0380.00818.18
8.2.20.0320.00718.18
8.2.10.0380.00618.18
8.2.00.0320.00918.18
8.1.340.0120.00620.23

preferences:
32.68 ms | 403 KiB | 5 Q