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, $dimensionName) { forEach($array as $index => $item) { $dimensionName = $dimensionName . $array; //$dimensionPath = $array . $index; if(is_Array($item)) { echo "========== \n"; //$dimensionPath = $array . $index; echo "YES-" . $dimensionName . ": " . $item . "\n"; checkArray($item, $dimensionName); } else { echo "NO-" . $dimensionName . ": " . $item . "\n"; } } } checkArray($superheroes);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4Z809
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>
   35     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 = 3, Position 2 = 26
Branch analysis from position: 3
2 jumps found. (Code = 78) Position 1 = 4, Position 2 = 26
Branch analysis from position: 4
2 jumps found. (Code = 43) Position 1 = 9, Position 2 = 20
Branch analysis from position: 9
1 jumps found. (Code = 42) Position 1 = 25
Branch analysis from position: 25
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 20
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 26
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 26
filename:       /in/4Z809
function name:  checkArray
number of ops:  28
compiled vars:  !0 = $array, !1 = $dimensionName, !2 = $item, !3 = $index
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   19     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   20     2      > FE_RESET_R                                       $4      !0, ->26
          3    > > FE_FETCH_R                                       ~5      $4, !2, ->26
          4    >   ASSIGN                                                   !3, ~5
   21     5        CONCAT                                           ~7      !1, !0
          6        ASSIGN                                                   !1, ~7
   23     7        TYPE_CHECK                                  128          !2
          8      > JMPZ                                                     ~9, ->20
   24     9    >   ECHO                                                     '%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D+%0A'
   26    10        CONCAT                                           ~10     'YES-', !1
         11        CONCAT                                           ~11     ~10, '%3A+'
         12        CONCAT                                           ~12     ~11, !2
         13        CONCAT                                           ~13     ~12, '%0A'
         14        ECHO                                                     ~13
   27    15        INIT_FCALL_BY_NAME                                       'checkArray'
         16        SEND_VAR_EX                                              !2
         17        SEND_VAR_EX                                              !1
         18        DO_FCALL                                      0          
         19      > JMP                                                      ->25
   30    20    >   CONCAT                                           ~15     'NO-', !1
         21        CONCAT                                           ~16     ~15, '%3A+'
         22        CONCAT                                           ~17     ~16, !2
         23        CONCAT                                           ~18     ~17, '%0A'
         24        ECHO                                                     ~18
   20    25    > > JMP                                                      ->3
         26    >   FE_FREE                                                  $4
   33    27      > RETURN                                                   null

End of function checkarray

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
174.78 ms | 1394 KiB | 14 Q