3v4l.org

run code in 300+ PHP versions simultaneously
<?php $messages = [['action', ['...']], new StdClass(), new StdClass(), ['action', ['...']], new StdClass(), ['action', ['...']]]; end($messages); do { $current = current($messages); if(is_object($current)) { print_r($current) ."\r"; echo 'break !!'."\r"; break; } echo 'iterate'."\r" . 'prev !'; prev($messages); } while(true);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 22, Position 2 = 29
Branch analysis from position: 22
1 jumps found. (Code = 42) Position 1 = 34
Branch analysis from position: 34
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 29
2 jumps found. (Code = 44) Position 1 = 34, Position 2 = 16
Branch analysis from position: 34
Branch analysis from position: 16
filename:       /in/8YfJO
function name:  (null)
number of ops:  35
compiled vars:  !0 = $messages, !1 = $current
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   INIT_ARRAY                                       ~2      <array>
          1        NEW                                              $3      'StdClass'
          2        DO_FCALL                                      0          
          3        ADD_ARRAY_ELEMENT                                ~2      $3
          4        NEW                                              $5      'StdClass'
          5        DO_FCALL                                      0          
          6        ADD_ARRAY_ELEMENT                                ~2      $5
          7        ADD_ARRAY_ELEMENT                                ~2      <array>
          8        NEW                                              $7      'StdClass'
          9        DO_FCALL                                      0          
         10        ADD_ARRAY_ELEMENT                                ~2      $7
         11        ADD_ARRAY_ELEMENT                                ~2      <array>
         12        ASSIGN                                                   !0, ~2
    6    13        INIT_FCALL                                               'end'
         14        SEND_REF                                                 !0
         15        DO_ICALL                                                 
    9    16    >   INIT_FCALL                                               'current'
         17        SEND_VAR                                                 !0
         18        DO_ICALL                                         $11     
         19        ASSIGN                                                   !1, $11
   11    20        TYPE_CHECK                                  256          !1
         21      > JMPZ                                                     ~13, ->29
   13    22    >   INIT_FCALL                                               'print_r'
         23        SEND_VAR                                                 !1
         24        DO_ICALL                                         $14     
         25        CONCAT                                           ~15     $14, '%0D'
         26        FREE                                                     ~15
   15    27        ECHO                                                     'break+%21%21%0D'
   16    28      > JMP                                                      ->34
   20    29    >   ECHO                                                     'iterate%0Dprev+%21'
   21    30        INIT_FCALL                                               'prev'
         31        SEND_REF                                                 !0
         32        DO_ICALL                                                 
   23    33      > JMPNZ                                                    <true>, ->16
         34    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.94 ms | 1396 KiB | 21 Q