3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = 'foo'; $array = [&$a]; $newArray = array_map(function($item){ return $item; }, $array); var_dump($newArray);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/QKgAi
function name:  (null)
number of ops:  13
compiled vars:  !0 = $a, !1 = $array, !2 = $newArray
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'foo'
    4     1        INIT_ARRAY                                       ~4      !0
          2        ASSIGN                                                   !1, ~4
    6     3        INIT_FCALL                                               'array_map'
          4        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FQKgAi%3A6%240'
          5        SEND_VAL                                                 ~6
          6        SEND_VAR                                                 !1
          7        DO_ICALL                                         $7      
          8        ASSIGN                                                   !2, $7
    8     9        INIT_FCALL                                               'var_dump'
         10        SEND_VAR                                                 !2
         11        DO_ICALL                                                 
         12      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FQKgAi%3A6%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/QKgAi
function name:  {closure}
number of ops:  3
compiled vars:  !0 = $item
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
          1      > RETURN                                                   !0
          2*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FQKgAi%3A6%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.15 ms | 1395 KiB | 17 Q