3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php namespace Embrace; use DateTime; function testPass(DateTime $date) { return $date->format('Y-m-d'); } $now = new DateTime(); testPass($now->format('W'));
Output for 7.0.5, 7.0.14 - 7.1.0
Fatal error: Uncaught TypeError: Argument 1 passed to Embrace\testPass() must be an instance of DateTime, string given, called in /in/mZEXV on line 11 and defined in /in/mZEXV:5 Stack trace: #0 /in/mZEXV(11): Embrace\testPass('13') #1 {main} thrown in /in/mZEXV on line 5
Process exited with code 255.
Output for 7.0.6
Fatal error: Uncaught TypeError: Argument 1 passed to Embrace\testPass() must be an instance of DateTime, string given, called in /in/mZEXV on line 11 and defined in /in/mZEXV:5 Stack trace: #0 /in/mZEXV(11): Embrace\testPass('18') #1 {main} thrown in /in/mZEXV on line 5
Process exited with code 255.
Output for 7.0.4
Fatal error: Uncaught TypeError: Argument 1 passed to Embrace\testPass() must be an instance of DateTime, string given, called in /in/mZEXV on line 11 and defined in /in/mZEXV:5 Stack trace: #0 /in/mZEXV(11): Embrace\testPass('10') #1 {main} thrown in /in/mZEXV on line 5
Process exited with code 255.
Output for 7.0.3
Fatal error: Uncaught TypeError: Argument 1 passed to Embrace\testPass() must be an instance of DateTime, string given, called in /in/mZEXV on line 11 and defined in /in/mZEXV:5 Stack trace: #0 /in/mZEXV(11): Embrace\testPass('11') #1 {main} thrown in /in/mZEXV on line 5
Process exited with code 255.
Output for 7.0.0 - 7.0.2
Fatal error: Uncaught TypeError: Argument 1 passed to Embrace\testPass() must be an instance of DateTime, string given, called in /in/mZEXV on line 11 and defined in /in/mZEXV:5 Stack trace: #0 /in/mZEXV(11): Embrace\testPass('12') #1 {main} thrown in /in/mZEXV on line 5
Process exited with code 255.
Output for hhvm-3.12.0
Catchable fatal error: Argument 1 passed to Embrace\testPass() must be an instance of DateTime, string given in /in/mZEXV on line 7
Process exited with code 255.
Output for hhvm-3.10.0
Catchable fatal error: Argument 1 passed to Embrace\testPass() must be an instance of DateTime, string given in /in/mZEXV on line -1
Process exited with code 255.
Output for 5.3.0 - 5.6.28
Catchable fatal error: Argument 1 passed to Embrace\testPass() must be an instance of DateTime, string given, called in /in/mZEXV on line 11 and defined in /in/mZEXV on line 5
Process exited with code 255.
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.2.17
Parse error: syntax error, unexpected T_STRING in /in/mZEXV on line 2
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1, 5.0.0 - 5.0.5
Parse error: parse error, unexpected T_STRING in /in/mZEXV on line 2
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/mZEXV on line 2
Process exited with code 255.