3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = [0,1,[0,1,new RecursiveArrayIterator([0,1])]]; $dir = new RecursiveArrayIterator($arr); $it = new RecursiveCallbackFilterIterator($dir, function(){return true;}); var_dump($it->hasChildren());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2gU7Z
function name:  (null)
number of ops:  26
compiled vars:  !0 = $arr, !1 = $dir, !2 = $it
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_ARRAY                                       ~3      0
          1        ADD_ARRAY_ELEMENT                                ~3      1
          2        INIT_ARRAY                                       ~4      0
          3        ADD_ARRAY_ELEMENT                                ~4      1
          4        NEW                                              $5      'RecursiveArrayIterator'
          5        SEND_VAL_EX                                              <array>
          6        DO_FCALL                                      0          
          7        ADD_ARRAY_ELEMENT                                ~4      $5
          8        ADD_ARRAY_ELEMENT                                ~3      ~4
          9        ASSIGN                                                   !0, ~3
    3    10        NEW                                              $8      'RecursiveArrayIterator'
         11        SEND_VAR_EX                                              !0
         12        DO_FCALL                                      0          
         13        ASSIGN                                                   !1, $8
    5    14        NEW                                              $11     'RecursiveCallbackFilterIterator'
         15        SEND_VAR_EX                                              !1
         16        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2F2gU7Z%3A5%240'
         17        SEND_VAL_EX                                              ~12
         18        DO_FCALL                                      0          
         19        ASSIGN                                                   !2, $11
    7    20        INIT_FCALL                                               'var_dump'
         21        INIT_METHOD_CALL                                         !2, 'hasChildren'
         22        DO_FCALL                                      0  $15     
         23        SEND_VAR                                                 $15
         24        DO_ICALL                                                 
         25      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2F2gU7Z%3A5%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2gU7Z
function name:  {closure}
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E > > RETURN                                                   <true>
          1*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2F2gU7Z%3A5%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
168.37 ms | 1396 KiB | 15 Q