3v4l.org

run code in 300+ PHP versions simultaneously
<?php $__item = new stdClass(); $__item->total = count( array(1,2,3)); $__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/Dk3FG
function name:  (null)
number of ops:  24
compiled vars:  !0 = $__item, !1 = $_foreach_cycle
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   NEW                                              $2      'stdClass'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
    3     3        COUNT                                            ~6      <array>
          4        ASSIGN_OBJ                                               !0, 'total'
          5        OP_DATA                                                  ~6
    4     6        ASSIGN_OBJ                                               !0, 'iteration'
          7        OP_DATA                                                  0
    5     8        ASSIGN_OBJ                                               !0, 'index'
          9        OP_DATA                                                  -1
    6    10        FETCH_OBJ_R                                      ~10     !0, 'total'
         11        IS_SMALLER                                       ~11     0, ~10
         12        ASSIGN_OBJ                                               !0, 'show'
         13        OP_DATA                                                  ~11
    8    14        INIT_FCALL                                               'print_r'
         15        SEND_VAR                                                 !0
         16        DO_ICALL                                                 
   10    17        ASSIGN                                                   !1, !0
   11    18        ASSIGN_OBJ                                               !1, 'index'
         19        OP_DATA                                                  0
   12    20        INIT_FCALL                                               'print_r'
         21        SEND_VAR                                                 !0
         22        DO_ICALL                                                 
         23      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.24 ms | 1399 KiB | 15 Q