3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo _urlPrintXML(_urlSetPriority(_urlSetLastModDate(_urlNew('test.ru'), '14 25 6'), 20)); function &_urlNew($url) { return [ 'url' => 'http://' . $url, 'data' => []]; } function &_urlSetPriority(&$objUrl, $priority) { $objUrl['data']['priority'] = $priority; return $objUrl; } function _urlGetPriority($objUrl) { return isset($objUrl['data']['priority']) ? $objUrl['data']['priority'] : false; } function &_urlSetLastModDate(&$objUrl, $lastmod) { $objUrl['data']['lastmod'] = $lastmod; return $objUrl; } function _urlGetLastModDate(&$objUrl) { return isset($objUrl['data']['lastmod']) ? $objUrl['data']['lastmod'] : false; } function _urlPrintXML($objUrl) { $content = '<loc>' . $objUrl['url'] . '</loc>'; foreach ($objUrl['data'] as $propertyName => $propertyValue) { $content .= '<' . $propertyName . '>' . $propertyValue . '<' . $propertyName . '>'; } }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/D1dEH
function name:  (null)
number of ops:  16
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL_BY_NAME                                       '_urlPrintXML'
          1        INIT_FCALL_BY_NAME                                       '_urlSetPriority'
          2        INIT_FCALL_BY_NAME                                       '_urlSetLastModDate'
          3        INIT_FCALL_BY_NAME                                       '_urlNew'
          4        SEND_VAL_EX                                              'test.ru'
          5        DO_FCALL                                      0  $0      
          6        SEND_VAR_NO_REF_EX                                       $0
          7        SEND_VAL_EX                                              '14+25+6'
          8        DO_FCALL                                      0  $1      
          9        SEND_VAR_NO_REF_EX                                       $1
         10        SEND_VAL_EX                                              20
         11        DO_FCALL                                      0  $2      
         12        SEND_VAR_NO_REF_EX                                       $2
         13        DO_FCALL                                      0  $3      
         14        ECHO                                                     $3
   38    15      > RETURN                                                   1

Function _urlnew:
Finding entry points
Branch analysis from position: 0
Return found
filename:       /in/D1dEH
function name:  _urlNew
number of ops:  6
compiled vars:  !0 = $url
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
    7     1        CONCAT                                           ~1      'http%3A%2F%2F', !0
          2        INIT_ARRAY                                       ~2      ~1, 'url'
          3        ADD_ARRAY_ELEMENT                                ~2      <array>, 'data'
          4      > RETURN_BY_REF                                            ~2
    8     5*     > RETURN_BY_REF                                            null

End of function _urlnew

Function _urlsetpriority:
Finding entry points
Branch analysis from position: 0
Return found
filename:       /in/D1dEH
function name:  _urlSetPriority
number of ops:  7
compiled vars:  !0 = $objUrl, !1 = $priority
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   12     2        FETCH_DIM_W                                      $2      !0, 'data'
          3        ASSIGN_DIM                                               $2, 'priority'
          4        OP_DATA                                                  !1
   13     5      > RETURN_BY_REF                                            !0
   14     6*     > RETURN_BY_REF                                            null

End of function _urlsetpriority

Function _urlgetpriority:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 8
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/D1dEH
function name:  _urlGetPriority
number of ops:  11
compiled vars:  !0 = $objUrl
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   RECV                                             !0      
   18     1        FETCH_DIM_IS                                     ~1      !0, 'data'
          2        ISSET_ISEMPTY_DIM_OBJ                         0          ~1, 'priority'
          3      > JMPZ                                                     ~2, ->8
          4    >   FETCH_DIM_R                                      ~3      !0, 'data'
          5        FETCH_DIM_R                                      ~4      ~3, 'priority'
          6        QM_ASSIGN                                        ~5      ~4
          7      > JMP                                                      ->9
          8    >   QM_ASSIGN                                        ~5      <false>
          9    > > RETURN                                                   ~5
   19    10*     > RETURN                                                   null

End of function _urlgetpriority

Function _urlsetlastmoddate:
Finding entry points
Branch analysis from position: 0
Return found
filename:       /in/D1dEH
function name:  _urlSetLastModDate
number of ops:  7
compiled vars:  !0 = $objUrl, !1 = $lastmod
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   21     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   23     2        FETCH_DIM_W                                      $2      !0, 'data'
          3        ASSIGN_DIM                                               $2, 'lastmod'
          4        OP_DATA                                                  !1
   24     5      > RETURN_BY_REF                                            !0
   25     6*     > RETURN_BY_REF                                            null

End of function _urlsetlastmoddate

Function _urlgetlastmoddate:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 8
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/D1dEH
function name:  _urlGetLastModDate
number of ops:  11
compiled vars:  !0 = $objUrl
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   27     0  E >   RECV                                             !0      
   29     1        FETCH_DIM_IS                                     ~1      !0, 'data'
          2        ISSET_ISEMPTY_DIM_OBJ                         0          ~1, 'lastmod'
          3      > JMPZ                                                     ~2, ->8
          4    >   FETCH_DIM_R                                      ~3      !0, 'data'
          5        FETCH_DIM_R                                      ~4      ~3, 'lastmod'
          6        QM_ASSIGN                                        ~5      ~4
          7      > JMP                                                      ->9
          8    >   QM_ASSIGN                                        ~5      <false>
          9    > > RETURN                                                   ~5
   30    10*     > RETURN                                                   null

End of function _urlgetlastmoddate

Function _urlprintxml:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 7, Position 2 = 17
Branch analysis from position: 7
2 jumps found. (Code = 78) Position 1 = 8, Position 2 = 17
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 17
filename:       /in/D1dEH
function name:  _urlPrintXML
number of ops:  19
compiled vars:  !0 = $objUrl, !1 = $content, !2 = $propertyValue, !3 = $propertyName
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   32     0  E >   RECV                                             !0      
   34     1        FETCH_DIM_R                                      ~4      !0, 'url'
          2        CONCAT                                           ~5      '%3Cloc%3E', ~4
          3        CONCAT                                           ~6      ~5, '%3C%2Floc%3E'
          4        ASSIGN                                                   !1, ~6
   35     5        FETCH_DIM_R                                      ~8      !0, 'data'
          6      > FE_RESET_R                                       $9      ~8, ->17
          7    > > FE_FETCH_R                                       ~10     $9, !2, ->17
          8    >   ASSIGN                                                   !3, ~10
   36     9        CONCAT                                           ~12     '%3C', !3
         10        CONCAT                                           ~13     ~12, '%3E'
         11        CONCAT                                           ~14     ~13, !2
         12        CONCAT                                           ~15     ~14, '%3C'
         13        CONCAT                                           ~16     ~15, !3
         14        CONCAT                                           ~17     ~16, '%3E'
         15        ASSIGN_OP                                     8          !1, ~17
   35    16      > JMP                                                      ->7
         17    >   FE_FREE                                                  $9
   38    18      > RETURN                                                   null

End of function _urlprintxml

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.62 ms | 1403 KiB | 13 Q