3v4l.org

run code in 300+ PHP versions simultaneously
<?php $timestamp = "201511"; $username= "ryan"; $password= "12345"; $SQL_query = <<<EOT SELECT reg_id as ID, what_mach_op, address, farm_breeding_mating, farm_calve, farm_drenching, farm_feed_req, farm_detect_treat_lame, farm_detect_treat_mast, if(isnull(date_begin) || year(date_begin)<=1970, null, Date_format(date_begin, '%d/%m/%Y')) as begin_date, if(isnull(date_finish) || year(date_finish)<=1970, null, Date_format(date_finish, '%d/%m/%Y')) as finish_date, country_birth, farm_calf_health, EmployeeClientNo, country_app, num_dep, if(isnull(date_birth) || year(date_birth)<=1970, null, Date_format(date_birth, '%d/%m/%Y')) as birth_date, drv_lic_n_proj_exp, email, lvl_eng, gather_exp, first_name, full_name, sex, health_prob, height, last_name, farm_mach_maint, farm_drive_motor, farm_drive_quad, farm_drv_tractor, farm_wagon, marital_status, farm_milking_herr, farm_milking_rot, farm_shed_setup, mobile_phone, nation, if(isnull(date_pass) || year(date_pass)<=1970, null, Date_format(date_pass, '%d/%m/%Y')) as expire_date, farm_fencing, farm_hay, farm_weed, list_qual, home_phone, job_position, pref_name, emplo_det, emplo_as, emplo_ref1_comp, emplo_ref1_contact, emplo_ref1_name, emplo_ref1_pos, emplo_ref2_company, emplo_ref2_contact, emplo_ref2_name, emplo_ref2_pos, emplo_contact_them, weight, facebook, skype, up_photo, up_cv, if(isnull(data_created) || year(data_created)<=1970, null, DATE_FORMAT(data_created, '%d/%m/%Y %h:%i%:%s')) as DateCreated, if(isnull(data_created) || year(data_created)<=1970, null, DATE_FORMAT(data_created, '%Y%m')) as TimeStamp FROM $tbl_name WHERE length(EmployeeClientNo) > '1' AND TimeStamp = $timestamp AND area = 'Farming' "; EOT; echo $SQL_query;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/8UnkP
function name:  (null)
number of ops:  11
compiled vars:  !0 = $timestamp, !1 = $username, !2 = $password, !3 = $SQL_query, !4 = $tbl_name
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '201511'
    4     1        ASSIGN                                                   !1, 'ryan'
    5     2        ASSIGN                                                   !2, '12345'
    8     3        ROPE_INIT                                     5  ~9      'SELECT+%0A%09reg_id+as+ID%2C+%0A%09%0A%09what_mach_op%2C+%0A%09address%2C+%0A%09farm_breeding_mating%2C+%0A%09farm_calve%2C+%0A%09farm_drenching%2C+%0A%09farm_feed_req%2C+%0A%09farm_detect_treat_lame%2C+%0A%09farm_detect_treat_mast%2C+%0A%09if%28isnull%28date_begin%29+%7C%7C+year%28date_begin%29%3C%3D1970%2C+null%2C+Date_format%28date_begin%2C+%27%25d%2F%25m%2F%25Y%27%29%29+as+begin_date%2C+%0A%09if%28isnull%28date_finish%29+%7C%7C+year%28date_finish%29%3C%3D1970%2C+null%2C+Date_format%28date_finish%2C+%27%25d%2F%25m%2F%25Y%27%29%29+as+finish_date%2C+%0A%09country_birth%2C+%0A%09farm_calf_health%2C+%0A%09EmployeeClientNo%2C+%0A%09country_app%2C+%0A%09num_dep%2C+%0A%09if%28isnull%28date_birth%29+%7C%7C+year%28date_birth%29%3C%3D1970%2C+null%2C+Date_format%28date_birth%2C+%27%25d%2F%25m%2F%25Y%27%29%29+as+birth_date%2C+%0A%09drv_lic_n_proj_exp%2C+%0A%09email%2C+%0A%09lvl_eng%2C+%0A%09gather_exp%2C+%0A%09first_name%2C+%0A%09full_name%2C+%0A%09sex%2C+%0A%09health_prob%2C+%0A%09height%2C+%0A%09last_name%2C+%0A%09farm_mach_maint%2C+%0A%09farm_drive_motor%2C+%0A%09farm_drive_quad%2C+%0A%09farm_drv_tractor%2C+%0A%09farm_wagon%2C+%0A%09marital_status%2C+%0A%09farm_milking_herr%2C+%0A%09farm_milking_rot%2C+%0A%09farm_shed_setup%2C+%0A%09mobile_phone%2C+%0A%09nation%2C+%0A%09if%28isnull%28date_pass%29+%7C%7C+year%28date_pass%29%3C%3D1970%2C+null%2C+Date_format%28date_pass%2C+%27%25d%2F%25m%2F%25Y%27%29%29+as+expire_date%2C+%0A%09farm_fencing%2C+%0A%09farm_hay%2C+%0A%09farm_weed%2C+%0A%09list_qual%2C+%0A%09home_phone%2C+%0A%09job_position%2C+%0A%09pref_name%2C+%0A%09emplo_det%2C+%0A%09emplo_as%2C+%0A%09emplo_ref1_comp%2C+%0A%09emplo_ref1_contact%2C+%0A%09emplo_ref1_name%2C+%0A%09emplo_ref1_pos%2C+%0A%09emplo_ref2_company%2C+%0A%09emplo_ref2_contact%2C+%0A%09emplo_ref2_name%2C+%0A%09emplo_ref2_pos%2C+%0A%09emplo_contact_them%2C+%0A%09weight%2C+%0A%09facebook%2C+%0A%09skype%2C+%0A%09up_photo%2C+%0A%09up_cv%2C%0A%09if%28isnull%28data_created%29+%7C%7C+year%28data_created%29%3C%3D1970%2C+null%2C+DATE_FORMAT%28data_created%2C+%27%25d%2F%25m%2F%25Y+%25h%3A%25i%25%3A%25s%27%29%29+as+DateCreated%2C%0A%09if%28isnull%28data_created%29+%7C%7C+year%28data_created%29%3C%3D1970%2C+null%2C+DATE_FORMAT%28data_created%2C+%27%25Y%25m%27%29%29+as+TimeStamp%0AFROM+'
   74     4        ROPE_ADD                                      1  ~9      ~9, !4
          5        ROPE_ADD                                      2  ~9      ~9, '+%0AWHERE+length%28EmployeeClientNo%29+%3E+%271%27+AND+TimeStamp+%3D+'
   75     6        ROPE_ADD                                      3  ~9      ~9, !0
          7        ROPE_END                                      4  ~8      ~9, '+AND+area+%3D+%27Farming%27+%22%3B'
    7     8        ASSIGN                                                   !3, ~8
   78     9        ECHO                                                     !3
         10      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
161.93 ms | 1395 KiB | 13 Q