3v4l.org

run code in 500+ PHP versions simultaneously
<?php $t = '<!--?xml version="1.0" encoding="UTF-8"?--> <xsi:event xsi1:type="xsi:SubscriptionEvent" xmlns:xsi="http://schema.broadsoft.com/xsi" xmlns:xsi1="http://www.w3.org/2001/XMLSchema-instance"><xsi:eventid>4c350c8d-c83c-4965-a9f9-77df5984fbfc</xsi:eventid><xsi:sequencenumber>1</xsi:sequencenumber><xsi:userid>MPBX_298887675_EventSubscription@mpbx.sip.beeline.ru</xsi:userid><xsi:externalapplicationid>298887675_e39abe37f782bb263c5d7972a25f64b6</xsi:externalapplicationid><xsi:subscriptionid>e1891465-332c-4241-b7c8-ee92ffd05839</xsi:subscriptionid><xsi:httpcontact><xsi:uri>http://topnlab.ru/call/incall/5?vendorId=5&amp;token=3a48139a-156e-4345-ab05-78fee42ceef7&amp;agency_id=106058</xsi:uri></xsi:httpcontact><xsi:targetid>9223540039@mpbx.sip.beeline.ru</xsi:targetid><xsi:eventdata xsi1:type="xsi:CallReleasedEvent"><xsi:call><xsi:callid>callhalf-6539432807:0</xsi:callid><xsi:exttrackingid>94616370:2</xsi:exttrackingid><xsi:networkcallid>BW111726195231117-548427609@10.64.248.6</xsi:networkcallid><xsi:personality>Originator</xsi:personality><xsi:state>Released</xsi:state><xsi:releasingparty>localRelease</xsi:releasingparty><xsi:remoteparty><xsi:address countrycode="7">tel:+79197159426</xsi:address><xsi:calltype>Network</xsi:calltype></xsi:remoteparty><xsi:starttime>1511425046189</xsi:starttime><xsi:answertime>1511425057459</xsi:answertime><xsi:releasetime>1511425336465</xsi:releasetime><xsi:recorded><xsi:allowedrecordingcontrols>none</xsi:allowedrecordingcontrols></xsi:recorded></xsi:call></xsi:eventdata></xsi:event>'; $XMLReader = new XMLReader(); $XMLReader->xml($t); while($XMLReader->read()) { if ($XMLReader->nodeType == XMLReader::ELEMENT) { var_dump($XMLReader->name); } } die; if (!$filename) return array(); $this->reader = new XMLReader(); $this->reader->open($filename); // begin read XML while ($this->reader->read()) { if ($this->reader->name == 'store_categories') { // while not found end tag read blocks while (!($this->reader->name == 'store_categories' && $this->reader->nodeType == XMLReader::END_ELEMENT)) { $store_category = $this->parseBlock('store_category'); /* Do some code */ $this->reader->read(); } $this->reader->read(); } } die; var_dump(2 | 4 | 8);die; var_dump(decbin(1 << 0), 1 << 1, 1 << 2,1 << 3,1 << 4,1 << 5,1 << 6,1 << 7,1 << 8); die; function isFlagSet($mask, $flag) { return (($mask & $flag) == $flag); } function setFlag($mask, $flag, $value) { if($value) { $mask |= $flag; } else { $mask &= ~$flag; } return $mask; } var_dump(setFlag(4, 2, false)); die; var_dump( 16 << 0, 16 >> 0, sprintf('%064b', 1 | 4), sprintf('%064b', 1), sprintf('%064b', 2), sprintf('%064b', 4), sprintf('%064b', 6), sprintf('%064b', 8) ); die; var_dump($m = '100' | '001'); var_dump( decbin(2), decbin(4), decbin($m), 1 << 3 ); die;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 15
Branch analysis from position: 15
2 jumps found. (Code = 44) Position 1 = 18, Position 2 = 8
Branch analysis from position: 18
1 jumps found. (Code = 61) Position 1 = -2
Branch analysis from position: 8
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 15
Branch analysis from position: 11
2 jumps found. (Code = 44) Position 1 = 18, Position 2 = 8
Branch analysis from position: 18
Branch analysis from position: 8
Branch analysis from position: 15
filename:       /in/uHKbK
function name:  (null)
number of ops:  161
compiled vars:  !0 = $t, !1 = $XMLReader, !2 = $filename, !3 = $store_category, !4 = $m
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                       !0, '%3C%21--%3Fxml+version%3D%221.0%22+encoding%3D%22UTF-8%22%3F--%3E%0A%3Cxsi%3Aevent+xsi1%3Atype%3D%22xsi%3ASubscriptionEvent%22+xmlns%3Axsi%3D%22http%3A%2F%2Fschema.broadsoft.com%2Fxsi%22+xmlns%3Axsi1%3D%22http%3A%2F%2Fwww.w3.org%2F2001%2FXMLSchema-instance%22%3E%3Cxsi%3Aeventid%3E4c350c8d-c83c-4965-a9f9-77df5984fbfc%3C%2Fxsi%3Aeventid%3E%3Cxsi%3Asequencenumber%3E1%3C%2Fxsi%3Asequencenumber%3E%3Cxsi%3Auserid%3EMPBX_298887675_EventSubscription%40mpbx.sip.beeline.ru%3C%2Fxsi%3Auserid%3E%3Cxsi%3Aexternalapplicationid%3E298887675_e39abe37f782bb263c5d7972a25f64b6%3C%2Fxsi%3Aexternalapplicationid%3E%3Cxsi%3Asubscriptionid%3Ee1891465-332c-4241-b7c8-ee92ffd05839%3C%2Fxsi%3Asubscriptionid%3E%3Cxsi%3Ahttpcontact%3E%3Cxsi%3Auri%3Ehttp%3A%2F%2Ftopnlab.ru%2Fcall%2Fincall%2F5%3FvendorId%3D5%26amp%3Btoken%3D3a48139a-156e-4345-ab05-78fee42ceef7%26amp%3Bagency_id%3D106058%3C%2Fxsi%3Auri%3E%3C%2Fxsi%3Ahttpcontact%3E%3Cxsi%3Atargetid%3E9223540039%40mpbx.sip.beeline.ru%3C%2Fxsi%3Atargetid%3E%3Cxsi%3Aeventdata+xsi1%3Atype%3D%22xsi%3ACallReleasedEvent%22%3E%3Cxsi%3Acall%3E%3Cxsi%3Acallid%3Ecallhalf-6539432807%3A0%3C%2Fxsi%3Acallid%3E%3Cxsi%3Aexttrackingid%3E94616370%3A2%3C%2Fxsi%3Aexttrackingid%3E%3Cxsi%3Anetworkcallid%3EBW111726195231117-548427609%4010.64.248.6%3C%2Fxsi%3Anetworkcallid%3E%3Cxsi%3Apersonality%3EOriginator%3C%2Fxsi%3Apersonality%3E%3Cxsi%3Astate%3EReleased%3C%2Fxsi%3Astate%3E%3Cxsi%3Areleasingparty%3ElocalRelease%3C%2Fxsi%3Areleasingparty%3E%3Cxsi%3Aremoteparty%3E%3Cxsi%3Aaddress+countrycode%3D%227%22%3Etel%3A%2B79197159426%3C%2Fxsi%3Aaddress%3E%3Cxsi%3Acalltype%3ENetwork%3C%2Fxsi%3Acalltype%3E%3C%2Fxsi%3Aremoteparty%3E%3Cxsi%3Astarttime%3E1511425046189%3C%2Fxsi%3Astarttime%3E%3Cxsi%3Aanswertime%3E1511425057459%3C%2Fxsi%3Aanswertime%3E%3Cxsi%3Areleasetime%3E1511425336465%3C%2Fxsi%3Areleasetime%3E%3Cxsi%3Arecorded%3E%3Cxsi%3Aallowedrecordingcontrols%3Enone%3C%2Fxsi%3Aallowedrecordingcontrols%3E%3C%2Fxsi%3Arecorded%3E%3C%2Fxsi%3Acall%3E%3C%2Fxsi%3Aeventdata%3E%3C%2Fxsi%3Aevent%3E'
    5     1        NEW                                                  $6      'XMLReader'
          2        DO_FCALL                                          0          
          3        ASSIGN                                                       !1, $6
    6     4        INIT_METHOD_CALL                                             !1, 'xml'
          5        SEND_VAR_EX                                                  !0
          6        DO_FCALL                                          0          
    7     7      > JMP                                                          ->15
    8     8    >   FETCH_OBJ_R                                          ~10     !1, 'nodeType'
          9        IS_EQUAL                                                     ~10, 1
         10      > JMPZ                                                         ~11, ->15
    9    11    >   INIT_FCALL                                                   'var_dump'
         12        FETCH_OBJ_R                                          ~12     !1, 'name'
         13        SEND_VAL                                                     ~12
         14        DO_ICALL                                                     
    7    15    >   INIT_METHOD_CALL                                             !1, 'read'
         16        DO_FCALL                                          0  $14     
         17      > JMPNZ                                                        $14, ->8
   13    18    > > INIT_FCALL                                                   'exit'
         19*       DO_ICALL                                                     
   14    20*       BOOL_NOT                                             ~16     !2
         21*       JMPZ                                                         ~16, ->23
         22*       RETURN                                                       <array>
   16    23*       FETCH_THIS                                           $17     
         24*       NEW                                                  $19     'XMLReader'
         25*       DO_FCALL                                          0          
         26*       ASSIGN_OBJ                                                   $17, 'reader'
         27*       OP_DATA                                                      $19
   17    28*       FETCH_THIS                                           $21     
         29*       FETCH_OBJ_R                                          ~22     $21, 'reader'
         30*       INIT_METHOD_CALL                                             ~22, 'open'
         31*       SEND_VAR_EX                                                  !2
         32*       DO_FCALL                                          0          
   20    33*       JMP                                                          ->65
   22    34*       FETCH_THIS                                           $24     
         35*       FETCH_OBJ_R                                          ~25     $24, 'reader'
         36*       FETCH_OBJ_R                                          ~26     ~25, 'name'
         37*       IS_EQUAL                                                     ~26, 'store_categories'
         38*       JMPZ                                                         ~27, ->65
   24    39*       JMP                                                          ->49
   25    40*       FETCH_THIS                                           $28     
         41*       INIT_METHOD_CALL                                             $28, 'parseBlock'
         42*       SEND_VAL_EX                                                  'store_category'
         43*       DO_FCALL                                          0  $29     
         44*       ASSIGN                                                       !3, $29
   31    45*       FETCH_THIS                                           $31     
         46*       FETCH_OBJ_R                                          ~32     $31, 'reader'
         47*       INIT_METHOD_CALL                                             ~32, 'read'
         48*       DO_FCALL                                          0          
   24    49*       FETCH_THIS                                           $34     
         50*       FETCH_OBJ_R                                          ~35     $34, 'reader'
         51*       FETCH_OBJ_R                                          ~36     ~35, 'name'
         52*       IS_EQUAL                                             ~37     ~36, 'store_categories'
         53*       JMPZ_EX                                              ~37     ~37, ->59
         54*       FETCH_THIS                                           $38     
         55*       FETCH_OBJ_R                                          ~39     $38, 'reader'
         56*       FETCH_OBJ_R                                          ~40     ~39, 'nodeType'
         57*       IS_EQUAL                                             ~41     ~40, 15
         58*       BOOL                                                 ~37     ~41
         59*       BOOL_NOT                                             ~42     ~37
         60*       JMPNZ                                                        ~42, ->40
   34    61*       FETCH_THIS                                           $43     
         62*       FETCH_OBJ_R                                          ~44     $43, 'reader'
         63*       INIT_METHOD_CALL                                             ~44, 'read'
         64*       DO_FCALL                                          0          
   20    65*       FETCH_THIS                                           $46     
         66*       FETCH_OBJ_R                                          ~47     $46, 'reader'
         67*       INIT_METHOD_CALL                                             ~47, 'read'
         68*       DO_FCALL                                          0  $48     
         69*       JMPNZ                                                        $48, ->34
   44    70*       INIT_FCALL                                                   'exit'
         71*       DO_ICALL                                                     
   45    72*       INIT_FCALL                                                   'var_dump'
         73*       SEND_VAL                                                     14
         74*       DO_ICALL                                                     
         75*       INIT_FCALL                                                   'exit'
         76*       DO_ICALL                                                     
   46    77*       INIT_FCALL                                                   'var_dump'
         78*       INIT_FCALL                                                   'decbin'
         79*       SEND_VAL                                                     1
         80*       DO_ICALL                                             $52     
         81*       SEND_VAR                                                     $52
         82*       SEND_VAL                                                     2
         83*       SEND_VAL                                                     4
         84*       SEND_VAL                                                     8
         85*       SEND_VAL                                                     16
         86*       SEND_VAL                                                     32
         87*       SEND_VAL                                                     64
         88*       SEND_VAL                                                     128
         89*       SEND_VAL                                                     256
         90*       DO_ICALL                                                     
   47    91*       INIT_FCALL                                                   'exit'
         92*       DO_ICALL                                                     
   64    93*       INIT_FCALL                                                   'var_dump'
         94*       INIT_FCALL                                                   'setflag'
         95*       SEND_VAL                                                     4
         96*       SEND_VAL                                                     2
         97*       SEND_VAL                                                     <false>
         98*       DO_FCALL                                          0  $55     
         99*       SEND_VAR                                                     $55
        100*       DO_ICALL                                                     
   65   101*       INIT_FCALL                                                   'exit'
        102*       DO_ICALL                                                     
   67   103*       INIT_FCALL                                                   'var_dump'
   68   104*       SEND_VAL                                                     16
   69   105*       SEND_VAL                                                     16
   70   106*       INIT_FCALL                                                   'sprintf'
        107*       SEND_VAL                                                     '%25064b'
        108*       SEND_VAL                                                     5
        109*       DO_ICALL                                             $58     
        110*       SEND_VAR                                                     $58
   71   111*       INIT_FCALL                                                   'sprintf'
        112*       SEND_VAL                                                     '%25064b'
        113*       SEND_VAL                                                     1
        114*       DO_ICALL                                             $59     
        115*       SEND_VAR                                                     $59
   72   116*       INIT_FCALL                                                   'sprintf'
        117*       SEND_VAL                                                     '%25064b'
        118*       SEND_VAL                                                     2
        119*       DO_ICALL                                             $60     
        120*       SEND_VAR                                                     $60
   73   121*       INIT_FCALL                                                   'sprintf'
        122*       SEND_VAL                                                     '%25064b'
        123*       SEND_VAL                                                     4
        124*       DO_ICALL                                             $61     
        125*       SEND_VAR                                                     $61
   74   126*       INIT_FCALL                                                   'sprintf'
        127*       SEND_VAL                                                     '%25064b'
        128*       SEND_VAL                                                     6
        129*       DO_ICALL                                             $62     
        130*       SEND_VAR                                                     $62
   75   131*       INIT_FCALL                                                   'sprintf'
        132*       SEND_VAL                                                     '%25064b'
        133*       SEND_VAL                                                     8
        134*       DO_ICALL                                             $63     
        135*       SEND_VAR                                                     $63
   67   136*       DO_ICALL                                                     
   77   137*       INIT_FCALL                                                   'exit'
        138*       DO_ICALL                                                     
   78   139*       INIT_FCALL                                                   'var_dump'
        140*       ASSIGN                                               ~66     !4, '101'
        141*       SEND_VAL                                                     ~66
        142*       DO_ICALL                                                     
   79   143*       INIT_FCALL                                                   'var_dump'
   80   144*       INIT_FCALL                                                   'decbin'
        145*       SEND_VAL                                                     2
        146*       DO_ICALL                                             $68     
        147*       SEND_VAR                                                     $68
   81   148*       INIT_FCALL                                                   'decbin'
        149*       SEND_VAL                                                     4
        150*       DO_ICALL                                             $69     
        151*       SEND_VAR                                                     $69
   82   152*       INIT_FCALL                                                   'decbin'
        153*       SEND_VAR                                                     !4
        154*       DO_ICALL                                             $70     
        155*       SEND_VAR                                                     $70
   83   156*       SEND_VAL                                                     8
   79   157*       DO_ICALL                                                     
   86   158*       INIT_FCALL                                                   'exit'
        159*       DO_ICALL                                                     
        160*     > RETURN                                                       1

Function isflagset:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/uHKbK
function name:  isFlagSet
number of ops:  6
compiled vars:  !0 = $mask, !1 = $flag
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   48     0  E >   RECV                                                 !0      
          1        RECV                                                 !1      
   50     2        BW_AND                                               ~2      !0, !1
          3        IS_EQUAL                                             ~3      !1, ~2
          4      > RETURN                                                       ~3
   51     5*     > RETURN                                                       null

End of function isflagset

Function setflag:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 6
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 6
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/uHKbK
function name:  setFlag
number of ops:  10
compiled vars:  !0 = $mask, !1 = $flag, !2 = $value
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   53     0  E >   RECV                                                 !0      
          1        RECV                                                 !1      
          2        RECV                                                 !2      
   55     3      > JMPZ                                                         !2, ->6
   56     4    >   ASSIGN_OP                                         9          !0, !1
   55     5      > JMP                                                          ->8
   58     6    >   BW_NOT                                               ~4      !1
          7        ASSIGN_OP                                        10          !0, ~4
   61     8    > > RETURN                                                       !0
   62     9*     > RETURN                                                       null

End of function setflag

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
227.35 ms | 2304 KiB | 18 Q