3v4l.org

run code in 300+ PHP versions simultaneously
<?php class cust extend Exception { public function errorMessage() { $errorMsg = 'error on line ' .$this->getLine(). ' in '.$this->getFle().': <b>' .$this->geMessage().'</b> is not a valid e-mail address'; return $errorMsg; } } $emial = "someone@example.com"; try { if(filter_var($email, FILTER_VALIDATE_EMAIL) === false) { throw new customException($emial); } if(strpos($email,"example") !== FALSE) { throw new Exception("emial is an example e-mail"); } } catch (customException $e) { echo $e->errorMessage(); } catch(Excception $e) { echo $e->getMessage(); } ?>

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.6.150.0000.05018.17
5.6.140.0030.04718.27
5.6.130.0200.03018.17
5.6.120.0030.04320.98
5.6.110.0100.05721.12
5.6.100.0170.07320.98
5.6.90.0000.09321.01
5.6.80.0030.04020.35
5.5.300.0100.06718.09
5.5.290.0070.07017.91
5.5.280.0070.04320.86
5.5.270.0070.04320.86
5.5.260.0030.07720.76
5.5.250.0070.07720.49
5.5.240.0170.02720.28

preferences:
141.77 ms | 1398 KiB | 7 Q