<?php
$json = '{ "external_ref" : "MC\/E63", "oracle_product" : "Events", "event_minimum_notice" : "Yes", "read_guidance_pack" : "Yes", "event_management_plan" : "Yes", "risk_guidance" : "Yes", "risk_assessment" : "Yes", "public_liability_insurance" : "Yes", "license_required" : "Yes", "is_funfair" : "No", "area_of_ground" : null, "area_of_frontage" : null, "num_veh_type" : null, "num_size_tents" : null, "num_type_rides" : null, "num_size_foodstalls" : null, "food_types_sold" : null, "sewage_disposal" : null, "funfair_additional_info" : null, "event_road_closure" : "", "road_closure_requirements" : null, "road_involve_aroads" : "", "road_directional_signs" : "", "road_traffic_diversion" : "", "road_parking_restrictions" : "", "road_carpark_closure" : "", "road_event_parking" : "", "road_parking_details" : null, "road_parking_location" : null, "equipment_pyrotechnics" : "", "equipment_site_comms" : "", "equipment_live_entertainment" : "", "equipment_carnival_procession" : "", "equipment_aircraft_balloon_launch" : "", "equipment_living_history" : "", "equipment_reenactment_groups" : "", "equipment_motorcycles" : "", "equipment_market_stalls" : "", "equipment_bonfire_bbq_permit" : "", "equipment_animals" : "", "equipment_boat_hire" : "", "equipment_inflatables" : "", "equipment_marquees" : "", "equipment_barrier_fencing" : "", "equipment_power_supply" : "", "equipment_toilets" : "", "equipment_lost_children" : "", "equipment_alcohol" : "", "equipment_side_stalls" : "", "equipment_stewarding" : "", "event_type" : "", "event_name" : null, "event_description" : null, "event_location" : null, "event_ward" : "", "event_size" : "", "event_attendee_expectancy" : null, "event_start_date" : null, "event_end_date" : null, "event_days_times" : null, "event_date_siteprep" : null, "event_site_vacated" : null, "event_alternatives" : null, "event_free" : "", "event_admission_price" : null, "event_programmes_sold" : "", "event_proposed_price" : null, "event_charity_name" : null, "event_charity_regno" : null, "event_charity_donation" : "", "event_charity_info" : null, "event_public_enquiries" : null, "facilities_waste_collection" : "", "facilities_litter_disposal" : null, "facilities_toilets_required" : "", "facilities_toilets_details" : null, "facilities_stewards" : "", "facilities_traffic_stewards" : null, "facilities_banners_posters" : null, "facilities_banner_placement" : null, "facilities_market_stalls" : null, "hs_fire_equipment" : null, "hs_lighting_required" : null, "hs_electrical_certified" : null, "hs_firstaid_facilities" : null, "hs_emergency_vehicle_maintenance" : null, "hs_pa_system" : null, "hs_noise_pollution" : null, "hs_electricity_event" : null, "business_venue_confirmed" : null, "business_public_liability" : null, "business_insurer_name_address" : null, "business_policy_number" : null, "business_additional_information" : null, "person_first_name" : "John", "person_last_name" : "Doe", "contact_organiser_address" : null, "person_phone_home" : null, "person_phone_mobile" : null, "person_email" : "example@example.com", "contact_organisation_name" : null, "contact_organisation_address" : null, "UPRN" : null,"documents":[]}';
$incomingDataObj = json_decode($json);
$oracle_array=array(
"event_minimum_notice"=>"yes_no_3",
"read_guidance_pack"=>"yes_no_10",
"event_management_plan"=>"dog_chipped",
"risk_guidance"=>"dog_fouling_sign_required",
"risk_assessment"=>"blue_badge_fast_track",
"public_liability_insurance"=>"sc_notified",
"license_required"=>"blue_badge_address_provided",
"is_funfair"=>"payment_successful",
"area_of_ground"=>"back_office_no",
"area_of_frontage"=>"new_emailaddress",
"num_veh_type"=>"ownercompany_name",
"num_size_tents"=>"property_name",
"num_type_rides"=>"cc_address_cah",
"num_size_foodstalls"=>"idea_of_who_is_responsible",
"food_types_sold"=>"overdue_reason",
"sewage_disposal"=>"text_field_100_1",
"funfair_additional_info"=>"customer_address",
"event_road_closure"=>"yes_no_2",
"road_closure_requirements"=>"complaint_outcome_detailed",
"road_involve_aroads"=>"blue_badge_id_provided",
"road_directional_signs"=>"graffiti_surface_door",
"road_traffic_diversion"=>"graffiti_type_racist",
"road_parking_restrictions"=>"graffiti_type_offensive",
"road_carpark_closure"=>"graffiti_type_other",
"road_event_parking"=>"form_completed",
"road_parking_details"=>"street_consultation",
"road_parking_location"=>"blue_badge_reference",
"equipment_pyrotechnics"=>"blue_badge_additonal_info",
"equipment_site_comms"=>"prepared_to_be_a_witness",
"equipment_live_entertainment"=>"sewage_involved",
"equipment_carnival_procession"=>"reported_to_other_agency",
"equipment_aircraft_balloon_launch"=>"graffiti_area_other_location",
"equipment_living_history"=>"incidents_transferred",
"equipment_reenactment_groups"=>"incident_found",
"equipment_motorcycles"=>"do_you_need_a_bin_calendar",
"equipment_market_stalls"=>"graffiti_window_glass",
"equipment_bonfire_bbq_permit"=>"graffiti_window_frame",
"equipment_animals"=>"numbered_street",
"equipment_boat_hire"=>"yes_no_13",
"equipment_inflatables"=>"bo_email_sent",
"equipment_marquees"=>"graffiti_other_type_of_wall",
"equipment_barrier_fencing"=>"graffiti_area_railway_bridge",
"equipment_power_supply"=>"graffiti_area_utility_box",
"equipment_toilets"=>"graffiti_window_frame_glass",
"equipment_lost_children"=>"graffiti_area_bus_shelter",
"equipment_alcohol"=>"notification_sent",
"equipment_side_stalls"=>"cpm_run",
"equipment_stewarding"=>"share_within_ward",
"event_type"=>"event_type",
"event_name"=>"cc_address_adr",
"event_description"=>"text_area_2",
"event_location"=>"cc_address_cf",
"event_ward"=>"ward_area",
"event_size"=>"event_size",
"event_attendee_expectancy"=>"street_light_number",
"event_start_date"=>"date_of_purchase",
"event_end_date"=>"date_of_sale",
"event_days_times"=>"names_of_all_persons_moving",
"event_date_siteprep"=>"date_time_1",
"event_site_vacated"=>"date_time_2",
"event_alternatives"=>"text_field_255_1",
"event_free"=>"fit_for_purpose",
"event_admission_price"=>"type_of_container",
"event_programmes_sold"=>"fee_paid",
"event_proposed_price"=>"nsg_no_do_not_enter",
"event_charity_name"=>"existing_landlord_name_address",
"event_charity_regno"=>"destination_address_ln1",
"event_charity_donation"=>"fridge_freezers_to_collect",
"event_charity_info"=>"typedescription_of_dog",
"event_public_enquiries"=>"refund_receipt_number",
"facilities_waste_collection"=>"yes_no_4",
"facilities_litter_disposal"=>"complaint_outcome_improvements",
"facilities_toilets_required"=>"bin_message_left",
"facilities_toilets_details"=>"cc_address_ld",
"facilities_stewards"=>"yes_no_5",
"facilities_traffic_stewards"=>"description",
"facilities_banner_placement"=>"send_to_cah",
"facilities_market_stalls"=>"moreinformation",
"hs_fire_equipment"=>"primary_address_set",
"hs_lighting_required"=>"yes_no_11",
"hs_electrical_certified"=>"dead_animal_safety_hazard",
"hs_firstaid_facilities"=>"graffiti_surface_brick_wall",
"hs_emergency_vehicle_maintenance"=>"additional_information",
"hs_pa_system"=>"building_work_started",
"hs_noise_pollution"=>"diagnosis_letter_provided",
"hs_electricity_event"=>"graffiti_location_property",
"business_venue_confirmed"=>"personal_info_transferred",
"business_public_liability"=>"ledger_purchase_order_no",
"business_insurer_name_address"=>"proposed_property_address",
"business_policy_number"=>"payment_amount_pc",
"business_additional_information"=>"testing_outcome",
"contact_organisation_name"=>"OwnercompanyName",
"contact_organisation_address"=>"text_area_1"
);
class Demo {
public $CustomFields;
}
class Demo2 {
public $c;
}
class Demo3 {
public $yes_no_3;
public $yes_no_10;
public $dog_chipped;
public $dog_fouling_sign_required;
}
$fields = new Demo3();
$wrapper = new Demo2();
$wrapper->c = $fields;
$incident = new Demo();
$incident->CustomFields = $wrapper;
foreach ($incomingDataObj as $key => $value )
{
if (isset($oracle_array[$key]) && !is_array($value))
{
if (property_exists($incident->CustomFields->c, $oracle_array[$key])) {
$incident->CustomFields->c->{$oracle_array[$key]} = $value;
}
}
}
var_dump($incident);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 20, Position 2 = 42
Branch analysis from position: 20
2 jumps found. (Code = 78) Position 1 = 21, Position 2 = 42
Branch analysis from position: 21
2 jumps found. (Code = 46) Position 1 = 24, Position 2 = 27
Branch analysis from position: 24
2 jumps found. (Code = 43) Position 1 = 28, Position 2 = 41
Branch analysis from position: 28
2 jumps found. (Code = 43) Position 1 = 36, Position 2 = 41
Branch analysis from position: 36
1 jumps found. (Code = 42) Position 1 = 20
Branch analysis from position: 20
Branch analysis from position: 41
Branch analysis from position: 41
Branch analysis from position: 27
Branch analysis from position: 42
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 42
filename: /in/L9lap
function name: (null)
number of ops: 47
compiled vars: !0 = $json, !1 = $incomingDataObj, !2 = $oracle_array, !3 = $fields, !4 = $wrapper, !5 = $incident, !6 = $value, !7 = $key
line #* E I O op fetch ext return operands
-------------------------------------------------------------------------------------
2 0 E > ASSIGN !0, '%7B+%22external_ref%22+%3A+%22MC%5C%2FE63%22%2C+%22oracle_product%22+%3A+%22Events%22%2C+%22event_minimum_notice%22+%3A+%22Yes%22%2C+%22read_guidance_pack%22+%3A+%22Yes%22%2C+%22event_management_plan%22+%3A+%22Yes%22%2C+%22risk_guidance%22+%3A+%22Yes%22%2C+%22risk_assessment%22+%3A+%22Yes%22%2C+%22public_liability_insurance%22+%3A+%22Yes%22%2C+%22license_required%22+%3A+%22Yes%22%2C+%22is_funfair%22+%3A+%22No%22%2C+%22area_of_ground%22+%3A+null%2C+%22area_of_frontage%22+%3A+null%2C+%22num_veh_type%22+%3A+null%2C+%22num_size_tents%22+%3A+null%2C+%22num_type_rides%22+%3A+null%2C+%22num_size_foodstalls%22+%3A+null%2C+%22food_types_sold%22+%3A+null%2C+%22sewage_disposal%22+%3A+null%2C+%22funfair_additional_info%22+%3A+null%2C+%22event_road_closure%22+%3A+%22%22%2C+%22road_closure_requirements%22+%3A+null%2C+%22road_involve_aroads%22+%3A+%22%22%2C+%22road_directional_signs%22+%3A+%22%22%2C+%22road_traffic_diversion%22+%3A+%22%22%2C+%22road_parking_restrictions%22+%3A+%22%22%2C+%22road_carpark_closure%22+%3A+%22%22%2C+%22road_event_parking%22+%3A+%22%22%2C+%22road_parking_details%22+%3A+null%2C+%22road_parking_location%22+%3A+null%2C+%22equipment_pyrotechnics%22+%3A+%22%22%2C+%22equipment_site_comms%22+%3A+%22%22%2C+%22equipment_live_entertainment%22+%3A+%22%22%2C+%22equipment_carnival_procession%22+%3A+%22%22%2C+%22equipment_aircraft_balloon_launch%22+%3A+%22%22%2C+%22equipment_living_history%22+%3A+%22%22%2C+%22equipment_reenactment_groups%22+%3A+%22%22%2C+%22equipment_motorcycles%22+%3A+%22%22%2C+%22equipment_market_stalls%22+%3A+%22%22%2C+%22equipment_bonfire_bbq_permit%22+%3A+%22%22%2C+%22equipment_animals%22+%3A+%22%22%2C+%22equipment_boat_hire%22+%3A+%22%22%2C+%22equipment_inflatables%22+%3A+%22%22%2C+%22equipment_marquees%22+%3A+%22%22%2C+%22equipment_barrier_fencing%22+%3A+%22%22%2C+%22equipment_power_supply%22+%3A+%22%22%2C+%22equipment_toilets%22+%3A+%22%22%2C+%22equipment_lost_children%22+%3A+%22%22%2C+%22equipment_alcohol%22+%3A+%22%22%2C+%22equipment_side_stalls%22+%3A+%22%22%2C+%22equipment_stewarding%22+%3A+%22%22%2C+%22event_type%22+%3A+%22%22%2C+%22event_name%22+%3A+null%2C+%22event_description%22+%3A+null%2C+%22event_location%22+%3A+null%2C+%22event_ward%22+%3A+%22%22%2C+%22event_size%22+%3A+%22%22%2C+%22event_attendee_expectancy%22+%3A+null%2C+%22event_start_date%22+%3A+null%2C+%22event_end_date%22+%3A+null%2C+%22event_days_times%22+%3A+null%2C+%22event_date_siteprep%22+%3A+null%2C+%22event_site_vacated%22+%3A+null%2C+%22event_alternatives%22+%3A+null%2C+%22event_free%22+%3A+%22%22%2C+%22event_admission_price%22+%3A+null%2C+%22event_programmes_sold%22+%3A+%22%22%2C+%22event_proposed_price%22+%3A+null%2C+%22event_charity_name%22+%3A+null%2C+%22event_charity_regno%22+%3A+null%2C+%22event_charity_donation%22+%3A+%22%22%2C+%22event_charity_info%22+%3A+null%2C+%22event_public_enquiries%22+%3A+null%2C+%22facilities_waste_collection%22+%3A+%22%22%2C+%22facilities_litter_disposal%22+%3A+null%2C+%22facilities_toilets_required%22+%3A+%22%22%2C+%22facilities_toilets_details%22+%3A+null%2C+%22facilities_stewards%22+%3A+%22%22%2C+%22facilities_traffic_stewards%22+%3A+null%2C+%22facilities_banners_posters%22+%3A+null%2C+%22facilities_banner_placement%22+%3A+null%2C+%22facilities_market_stalls%22+%3A+null%2C+%22hs_fire_equipment%22+%3A+null%2C+%22hs_lighting_required%22+%3A+null%2C+%22hs_electrical_certified%22+%3A+null%2C+%22hs_firstaid_facilities%22+%3A+null%2C+%22hs_emergency_vehicle_maintenance%22+%3A+null%2C+%22hs_pa_system%22+%3A+null%2C+%22hs_noise_pollution%22+%3A+null%2C+%22hs_electricity_event%22+%3A+null%2C+%22business_venue_confirmed%22+%3A+null%2C+%22business_public_liability%22+%3A+null%2C+%22business_insurer_name_address%22+%3A+null%2C+%22business_policy_number%22+%3A+null%2C+%22business_additional_information%22+%3A+null%2C+%22person_first_name%22+%3A+%22John%22%2C+%22person_last_name%22+%3A+%22Doe%22%2C+%22contact_organiser_address%22+%3A+null%2C+%22person_phone_home%22+%3A+null%2C+%22person_phone_mobile%22+%3A+null%2C+%22person_email%22+%3A+%22example%40example.com%22%2C+%22contact_organisation_name%22+%3A+null%2C+%22contact_organisation_address%22+%3A+null%2C+%22UPRN%22+%3A+null%2C%22documents%22%3A%5B%5D%7D'
4 1 INIT_FCALL 'json_decode'
2 SEND_VAR !0
3 DO_ICALL $9
4 ASSIGN !1, $9
6 5 ASSIGN !2, <array>
117 6 NEW $12 'Demo3'
7 DO_FCALL 0
8 ASSIGN !3, $12
118 9 NEW $15 'Demo2'
10 DO_FCALL 0
11 ASSIGN !4, $15
119 12 ASSIGN_OBJ !4, 'c'
13 OP_DATA !3
120 14 NEW $19 'Demo'
15 DO_FCALL 0
16 ASSIGN !5, $19
121 17 ASSIGN_OBJ !5, 'CustomFields'
18 OP_DATA !4
123 19 > FE_RESET_R $23 !1, ->42
20 > > FE_FETCH_R ~24 $23, !6, ->42
21 > ASSIGN !7, ~24
125 22 ISSET_ISEMPTY_DIM_OBJ 0 ~26 !2, !7
23 > JMPZ_EX ~26 ~26, ->27
24 > TYPE_CHECK 128 ~27 !6
25 BOOL_NOT ~28 ~27
26 BOOL ~26 ~28
27 > > JMPZ ~26, ->41
127 28 > INIT_FCALL 'property_exists'
29 FETCH_OBJ_R ~29 !5, 'CustomFields'
30 FETCH_OBJ_R ~30 ~29, 'c'
31 SEND_VAL ~30
32 FETCH_DIM_R ~31 !2, !7
33 SEND_VAL ~31
34 DO_ICALL $32
35 > JMPZ $32, ->41
128 36 > FETCH_DIM_R ~35 !2, !7
37 FETCH_OBJ_W $33 !5, 'CustomFields'
38 FETCH_OBJ_W $34 $33, 'c'
39 ASSIGN_OBJ $34, ~35
40 OP_DATA !6
123 41 > > JMP ->20
42 > FE_FREE $23
133 43 INIT_FCALL 'var_dump'
44 SEND_VAR !5
45 DO_ICALL
46 > RETURN 1
Class Demo: [no user functions]
Class Demo2: [no user functions]
Class Demo3: [no user functions]
Generated using Vulcan Logic Dumper, using php 8.0.0
preferences:
143.12 ms | 1011 KiB | 16 Q