3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class Item { public $id; public $den; public $kassa; function __construct($id, $den, $kassa){ $this->id = $id; $this->den = $den; $this->kassa = $kassa; } function getData() { return "{$this->id}, {$this->den}, {$this->kassa}"; } } $item = new Item(); echo $item->getData;
Output for 7.1.0
Fatal error: Uncaught ArgumentCountError: Too few arguments to function Item::__construct(), 0 passed in /in/igPHM on line 24 and exactly 3 expected in /in/igPHM:10 Stack trace: #0 /in/igPHM(24): Item->__construct() #1 {main} thrown in /in/igPHM on line 10
Process exited with code 255.
Output for 5.2.6 - 5.6.28, 7.0.0 - 7.0.14
Warning: Missing argument 1 for Item::__construct(), called in /in/igPHM on line 24 and defined in /in/igPHM on line 10 Warning: Missing argument 2 for Item::__construct(), called in /in/igPHM on line 24 and defined in /in/igPHM on line 10 Warning: Missing argument 3 for Item::__construct(), called in /in/igPHM on line 24 and defined in /in/igPHM on line 10 Notice: Undefined variable: id in /in/igPHM on line 11 Notice: Undefined variable: den in /in/igPHM on line 12 Notice: Undefined variable: kassa in /in/igPHM on line 13 Notice: Undefined property: Item::$getData in /in/igPHM on line 25
Output for hhvm-3.10.0 - 3.12.0
Warning: __construct() expects exactly 3 parameters, 0 given in /in/igPHM on line 11 Notice: Undefined variable: id in /in/igPHM on line 11 Notice: Undefined variable: den in /in/igPHM on line 12 Notice: Undefined variable: kassa in /in/igPHM on line 13 Notice: Undefined property: Item::$getData in /in/igPHM on line 25
Output for 5.1.0 - 5.2.5
Warning: Missing argument 1 for Item::__construct(), called in /in/igPHM on line 24 and defined in /in/igPHM on line 10 Warning: Missing argument 2 for Item::__construct(), called in /in/igPHM on line 24 and defined in /in/igPHM on line 10 Warning: Missing argument 3 for Item::__construct(), called in /in/igPHM on line 24 and defined in /in/igPHM on line 10 Notice: Undefined variable: id in /in/igPHM on line 11 Notice: Undefined variable: den in /in/igPHM on line 12 Notice: Undefined variable: kassa in /in/igPHM on line 13 Notice: Undefined property: Item::$getData in /in/igPHM on line 25
Output for 5.0.0 - 5.0.5
Warning: Missing argument 1 for Item::__construct() in /in/igPHM on line 10 Warning: Missing argument 2 for Item::__construct() in /in/igPHM on line 10 Warning: Missing argument 3 for Item::__construct() in /in/igPHM on line 10 Notice: Undefined property: Item::$getData in /in/igPHM on line 25
Output for 4.4.2 - 4.4.9
Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /in/igPHM on line 6
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1
Parse error: parse error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /in/igPHM on line 6
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error, expecting `T_OLD_FUNCTION' or `T_FUNCTION' or `T_VAR' or `'}'' in /in/igPHM on line 6
Process exited with code 255.