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;
Output for 8.0.0 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.4, 8.3.6
Warning: Undefined variable $tbl_name in /in/8UnkP on line 74 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 WHERE length(EmployeeClientNo) > '1' AND TimeStamp = 201511 AND area = 'Farming' ";
Output for 8.3.5
Warning: PHP Startup: Unable to load dynamic library 'sodium.so' (tried: /usr/lib/php/8.3.5/modules/sodium.so (libsodium.so.23: cannot open shared object file: No such file or directory), /usr/lib/php/8.3.5/modules/sodium.so.so (/usr/lib/php/8.3.5/modules/sodium.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0 Warning: Undefined variable $tbl_name in /in/8UnkP on line 74 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 WHERE length(EmployeeClientNo) > '1' AND TimeStamp = 201511 AND area = 'Farming' ";
Output for 7.0.0 - 7.0.20, 7.1.0 - 7.1.33, 7.2.0 - 7.2.33, 7.3.0 - 7.3.31, 7.4.0 - 7.4.33
Notice: Undefined variable: tbl_name in /in/8UnkP on line 74 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 WHERE length(EmployeeClientNo) > '1' AND TimeStamp = 201511 AND area = 'Farming' ";
Output for 7.3.32 - 7.3.33
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 WHERE length(EmployeeClientNo) > '1' AND TimeStamp = 201511 AND area = 'Farming' ";
Output for 5.5.24 - 5.5.35, 5.6.8 - 5.6.21
Notice: Undefined variable: tbl_name in /in/8UnkP on line 75 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 WHERE length(EmployeeClientNo) > '1' AND TimeStamp = 201511 AND area = 'Farming' ";

preferences:
165.7 ms | 405 KiB | 227 Q