3v4l.org

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

Function %00%7Bclosure%7D%2Fin%2FUMPWd%3A9%240:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 5
Branch analysis from position: 3
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 5
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/UMPWd
function name:  {closure}
number of ops:  6
compiled vars:  !0 = $item
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   RECV                                             !0      
   10     1        IS_EQUAL                                                 !0, 'foo'
          2      > JMPZ                                                     ~1, ->5
   12     3    >   ECHO                                                     'yep%21%21'
   13     4      > RETURN                                                   'fizz'
   15     5    > > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FUMPWd%3A9%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.36 ms | 1395 KiB | 17 Q