3v4l.org

run code in 300+ PHP versions simultaneously
<?php class AC { function actionClosest_AddPointsToResponse() { $points = array(); $res_pnt = 0; $timestamp = 0; $more_records = false; $matching = array( 'Payments' => 'payment2=extract(%item, %id, "DP_Payment", "dpp_id", "dpp_", array("dpp_id"), true, true, true)', /* 'dp_id_uniq' => 'id', 'dp_update' => 'update', 'dp_type' => 'point|type', 'dp_name' => 'point|name', 'dp_description' => 'point|description', 'dp_currency' => 'point|currency', 'dp_company_id' => 'point|company_id', 'dp_tariff_plan' => 'point|tariff_plan', 'PhoneNumbers' => 'point|phone_nums=get(%item, %id, "DP_Phone", "dp_id", "dp_", array("ph_id", "dp_id"), false, false, true, 0)', 'WorkingHours' => 'point|work_hours=get(%item, %id, "DP_WorkingHour", "dp_id", "dp_", array("dp_id"))', 'dp_slot_duration' => 'point|slot_duration', 'dp_slot_number' => 'point|slot_number', 'dp_latitude' => 'geo|latitude', 'dp_longitude' => 'geo|longitude', 'dp_country' => 'geo|country_id', 'dp_region' => 'geo|region', 'dp_city' => 'geo|city', 'dp_post_code' => 'geo|post_code', 'dp_street' => 'geo|street', 'dp_house_number' => 'geo|house_number', 'ServiceList' => 'service|main_service=get(%item, %id, "DP_ServicePrice", "dp_id", "sv_", array("dp_id", "sv_price", "price_schema=>price"))', 'dp_additional_service' => 'service|additional_service', 'Payments' => 'payment=extract(%item, %id, "DP_Payment", "dpp_id", "dpp_", array("dpp_id"), true, true, true)', 'PrepaidCards' => 'payment|prepaid_cards=get(%item, %id, "DP_PrepaidCard", "dp_id", "dp_", array("ppc_id", "dp_id"), false, true, false)', 'Parking' => 'parking=get(%item, %id, "DP_Parking", "parking_id", "parking_", array("parking_id"), true, true)', 'CarWash' => 'car_wash=get(%item, %id, "DP_CarWash", "cw_id", "cw_", array("cw_id", "cw_subcompact_cars", "cw_compact_cars", "cw_suv_minivans", "cw_trucks", "cw_cleaning_method"), true, true)', 'TyreFitting' => 'tyre_fitting=get(%item, %id, "DP_TyreFitting", "tf_id", "tf_", array("tf_id", "tf_install_wheel", "tf_mount_tyres", "tf_wheel_balancing", "tf_tyre_fitting_wheel", "tf_tyre_fitting_car", "tf_disc_repair", "tf_tyre_repair", "tf_inflation", "tf_run_flat_repair", "tf_tyres_recycling", "tf_tyres_storage"), true, true)', 'ParkingCapacity' => 'payment=get(%item, %id, "DP_ParkingCapacity", "parking_id", "pc_", array("parking_id"), true, true)', #'' => '', '' => '', '' => '', #'CarService' => '', */ ); $var = ''; $item = array(); $drevolpoint_id = 2; //$point->dp_id; $match = $matching[0]; if (!preg_match('/^(\w+)(?:\|(\w+))?(?:=(get|extract)\((.*?)\))?$/', $match, $var)) throw new Exception("Unknown DB field mappint: $match (for $param)"); if (!in_array($param, array_keys($point->attributes)) and (!isset($var[4]) or !$var[4])) throw new Exception("Unknown DB field requested: $param (matching for $match)"); $item_name = '$item[\''.$var[1].'\']'; if (isset($var[2]) and $var[2]) $item_name .= '[\''.$var[2].'\']'; print("<hr>Item name = '$item_name'<br>\n"); } } $aco = new AC; $aco->actionClosest_AddPointsToResponse();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/PbUOM
function name:  (null)
number of ops:  6
compiled vars:  !0 = $aco
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   51     0  E >   NEW                                              $1      'AC'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   52     3        INIT_METHOD_CALL                                         !0, 'actionClosest_AddPointsToResponse'
          4        DO_FCALL                                      0          
          5      > RETURN                                                   1

Class AC:
Function actionclosest_addpointstoresponse:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 17, Position 2 = 26
Branch analysis from position: 17
1 jumps found. (Code = 108) Position 1 = -2
Branch analysis from position: 26
2 jumps found. (Code = 46) Position 1 = 36, Position 2 = 43
Branch analysis from position: 36
2 jumps found. (Code = 47) Position 1 = 39, Position 2 = 42
Branch analysis from position: 39
2 jumps found. (Code = 43) Position 1 = 44, Position 2 = 53
Branch analysis from position: 44
1 jumps found. (Code = 108) Position 1 = -2
Branch analysis from position: 53
2 jumps found. (Code = 46) Position 1 = 59, Position 2 = 61
Branch analysis from position: 59
2 jumps found. (Code = 43) Position 1 = 62, Position 2 = 66
Branch analysis from position: 62
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 66
Branch analysis from position: 61
Branch analysis from position: 42
Branch analysis from position: 43
filename:       /in/PbUOM
function name:  actionClosest_AddPointsToResponse
number of ops:  71
compiled vars:  !0 = $points, !1 = $res_pnt, !2 = $timestamp, !3 = $more_records, !4 = $matching, !5 = $var, !6 = $item, !7 = $drevolpoint_id, !8 = $match, !9 = $param, !10 = $point, !11 = $item_name
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   ASSIGN                                                   !0, <array>
    5     1        ASSIGN                                                   !1, 0
    6     2        ASSIGN                                                   !2, 0
    7     3        ASSIGN                                                   !3, <false>
    9     4        ASSIGN                                                   !4, <array>
   31     5        ASSIGN                                                   !5, ''
   32     6        ASSIGN                                                   !6, <array>
   33     7        ASSIGN                                                   !7, 2
   35     8        FETCH_DIM_R                                      ~20     !4, 0
          9        ASSIGN                                                   !8, ~20
   37    10        INIT_FCALL                                               'preg_match'
         11        SEND_VAL                                                 '%2F%5E%28%5Cw%2B%29%28%3F%3A%5C%7C%28%5Cw%2B%29%29%3F%28%3F%3A%3D%28get%7Cextract%29%5C%28%28.%2A%3F%29%5C%29%29%3F%24%2F'
         12        SEND_VAR                                                 !8
         13        SEND_REF                                                 !5
         14        DO_ICALL                                         $22     
         15        BOOL_NOT                                         ~23     $22
         16      > JMPZ                                                     ~23, ->26
   38    17    >   NEW                                              $24     'Exception'
         18        ROPE_INIT                                     5  ~26     'Unknown+DB+field+mappint%3A+'
         19        ROPE_ADD                                      1  ~26     ~26, !8
         20        ROPE_ADD                                      2  ~26     ~26, '+%28for+'
         21        ROPE_ADD                                      3  ~26     ~26, !9
         22        ROPE_END                                      4  ~25     ~26, '%29'
         23        SEND_VAL_EX                                              ~25
         24        DO_FCALL                                      0          
         25      > THROW                                         0          $24
   40    26    >   INIT_FCALL                                               'in_array'
         27        SEND_VAR                                                 !9
         28        INIT_FCALL                                               'array_keys'
         29        FETCH_OBJ_R                                      ~30     !10, 'attributes'
         30        SEND_VAL                                                 ~30
         31        DO_ICALL                                         $31     
         32        SEND_VAR                                                 $31
         33        DO_ICALL                                         $32     
         34        BOOL_NOT                                         ~33     $32
         35      > JMPZ_EX                                          ~33     ~33, ->43
         36    >   ISSET_ISEMPTY_DIM_OBJ                         0  ~34     !5, 4
         37        BOOL_NOT                                         ~35     ~34
         38      > JMPNZ_EX                                         ~35     ~35, ->42
         39    >   FETCH_DIM_R                                      ~36     !5, 4
         40        BOOL_NOT                                         ~37     ~36
         41        BOOL                                             ~35     ~37
         42    >   BOOL                                             ~33     ~35
         43    > > JMPZ                                                     ~33, ->53
   41    44    >   NEW                                              $38     'Exception'
         45        ROPE_INIT                                     5  ~40     'Unknown+DB+field+requested%3A+'
         46        ROPE_ADD                                      1  ~40     ~40, !9
         47        ROPE_ADD                                      2  ~40     ~40, '+%28matching+for+'
         48        ROPE_ADD                                      3  ~40     ~40, !8
         49        ROPE_END                                      4  ~39     ~40, '%29'
         50        SEND_VAL_EX                                              ~39
         51        DO_FCALL                                      0          
         52      > THROW                                         0          $38
   44    53    >   FETCH_DIM_R                                      ~44     !5, 1
         54        CONCAT                                           ~45     '%24item%5B%27', ~44
         55        CONCAT                                           ~46     ~45, '%27%5D'
         56        ASSIGN                                                   !11, ~46
   45    57        ISSET_ISEMPTY_DIM_OBJ                         0  ~48     !5, 2
         58      > JMPZ_EX                                          ~48     ~48, ->61
         59    >   FETCH_DIM_R                                      ~49     !5, 2
         60        BOOL                                             ~48     ~49
         61    > > JMPZ                                                     ~48, ->66
   46    62    >   FETCH_DIM_R                                      ~50     !5, 2
         63        CONCAT                                           ~51     '%5B%27', ~50
         64        CONCAT                                           ~52     ~51, '%27%5D'
         65        ASSIGN_OP                                     8          !11, ~52
   47    66    >   ROPE_INIT                                     3  ~55     '%3Chr%3EItem+name+%3D+%27'
         67        ROPE_ADD                                      1  ~55     ~55, !11
         68        ROPE_END                                      2  ~54     ~55, '%27%3Cbr%3E%0A'
         69        ECHO                                                     ~54
   48    70      > RETURN                                                   null

End of function actionclosest_addpointstoresponse

End of class AC.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.27 ms | 1404 KiB | 19 Q