3v4l.org

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

Function getpair:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/3ZeJ1
function name:  getPair
number of ops:  6
compiled vars:  !0 = $array
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   RECV                                             !0      
   11     1        INIT_FCALL_BY_NAME                                       'each'
          2        SEND_VAR_EX                                              !0
          3        DO_FCALL                                      0  $1      
          4      > RETURN                                                   $1
   12     5*     > RETURN                                                   null

End of function getpair

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
172.66 ms | 1397 KiB | 20 Q