3v4l.org

run code in 300+ PHP versions simultaneously
<?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 5.3.0 - 5.3.29, 5.4.0 - 5.4.32, 7.2.29 - 7.2.33, 7.3.16 - 7.3.31, 7.4.3 - 7.4.32, 8.0.0 - 8.0.12, 8.0.14 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.7
<?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.

preferences:
140.74 ms | 402 KiB | 202 Q