3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = new stdClass; $a->value = 'a'; $b = new stdClass; $b->value = 'b'; $c = new stdClass; $c->value = 'c'; $abc = array($a, $b, $c); foreach ($abc as $k => $v) { if ($v == end($abc)) { echo "Same\n"; } else { echo "Not same\n"; } }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 20, Position 2 = 31
Branch analysis from position: 20
2 jumps found. (Code = 78) Position 1 = 21, Position 2 = 31
Branch analysis from position: 21
2 jumps found. (Code = 43) Position 1 = 27, Position 2 = 29
Branch analysis from position: 27
1 jumps found. (Code = 42) Position 1 = 30
Branch analysis from position: 30
1 jumps found. (Code = 42) Position 1 = 20
Branch analysis from position: 20
Branch analysis from position: 29
1 jumps found. (Code = 42) Position 1 = 20
Branch analysis from position: 20
Branch analysis from position: 31
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 31
filename:       /in/DiCZZ
function name:  (null)
number of ops:  33
compiled vars:  !0 = $a, !1 = $b, !2 = $c, !3 = $abc, !4 = $v, !5 = $k
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $6      'stdClass'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $6
    4     3        ASSIGN_OBJ                                               !0, 'value'
          4        OP_DATA                                                  'a'
    6     5        NEW                                              $10     'stdClass'
          6        DO_FCALL                                      0          
          7        ASSIGN                                                   !1, $10
    7     8        ASSIGN_OBJ                                               !1, 'value'
          9        OP_DATA                                                  'b'
    9    10        NEW                                              $14     'stdClass'
         11        DO_FCALL                                      0          
         12        ASSIGN                                                   !2, $14
   10    13        ASSIGN_OBJ                                               !2, 'value'
         14        OP_DATA                                                  'c'
   12    15        INIT_ARRAY                                       ~18     !0
         16        ADD_ARRAY_ELEMENT                                ~18     !1
         17        ADD_ARRAY_ELEMENT                                ~18     !2
         18        ASSIGN                                                   !3, ~18
   14    19      > FE_RESET_R                                       $20     !3, ->31
         20    > > FE_FETCH_R                                       ~21     $20, !4, ->31
         21    >   ASSIGN                                                   !5, ~21
   16    22        INIT_FCALL                                               'end'
         23        SEND_REF                                                 !3
         24        DO_ICALL                                         $23     
         25        IS_EQUAL                                                 !4, $23
         26      > JMPZ                                                     ~24, ->29
   18    27    >   ECHO                                                     'Same%0A'
         28      > JMP                                                      ->30
   22    29    >   ECHO                                                     'Not+same%0A'
   14    30    > > JMP                                                      ->20
         31    >   FE_FREE                                                  $20
   24    32      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.15 ms | 1396 KiB | 15 Q