3v4l.org

run code in 300+ PHP versions simultaneously
<?php $("#form_pass").change(function(){ var file_data = $('.inp_pass').prop('files')[0]; console.log(typeof file_data); var form_data = new FormData(); form_data.append('file', file_data); $.ajaxSetup({ headers: { 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') } }) $.ajax({ url: $(this).attr('action'), dataType: 'text', cache: false, contentType: false, processData: false, data: form_data, type: 'post', success : function(fssp){ console.log(fssp); }, error: function(fssp) { console.log(fssp); } }); })
Output for 7.2.0 - 7.2.34, 7.3.0 - 7.3.24, 7.4.0 - 7.4.12
Parse error: syntax error, unexpected '(', expecting variable (T_VARIABLE) or '{' or '$' in /in/j5eJm on line 3
Process exited with code 255.

preferences:
169.46 ms | 1008 KiB | 7 Q