3v4l.org

run code in 300+ PHP versions simultaneously
<?php class IBHandlers { function OnBeforeIBlockElementUpdateHandler(&$arFields) { if($arFields['IBLOCK_ID'] == 278){// если это справочник сотрудников // получаем значение свойства tm до изменения $db_props = CIBlockElement::GetProperty(278, $arFields['ID'], array("sort" => "asc"), Array("CODE"=>"tm")); if($ar_props = $db_props->Fetch()){ $FORUM_TOPIC_ID = $ar_props["VALUE"]; } else{ $FORUM_TOPIC_ID = false; } AddMessage2Log($FORUM_TOPIC_ID, "FORUM_TOPIC_ID"); // значение до } } //$newref = "OnBeforeIBlockElementUpdateHandler"; //AddMessage2Log($newref(), "newref"); function OnAfterIBlockElementUpdateHandler(&$arFields) { if($arFields['IBLOCK_ID'] == 278){// если это справочник сотрудников $db_props_after = CIBlockElement::GetProperty(278, $arFields['ID'], array("sort" => "asc"), Array("CODE"=>"tm")); if($ar_props_after = $db_props_after->Fetch()){ $FORUM_TOPIC_ID_AFTER = $ar_props_after["VALUE"]; //return $FORUM_TOPIC_ID_AFTER; } else{ $FORUM_TOPIC_ID_AFTER = false; } //$a = OnBeforeIBlockElementUpdateHandler(); AddMessage2Log($FORUM_TOPIC_ID_AFTER, "FORUM_TOPIC_ID_AFTER"); // значение после /*if($FORUM_TOPIC_ID != $FORUM_TOPIC_ID_AFTER){ AddMessage2Log('Изменилось значение тм.', "Изменилось значение тм."); } else { AddMessage2Log('ТМ не поменялось', "ТМ не поменялось"); }*/ } } }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/TQ87s
function name:  (null)
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   40     0  E > > RETURN                                                   1

Class IBHandlers:
Function onbeforeiblockelementupdatehandler:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 25
Branch analysis from position: 4
2 jumps found. (Code = 43) Position 1 = 17, Position 2 = 20
Branch analysis from position: 17
1 jumps found. (Code = 42) Position 1 = 21
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 20
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 25
filename:       /in/TQ87s
function name:  OnBeforeIBlockElementUpdateHandler
number of ops:  26
compiled vars:  !0 = $arFields, !1 = $db_props, !2 = $ar_props, !3 = $FORUM_TOPIC_ID
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1        FETCH_DIM_R                                      ~4      !0, 'IBLOCK_ID'
          2        IS_EQUAL                                                 ~4, 278
          3      > JMPZ                                                     ~5, ->25
    6     4    >   INIT_STATIC_METHOD_CALL                                  'CIBlockElement', 'GetProperty'
          5        SEND_VAL_EX                                              278
          6        CHECK_FUNC_ARG                                           
          7        FETCH_DIM_FUNC_ARG                               $6      !0, 'ID'
          8        SEND_FUNC_ARG                                            $6
          9        SEND_VAL_EX                                              <array>
         10        SEND_VAL_EX                                              <array>
         11        DO_FCALL                                      0  $7      
         12        ASSIGN                                                   !1, $7
    7    13        INIT_METHOD_CALL                                         !1, 'Fetch'
         14        DO_FCALL                                      0  $9      
         15        ASSIGN                                           ~10     !2, $9
         16      > JMPZ                                                     ~10, ->20
    8    17    >   FETCH_DIM_R                                      ~11     !2, 'VALUE'
         18        ASSIGN                                                   !3, ~11
         19      > JMP                                                      ->21
   11    20    >   ASSIGN                                                   !3, <false>
   13    21    >   INIT_FCALL_BY_NAME                                       'AddMessage2Log'
         22        SEND_VAR_EX                                              !3
         23        SEND_VAL_EX                                              'FORUM_TOPIC_ID'
         24        DO_FCALL                                      0          
   15    25    > > RETURN                                                   null

End of function onbeforeiblockelementupdatehandler

Function onafteriblockelementupdatehandler:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 25
Branch analysis from position: 4
2 jumps found. (Code = 43) Position 1 = 17, Position 2 = 20
Branch analysis from position: 17
1 jumps found. (Code = 42) Position 1 = 21
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 20
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 25
filename:       /in/TQ87s
function name:  OnAfterIBlockElementUpdateHandler
number of ops:  26
compiled vars:  !0 = $arFields, !1 = $db_props_after, !2 = $ar_props_after, !3 = $FORUM_TOPIC_ID_AFTER
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   19     0  E >   RECV                                             !0      
   20     1        FETCH_DIM_R                                      ~4      !0, 'IBLOCK_ID'
          2        IS_EQUAL                                                 ~4, 278
          3      > JMPZ                                                     ~5, ->25
   21     4    >   INIT_STATIC_METHOD_CALL                                  'CIBlockElement', 'GetProperty'
          5        SEND_VAL_EX                                              278
          6        CHECK_FUNC_ARG                                           
          7        FETCH_DIM_FUNC_ARG                               $6      !0, 'ID'
          8        SEND_FUNC_ARG                                            $6
          9        SEND_VAL_EX                                              <array>
         10        SEND_VAL_EX                                              <array>
         11        DO_FCALL                                      0  $7      
         12        ASSIGN                                                   !1, $7
   22    13        INIT_METHOD_CALL                                         !1, 'Fetch'
         14        DO_FCALL                                      0  $9      
         15        ASSIGN                                           ~10     !2, $9
         16      > JMPZ                                                     ~10, ->20
   23    17    >   FETCH_DIM_R                                      ~11     !2, 'VALUE'
         18        ASSIGN                                                   !3, ~11
         19      > JMP                                                      ->21
   27    20    >   ASSIGN                                                   !3, <false>
   31    21    >   INIT_FCALL_BY_NAME                                       'AddMessage2Log'
         22        SEND_VAR_EX                                              !3
         23        SEND_VAL_EX                                              'FORUM_TOPIC_ID_AFTER'
         24        DO_FCALL                                      0          
   39    25    > > RETURN                                                   null

End of function onafteriblockelementupdatehandler

End of class IBHandlers.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
222.43 ms | 1399 KiB | 13 Q