3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php new DatePeriod(new DateTime('yesterday'), new DateInterval('P1D'), 'foo'); } catch (Exception $exception) { echo $exception->getMessage(), "\n"; } try { new DatePeriod(new DateTime('yesterday'), new DateInterval('P1D'), 'bar'); } catch (Exception $exception) { echo $exception->getMessage(), "\n"; }
Output for 7.1.25 - 7.3.4
Parse error: syntax error, unexpected '}', expecting end of file in /in/2jGLG on line 4
Process exited with code 255.