3v4l.org

run code in 300+ PHP versions simultaneously
<?php trait DeserializableEnum { public static function from($value) { return self::{$value}; } public static function tryFrom($value) { try { return self::from($value); } catch (Throwable) { return null; } } } enum Foo { use DeserializableEnum; case one; } var_dump( Foo::from("one"), Foo::tryFrom("aaa") );

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.0100.00917.95
8.4.120.0120.00823.89
8.4.110.0080.00322.50
8.4.100.0280.01018.74
8.4.90.0130.00819.87
8.4.80.0140.00520.04
8.3.250.0040.00320.93
8.3.240.0120.00417.17
8.3.230.0090.01018.50
8.3.220.0140.00720.08
8.3.180.0110.00818.66
8.3.50.0100.00918.63
8.2.290.0090.00918.60

preferences:
36.5 ms | 403 KiB | 5 Q