3v4l.org

run code in 300+ PHP versions simultaneously
<?php $__item = new stdClass(); $__item->total = count($vars['items']); $__item->iteration = 0; $__item->index = -1; $__item->show=$__item->total > 0; print_r($__item); //$vars['foreach']['cycle'] = $__item; $_foreach_cycle = $__item; $_foreach_cycle->index = 0; print_r($__item);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Aq8RI
function name:  (null)
number of ops:  25
compiled vars:  !0 = $__item, !1 = $vars, !2 = $_foreach_cycle
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   NEW                                              $3      'stdClass'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $3
    3     3        FETCH_DIM_R                                      ~7      !1, 'items'
          4        COUNT                                            ~8      ~7
          5        ASSIGN_OBJ                                               !0, 'total'
          6        OP_DATA                                                  ~8
    4     7        ASSIGN_OBJ                                               !0, 'iteration'
          8        OP_DATA                                                  0
    5     9        ASSIGN_OBJ                                               !0, 'index'
         10        OP_DATA                                                  -1
    6    11        FETCH_OBJ_R                                      ~12     !0, 'total'
         12        IS_SMALLER                                       ~13     0, ~12
         13        ASSIGN_OBJ                                               !0, 'show'
         14        OP_DATA                                                  ~13
    8    15        INIT_FCALL                                               'print_r'
         16        SEND_VAR                                                 !0
         17        DO_ICALL                                                 
   10    18        ASSIGN                                                   !2, !0
   11    19        ASSIGN_OBJ                                               !2, 'index'
         20        OP_DATA                                                  0
   12    21        INIT_FCALL                                               'print_r'
         22        SEND_VAR                                                 !0
         23        DO_ICALL                                                 
         24      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.34 ms | 1395 KiB | 15 Q