3v4l.org

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

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

End of function f

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
172.73 ms | 1389 KiB | 20 Q