<?php
class someObj {
var $app;
public function __construct($app) {
$this->app = $app;
}
public function someFunction(){
for($i = 0; $i < 1000; $i++) {
}
}
}
$newObj = new someObj;
Fatal error: Uncaught ArgumentCountError: Too few arguments to function someObj::__construct(), 0 passed in /in/n85M4 on line 15 and exactly 1 expected in /in/n85M4:4
Stack trace:
#0 /in/n85M4(15): someObj->__construct()
#1 {main}
thrown in /in/n85M4 on line 4
Process exited with code 255.
Warning: Missing argument 1 for someObj::__construct(), called in /in/n85M4 on line 15 and defined in /in/n85M4 on line 4
Notice: Undefined variable: app in /in/n85M4 on line 5
Output for 5.1.0 - 5.1.2
Strict Standards: var: Deprecated. Please use the public/private/protected modifiers in /in/n85M4 on line 3
Warning: Missing argument 1 for someObj::__construct(), called in /in/n85M4 on line 15 and defined in /in/n85M4 on line 4
Notice: Undefined variable: app in /in/n85M4 on line 5
Output for 5.0.0 - 5.0.5
Strict Standards: var: Deprecated. Please use the public/private/protected modifiers in /in/n85M4 on line 3
Warning: Missing argument 1 for someObj::__construct() in /in/n85M4 on line 4
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/n85M4 on line 4
Process exited with code 255.
Parse error: parse error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /in/n85M4 on line 4
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/n85M4 on line 4
Process exited with code 255.