<?phpclass upload { public $postData = array(); public function __construct(array $file, array $post) { //creates file that is being uploaded and moves it to media dir //$this->_uploadFile($file);a //grabs post data $this->postData = $post; } public function someFunction() { var_dump($this->postData); }}$x = new upload([1,2,3], [5,6,7,8]);$x->someFunction();
<?phpclass upload { public $postData = array(); public function __construct(array $file, array $post) { //creates file that is being uploaded and moves it to media dir //$this->_uploadFile($file);a //grabs post data $this->postData = $post; } public function someFunction() { var_dump($this->postData); }}$x = new upload([1,2,3], [5,6,7,8]);$x->someFunction();
Output for 8.0.13
Parse error: syntax error, unexpected identifier "upload" in /in/Bjqpe on line 1
Process exited with code 255.
Output for 7.3.32 - 7.3.33, 7.4.33
Parse error: syntax error, unexpected 'upload' (T_STRING) in /in/Bjqpe on line 1
Process exited with code 255.