3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?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 . "_" . $index; //$dimensionPath = $array . $index; if(is_Array($item)) { echo "========== \n"; //$dimensionPath = $array . $index; $dimensionName = $dimensionName . "_" . $index; echo "YES1-" . $dimensionName . ": " . $item . "\n"; checkArray($item, $dimensionName); } else { echo "NO2-" . $dimensionName . ": " . $item . "\n"; } } } checkArray($superheroes);
based on SE11v
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/udL4N
function name:  (null)
number of ops:  6
compiled vars:  !0 = $superheroes
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   3     0  E >   ASSIGN                                                   !0, <array>
  19     1        NOP                                                      
  36     2        INIT_FCALL                                               'checkarray'
         3        SEND_VAR                                                 !0
         4        DO_FCALL                                      0          
         5      > RETURN                                                   1

Function checkarray:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 3, Position 2 = 27
Branch analysis from position: 3
2 jumps found. (Code = 78) Position 1 = 4, Position 2 = 27
Branch analysis from position: 4
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 21
Branch analysis from position: 7
1 jumps found. (Code = 42) Position 1 = 26
Branch analysis from position: 26
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 21
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 27
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 27
filename:       /in/udL4N
function name:  checkArray
number of ops:  29
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, ->27
         3    > > FE_FETCH_R                                       ~5      $4, !2, ->27
         4    >   ASSIGN                                                   !3, ~5
  23     5        TYPE_CHECK                                    7  ~7      !2
         6      > JMPZ                                                     ~7, ->21
  24     7    >   ECHO                                                     '%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D+%0A'
  26     8        CONCAT                                           ~8      !1, '_'
         9        CONCAT                                           ~9      ~8, !3
        10        ASSIGN                                                   !1, ~9
  27    11        CONCAT                                           ~11     'YES1-', !1
        12        CONCAT                                           ~12     ~11, '%3A+'
        13        CONCAT                                           ~13     ~12, !2
        14        CONCAT                                           ~14     ~13, '%0A'
        15        ECHO                                                     ~14
  28    16        INIT_FCALL_BY_NAME                                       'checkArray'
        17        SEND_VAR_EX                                              !2
        18        SEND_VAR_EX                                              !1
        19        DO_FCALL                                      0          
        20      > JMP                                                      ->26
  31    21    >   CONCAT                                           ~16     'NO2-', !1
        22        CONCAT                                           ~17     ~16, '%3A+'
        23        CONCAT                                           ~18     ~17, !2
        24        CONCAT                                           ~19     ~18, '%0A'
        25        ECHO                                                     ~19
        26    > > JMP                                                      ->3
        27    >   FE_FREE                                                  $4
  34    28      > RETURN                                                   null

End of function checkarray

Generated using Vulcan Logic Dumper, using php 7.3.0