3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = ['a', 'b', 'c']; var_dump(current($arr)); echo '--------aaaaaa--------', PHP_EOL; var_dump(end($arr)); var_dump(next($arr)); $abc = $arr; echo '--------bbbbbbb--------', PHP_EOL; var_dump(current($abc)); // false var_dump(current($abc)); // false var_dump(each($abc)); // not false??? var_dump(each($abc)); // not false??? var_dump(each($abc)); // not false??? echo '--------cccccccc--------', PHP_EOL;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/dGZbf
function name:  (null)
number of ops:  57
compiled vars:  !0 = $arr, !1 = $abc
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   2     0  E >   QM_ASSIGN                                                !0
   3     1        INIT_FCALL                                               'var_dump'
         2        INIT_FCALL                                               'current'
         3        SEND_VAR                                                 !0
         4        DO_ICALL                                         $3      
         5        SEND_VAR                                                 $3
         6        DO_ICALL                                                 
   4     7        ASSIGN_OBJ                                               '--------aaaaaa--------'
         8        ASSIGN_OBJ                                               '%0A'
   5     9        INIT_FCALL                                               'var_dump'
        10        INIT_FCALL                                               'end'
        11        SEND_REF                                                 !0
        12        DO_ICALL                                         $5      
        13        SEND_VAR                                                 $5
        14        DO_ICALL                                                 
   6    15        INIT_FCALL                                               'var_dump'
        16        INIT_FCALL                                               'next'
        17        SEND_REF                                                 !0
        18        DO_ICALL                                         $7      
        19        SEND_VAR                                                 $7
        20        DO_ICALL                                                 
   8    21        QM_ASSIGN                                                !1
  10    22        ASSIGN_OBJ                                               '--------bbbbbbb--------'
        23        ASSIGN_OBJ                                               '%0A'
  12    24        INIT_FCALL                                               'var_dump'
        25        INIT_FCALL                                               'current'
        26        SEND_VAR                                                 !1
        27        DO_ICALL                                         $10     
        28        SEND_VAR                                                 $10
        29        DO_ICALL                                                 
  13    30        INIT_FCALL                                               'var_dump'
        31        INIT_FCALL                                               'current'
        32        SEND_VAR                                                 !1
        33        DO_ICALL                                         $12     
        34        SEND_VAR                                                 $12
        35        DO_ICALL                                                 
  14    36        INIT_FCALL                                               'var_dump'
        37        INIT_FCALL                                               'each'
        38        SEND_REF                                                 !1
        39        DO_ICALL                                         $14     
        40        SEND_VAR                                                 $14
        41        DO_ICALL                                                 
  15    42        INIT_FCALL                                               'var_dump'
        43        INIT_FCALL                                               'each'
        44        SEND_REF                                                 !1
        45        DO_ICALL                                         $16     
        46        SEND_VAR                                                 $16
        47        DO_ICALL                                                 
  16    48        INIT_FCALL                                               'var_dump'
        49        INIT_FCALL                                               'each'
        50        SEND_REF                                                 !1
        51        DO_ICALL                                         $18     
        52        SEND_VAR                                                 $18
        53        DO_ICALL                                                 
  17    54        ASSIGN_OBJ                                               '--------cccccccc--------'
        55        ASSIGN_OBJ                                               '%0A'
        56      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
38.02 ms | 416 KiB | 7 Q