3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php interface OrderInterface { public function getCheckoutCompletedAt(): \DateTime; } class Order implements OrderInterface { public function getCheckoutCompletedAt() { } }
based on J1V5W
Output for 7.0.0 - 7.2.11
Fatal error: Declaration of Order::getCheckoutCompletedAt() must be compatible with OrderInterface::getCheckoutCompletedAt(): DateTime in /in/ia8c1 on line 8
Process exited with code 255.
Output for hhvm-3.18.5 - 3.22.0
Output for 5.6.0 - 5.6.30
Parse error: syntax error, unexpected ':', expecting ';' or '{' in /in/ia8c1 on line 5
Process exited with code 255.