3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = array("a", "b", "c"); next($a); $b = $a; var_dump(current($b)); function f($c) { var_dump(current($c)); } f($a);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/dsCal
function name:  (null)
number of ops:  15
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1        INIT_FCALL                                               'next'
          2        SEND_REF                                                 !0
          3        DO_ICALL                                                 
    6     4        ASSIGN                                                   !1, !0
    7     5        INIT_FCALL                                               'var_dump'
          6        INIT_FCALL                                               'current'
          7        SEND_VAR                                                 !1
          8        DO_ICALL                                         $5      
          9        SEND_VAR                                                 $5
         10        DO_ICALL                                                 
   10    11        INIT_FCALL                                               'f'
         12        SEND_VAR                                                 !0
         13        DO_FCALL                                      0          
         14      > RETURN                                                   1

Function f:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/dsCal
function name:  f
number of ops:  8
compiled vars:  !0 = $c
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   RECV                                             !0      
          1        INIT_FCALL                                               'var_dump'
          2        INIT_FCALL                                               'current'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $1      
          5        SEND_VAR                                                 $1
          6        DO_ICALL                                                 
          7      > RETURN                                                   null

End of function f

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
161.6 ms | 1398 KiB | 20 Q