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

End of function checkarray

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
192.73 ms | 1399 KiB | 14 Q