3v4l.org

run code in 300+ PHP versions simultaneously
<?php $superheroes = array( "spider-man" => array( "name" => "Peter Parker", "email" => "peterparker@mail.com", ), "super-man" => array( "name" => "Clark Kent", "email" => "clarkkent@mail.com", ), "iron-man" => array( "name" => "Harry Potter", "email" => "harrypotter@mail.com", ) ); //print_r($superheroes); function checkArray($array) { forEach($array as $index => $item) { if(is_Array($item)) { echo "YES-" . ": " . $array . $index . $item . "\n"; checkArray($item); } else { echo "NO-" . ": " . $item . "\n"; } } } checkArray($superheroes);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/omJEX
function name:  (null)
number of ops:  5
compiled vars:  !0 = $superheroes
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
   31     1        INIT_FCALL                                               'checkarray'
          2        SEND_VAR                                                 !0
          3        DO_FCALL                                      0          
          4      > RETURN                                                   1

Function checkarray:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 2, Position 2 = 19
Branch analysis from position: 2
2 jumps found. (Code = 78) Position 1 = 3, Position 2 = 19
Branch analysis from position: 3
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 15
Branch analysis from position: 6
1 jumps found. (Code = 42) Position 1 = 18
Branch analysis from position: 18
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 15
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 19
filename:       /in/omJEX
function name:  checkArray
number of ops:  21
compiled vars:  !0 = $array, !1 = $item, !2 = $index
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   19     0  E >   RECV                                             !0      
   20     1      > FE_RESET_R                                       $3      !0, ->19
          2    > > FE_FETCH_R                                       ~4      $3, !1, ->19
          3    >   ASSIGN                                                   !2, ~4
   21     4        TYPE_CHECK                                  128          !1
          5      > JMPZ                                                     ~6, ->15
   22     6    >   CONCAT                                           ~7      'YES-%3A+', !0
          7        CONCAT                                           ~8      ~7, !2
          8        CONCAT                                           ~9      ~8, !1
          9        CONCAT                                           ~10     ~9, '%0A'
         10        ECHO                                                     ~10
   23    11        INIT_FCALL_BY_NAME                                       'checkArray'
         12        SEND_VAR_EX                                              !1
         13        DO_FCALL                                      0          
         14      > JMP                                                      ->18
   26    15    >   CONCAT                                           ~12     'NO-%3A+', !1
         16        CONCAT                                           ~13     ~12, '%0A'
         17        ECHO                                                     ~13
   20    18    > > JMP                                                      ->2
         19    >   FE_FREE                                                  $3
   29    20      > RETURN                                                   null

End of function checkarray

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.62 ms | 1399 KiB | 14 Q