3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $field = ['uid' => $user_id, 'time' =>$time,'content'=>$this->content,'auto'=>"0"]; array_push($field,['pic_url'=>$new_name]); var_dump($field); ?>
based on Y0Gf7
Output for 7.0.0 - 7.2.0
Notice: Undefined variable: user_id in /in/uE2Gm on line 3 Notice: Undefined variable: time in /in/uE2Gm on line 3 Fatal error: Uncaught Error: Using $this when not in object context in /in/uE2Gm:3 Stack trace: #0 {main} thrown in /in/uE2Gm on line 3
Process exited with code 255.
Output for 5.4.10 - 5.6.21
Notice: Undefined variable: user_id in /in/uE2Gm on line 3 Notice: Undefined variable: time in /in/uE2Gm on line 3 Fatal error: Using $this when not in object context in /in/uE2Gm on line 3
Process exited with code 255.
Output for 5.3.20 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/uE2Gm on line 3
Process exited with code 255.