3v4l.org

run code in 500+ PHP versions simultaneously
<?php $info = new SplFileInfo( __FILE__ ); try { serialize($info); } catch (\Throwable $e) { echo $e . "\n\n\n"; } class MyFileInfo extends SplFileInfo { public function __serialize(): array { return [ 'file' => getPathname(), ]; } public function __unserialize(array $data) { $this->__construct($data['file']); } } $info2 = new MyFileInfo( __FILE__ ); try { $serialized = serialize($info2); $roundtrip = unserialize($serialized); var_dump($info2, $roundtrip); } catch (\Throwable $e) { echo $e . "\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.5.90.0110.00717.04
8.5.80.0130.00416.96
8.5.70.0100.00916.93
8.5.60.0060.00416.98
8.4.230.0090.00919.72
8.4.220.0040.00521.42
8.4.210.0090.00721.30
8.4.90.0050.00519.68
8.3.320.0080.00118.54
8.3.310.0050.00518.53
8.3.180.0050.00418.33
8.3.50.0040.00418.45
8.2.320.0120.00818.06
8.2.310.0050.00418.15

preferences:
48.02 ms | 545 KiB | 5 Q