3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php // Validation rules $validator = \Validator::make( \Input::all(), [ 'category' => 'required|integer|exists:categories,id', 'document' => 'required|unique:documents,filename|between:0,1048576|mimes:7z,aiff,asf,avi,bmp,csv,doc,docx,fla,flv,gif,gz,gzip,jpeg,jpg,mid,mov,mp3,mp4,mpc,mpeg,mpg,ods,odt,pdf,png,ppt,pptx,pxd,qt,rar,rm,rmi,rmvb,rtf,sdc,sitd,swf,sxc,sxw,tar,tgz,tif,tiff,txt,vsd,wav,wma,wmv,xls,xlsx,zip', 'name' => 'required|max:100|unique:documents', 'details' => 'max:255', ] );
Output for 7.0.0 - 7.1.0
Fatal error: Uncaught Error: Class 'Validator' not found in /in/tLkeG:4 Stack trace: #0 {main} thrown in /in/tLkeG on line 4
Process exited with code 255.
Output for 5.4.0 - 5.6.28
Fatal error: Class 'Validator' not found in /in/tLkeG on line 4
Process exited with code 255.
Output for 5.3.0 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/tLkeG on line 6
Process exited with code 255.
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.2.17
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/tLkeG on line 4 Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/tLkeG on line 5 Parse error: syntax error, unexpected '[' in /in/tLkeG on line 6
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1, 5.0.0 - 5.0.5
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/tLkeG on line 4 Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/tLkeG on line 5 Parse error: parse error, unexpected '[' in /in/tLkeG on line 6
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/tLkeG on line 4 Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/tLkeG on line 5 Parse error: parse error in /in/tLkeG on line 6
Process exited with code 255.