3v4l.org

run code in 300+ PHP versions simultaneously
<?php class IOException { protected $file; public function __construct($file, $message) { parent::__construct($message); $this->file = $file; } public function getFile() { return $this->file; } } class File { protected $path; protected $handle; public function __construct($path) { $this->path = $path; } public function open($mode) { $this->handle = @fopen($this->path, $mode); if (!$this->handle) { throw new IOException($this->path, "could not open the file"); } } } $file = new File("/no/file"); try { $file->open() } catch (IOException $io) { $io->printStackTrace(); } ?>

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)
5.4.220.0170.04212.39
5.4.210.0140.04812.39
5.4.200.0220.05012.39
5.4.190.0200.04512.38
5.4.180.0170.04212.39
5.4.170.0160.04412.39
5.4.160.0150.04512.38
5.4.150.0130.04712.38
5.4.140.0150.04312.08
5.4.130.0140.04912.05
5.4.120.0140.04412.02
5.4.110.0190.04212.02
5.4.100.0100.05012.02
5.4.90.0150.04612.02
5.4.80.0150.04512.02
5.4.70.0190.04312.02
5.4.60.0170.04512.02
5.4.50.0380.07412.01
5.4.40.0180.04412.00
5.4.30.0170.04312.00
5.4.20.0190.04111.99
5.4.10.0200.03712.00
5.4.00.0150.04011.49
5.3.270.0170.04412.72
5.3.260.0120.04912.72
5.3.250.0160.04512.71
5.3.240.0160.04612.72
5.3.230.0180.05112.71
5.3.220.0180.04512.68
5.3.210.0160.04812.68
5.3.200.0110.05112.68
5.3.190.0150.04812.68
5.3.180.0150.04712.67
5.3.170.0150.04612.67
5.3.160.0220.04212.67
5.3.150.0170.05012.67
5.3.140.0140.04712.66
5.3.130.0210.04612.66
5.3.120.0140.05012.66
5.3.110.0190.04412.66
5.3.100.0280.06612.12
5.3.90.0160.04512.09
5.3.80.0150.05012.08
5.3.70.0210.04112.08
5.3.60.0190.04712.06
5.3.50.0130.04812.00
5.3.40.0180.04312.00
5.3.30.0240.03811.98
5.3.20.0200.04011.75
5.3.10.0160.04311.71
5.3.00.0270.03611.70

preferences:
138.2 ms | 1386 KiB | 7 Q