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

End of function actionclosest_addpointstoresponse

End of class AC.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.02 ms | 1404 KiB | 19 Q