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 ($a == 'foo') { return 'fizz'; } }, $array); var_dump($array);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/DnifD
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%2FDnifD%3A9%240'
   14    10        SEND_VAL                                                 ~8
         11        SEND_VAR                                                 !2
         12        DO_ICALL                                                 
   17    13        INIT_FCALL                                               'var_dump'
         14        SEND_VAR                                                 !2
         15        DO_ICALL                                                 
         16      > RETURN                                                   1

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

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.16 ms | 1395 KiB | 17 Q