3v4l.org

run code in 300+ PHP versions simultaneously
<?php $_POST = array("person" => array( 1 => array("id" => 1, "name" => "bob"), 2 => array("id" => 2, "name" => "jim") ) ); $arr = array_pop($_POST); var_dump($arr); foreach($arr as $a) { if ($a["id"] == 1) { echo $a["name"]; } }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 11, Position 2 = 18
Branch analysis from position: 11
2 jumps found. (Code = 78) Position 1 = 12, Position 2 = 18
Branch analysis from position: 12
2 jumps found. (Code = 43) Position 1 = 15, Position 2 = 17
Branch analysis from position: 15
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
Branch analysis from position: 17
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 18
filename:       /in/QocDU
function name:  (null)
number of ops:  20
compiled vars:  !0 = $arr, !1 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   FETCH_W                      global              $2      '_POST'
          1        ASSIGN                                                   $2, <array>
   11     2        INIT_FCALL                                               'array_pop'
          3        FETCH_W                      global              $4      '_POST'
          4        SEND_REF                                                 $4
          5        DO_ICALL                                         $5      
          6        ASSIGN                                                   !0, $5
   13     7        INIT_FCALL                                               'var_dump'
          8        SEND_VAR                                                 !0
          9        DO_ICALL                                                 
   15    10      > FE_RESET_R                                       $8      !0, ->18
         11    > > FE_FETCH_R                                               $8, !1, ->18
   16    12    >   FETCH_DIM_R                                      ~9      !1, 'id'
         13        IS_EQUAL                                                 ~9, 1
         14      > JMPZ                                                     ~10, ->17
   17    15    >   FETCH_DIM_R                                      ~11     !1, 'name'
         16        ECHO                                                     ~11
   15    17    > > JMP                                                      ->11
         18    >   FE_FREE                                                  $8
   19    19      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
172.96 ms | 1395 KiB | 17 Q