3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
168.75 ms | 1394 KiB | 17 Q