3v4l.org

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

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

End of function f

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
173.68 ms | 1397 KiB | 20 Q