3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
166.43 ms | 1395 KiB | 19 Q