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.5.10.0090.01016.86
8.5.00.0120.01020.14
8.4.160.0130.01119.78
8.4.150.0020.00114.05
8.4.140.0160.00518.02
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.290.0120.01020.65
8.3.280.0100.01020.13
8.3.270.0120.00716.86
8.3.260.0060.00316.46
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.300.0130.00717.98
8.2.290.0090.00918.60
8.1.340.0130.00817.64

preferences:
32.1 ms | 403 KiB | 5 Q