@ 2024-04-03T12:14:54Z <?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);
Enable javascript to submit You have javascript disabled. You will not be able to edit any code.
Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).
Version System time (s) User time (s) Memory (MiB) 8.4.13 0.012 0.009 17.94 8.4.12 0.012 0.009 20.60 8.4.11 0.008 0.008 22.45 8.4.10 0.010 0.010 17.57 8.4.9 0.004 0.005 18.72 8.4.8 0.010 0.011 20.61 8.4.7 0.015 0.005 18.00 8.4.6 0.006 0.003 19.05 8.4.5 0.015 0.006 22.34 8.4.4 0.012 0.008 18.63 8.4.3 0.009 0.009 19.00 8.4.2 0.009 0.012 19.55 8.4.1 0.006 0.003 19.61 8.3.26 0.013 0.006 16.83 8.3.25 0.010 0.009 19.17 8.3.24 0.008 0.008 16.71 8.3.23 0.010 0.009 16.58 8.3.22 0.011 0.008 17.16 8.3.21 0.011 0.007 16.52 8.3.20 0.011 0.009 16.42 8.3.19 0.011 0.008 17.12 8.3.18 0.011 0.004 17.47 8.3.17 0.011 0.007 18.94 8.3.16 0.006 0.012 17.31 8.3.15 0.016 0.003 17.15 8.3.14 0.008 0.000 16.80 8.3.13 0.000 0.009 16.80 8.3.12 0.003 0.006 20.60 8.3.11 0.000 0.009 20.94 8.3.10 0.004 0.004 24.06 8.3.9 0.005 0.003 26.77 8.3.8 0.004 0.007 17.97 8.3.7 0.000 0.014 16.63 8.3.6 0.006 0.009 16.73 8.3.5 0.012 0.006 16.78 8.3.4 0.011 0.011 20.66 8.3.3 0.009 0.014 20.05 8.3.2 0.011 0.011 22.79 8.3.1 0.012 0.009 22.72 8.3.0 0.015 0.007 19.84 8.2.29 0.011 0.008 20.64 8.2.28 0.005 0.014 18.41 8.2.27 0.009 0.009 17.18 8.2.26 0.004 0.004 16.68 8.2.25 0.008 0.000 18.65 8.2.24 0.000 0.008 18.95 8.2.23 0.005 0.005 22.58 8.2.22 0.012 0.006 37.54 8.2.21 0.011 0.004 26.77 8.2.20 0.007 0.003 18.54 8.2.19 0.010 0.010 16.77 8.2.18 0.004 0.019 16.63 8.2.17 0.013 0.009 19.92 8.2.16 0.013 0.007 21.06 8.2.15 0.011 0.009 20.05 8.2.14 0.007 0.011 21.21 8.2.13 0.015 0.006 21.25 8.2.12 0.013 0.009 20.28 8.2.11 0.009 0.014 20.23 8.2.10 0.007 0.011 20.29 8.2.9 0.008 0.011 19.74 8.2.8 0.008 0.010 20.26 8.2.7 0.010 0.011 19.76 8.2.6 0.015 0.007 19.90 8.2.5 0.012 0.007 20.19 8.2.4 0.008 0.010 19.75 8.2.3 0.015 0.003 19.67 8.2.2 0.010 0.009 19.54 8.2.1 0.005 0.013 19.61 8.2.0 0.011 0.007 18.76 8.1.33 0.009 0.009 20.27 8.1.32 0.013 0.008 16.14 8.1.31 0.000 0.008 16.88 8.1.30 0.010 0.010 17.78 8.1.29 0.005 0.005 30.84 8.1.28 0.012 0.003 25.92 8.1.27 0.012 0.006 22.20 8.1.26 0.012 0.005 21.96 8.1.25 0.008 0.008 22.03 8.1.24 0.009 0.008 18.58 8.1.23 0.012 0.006 18.55 8.1.22 0.011 0.007 18.89 8.1.21 0.010 0.009 18.56 8.1.20 0.009 0.009 18.84 8.1.19 0.011 0.005 18.74 8.1.18 0.008 0.009 18.48 8.1.17 0.011 0.005 18.70 8.1.16 0.013 0.005 18.52 8.1.15 0.008 0.009 18.70 8.1.14 0.014 0.003 19.63 8.1.13 0.009 0.007 19.66 8.1.12 0.012 0.006 19.40 8.1.11 0.008 0.009 20.34 8.1.10 0.007 0.012 20.62 8.1.9 0.011 0.006 18.53 8.1.8 0.007 0.009 19.75 8.1.7 0.013 0.003 18.80 8.1.6 0.010 0.007 18.67 8.1.5 0.016 0.003 18.55 8.1.4 0.012 0.004 18.55 8.1.3 0.010 0.006 18.85 8.1.2 0.010 0.010 19.88 8.1.1 0.008 0.011 18.72 8.1.0 0.013 0.007 18.64
preferences:dark mode live preview ace vim emacs key bindings
32.53 ms | 403 KiB | 5 Q