3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo findRecordsByFeeds(['project' => 2, 'template' => 1], 50); function findRecords($params = []) { $url = 'http://news.ngs52.ru/records?'; $params = array_filter($params); return $url . http_build_query($params); } function findRecordsByFeeds($feeds, $limit = null, $offset = null, $viewsRegion = null, $fields = null) { $params = [ 'feeds' => $feeds, 'limit' => $limit, 'offset' => $offset, 'viewsRegion' => $viewsRegion, 'excludeArticleId' => null, 'topHours' => null, 'isValidated' => true ]; if (is_array($fields)) { $params['fields'] = $fields; } return findRecords($params); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/pI1jS
function name:  (null)
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   INIT_FCALL_BY_NAME                                       'findRecordsByFeeds'
          1        SEND_VAL_EX                                              <array>
          2        SEND_VAL_EX                                              50
          3        DO_FCALL                                      0  $0      
          4        ECHO                                                     $0
   24     5      > RETURN                                                   1

Function findrecords:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/pI1jS
function name:  findRecords
number of ops:  12
compiled vars:  !0 = $params, !1 = $url
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV_INIT                                        !0      <array>
    7     1        ASSIGN                                                   !1, 'http%3A%2F%2Fnews.ngs52.ru%2Frecords%3F'
    8     2        INIT_FCALL                                               'array_filter'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $3      
          5        ASSIGN                                                   !0, $3
    9     6        INIT_FCALL                                               'http_build_query'
          7        SEND_VAR                                                 !0
          8        DO_ICALL                                         $5      
          9        CONCAT                                           ~6      !1, $5
         10      > RETURN                                                   ~6
   10    11*     > RETURN                                                   null

End of function findrecords

Function findrecordsbyfeeds:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 15, Position 2 = 17
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 17
filename:       /in/pI1jS
function name:  findRecordsByFeeds
number of ops:  22
compiled vars:  !0 = $feeds, !1 = $limit, !2 = $offset, !3 = $viewsRegion, !4 = $fields, !5 = $params
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   RECV                                             !0      
          1        RECV_INIT                                        !1      null
          2        RECV_INIT                                        !2      null
          3        RECV_INIT                                        !3      null
          4        RECV_INIT                                        !4      null
   15     5        INIT_ARRAY                                       ~6      !0, 'feeds'
          6        ADD_ARRAY_ELEMENT                                ~6      !1, 'limit'
   16     7        ADD_ARRAY_ELEMENT                                ~6      !2, 'offset'
          8        ADD_ARRAY_ELEMENT                                ~6      !3, 'viewsRegion'
   15     9        ADD_ARRAY_ELEMENT                                ~6      null, 'excludeArticleId'
         10        ADD_ARRAY_ELEMENT                                ~6      null, 'topHours'
         11        ADD_ARRAY_ELEMENT                                ~6      <true>, 'isValidated'
   14    12        ASSIGN                                                   !5, ~6
   20    13        TYPE_CHECK                                  128          !4
         14      > JMPZ                                                     ~8, ->17
   21    15    >   ASSIGN_DIM                                               !5, 'fields'
         16        OP_DATA                                                  !4
   23    17    >   INIT_FCALL                                               'findrecords'
         18        SEND_VAR                                                 !5
         19        DO_FCALL                                      0  $10     
         20      > RETURN                                                   $10
   24    21*     > RETURN                                                   null

End of function findrecordsbyfeeds

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.6 ms | 1402 KiB | 18 Q