3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = array(0 => array("key" => "val"), 1 => array("key" => "anotherval")); $key = "key"; $t = []; var_dump($t[]="foo"); /* $result = array_reduce($arr, function(&$cur, $item) use ($key) { return $cur=array_key_exists($key, $item)?array_merge($cur, [$item[$key]]):$cur; }, []); var_dump($result);*/
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/6eH5G
function name:  (null)
number of ops:  9
compiled vars:  !0 = $arr, !1 = $key, !2 = $t
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1        ASSIGN                                                   !1, 'key'
    5     2        ASSIGN                                                   !2, <array>
    6     3        INIT_FCALL                                               'var_dump'
          4        ASSIGN_DIM                                       ~6      !2
          5        OP_DATA                                                  'foo'
          6        SEND_VAL                                                 ~6
          7        DO_ICALL                                                 
   12     8      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.2 ms | 1394 KiB | 15 Q