3v4l.org

run code in 500+ PHP versions simultaneously
<?php $obj = new stdClass; $obj->expr = new stdClass; $a = $obj; while ($a->expr instanceof stdClass) { $a->expr->expr = 'test'; $a = $a->expr; } var_dump($obj); var_dump($obj === $a);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 14
Branch analysis from position: 14
2 jumps found. (Code = 44) Position 1 = 17, Position 2 = 9
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
2 jumps found. (Code = 44) Position 1 = 17, Position 2 = 9
Branch analysis from position: 17
Branch analysis from position: 9
filename:       /in/lR4mF
function name:  (null)
number of ops:  25
compiled vars:  !0 = $obj, !1 = $a
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   NEW                                                  $2      'stdClass'
          1        DO_FCALL                                          0          
          2        ASSIGN                                                       !0, $2
    4     3        NEW                                                  $6      'stdClass'
          4        DO_FCALL                                          0          
          5        ASSIGN_OBJ                                                   !0, 'expr'
          6        OP_DATA                                                      $6
    6     7        ASSIGN                                                       !1, !0
    8     8      > JMP                                                          ->14
    9     9    >   FETCH_OBJ_W                                          $9      !1, 'expr'
         10        ASSIGN_OBJ                                                   $9, 'expr'
         11        OP_DATA                                                      'test'
   10    12        FETCH_OBJ_R                                          ~11     !1, 'expr'
         13        ASSIGN                                                       !1, ~11
    8    14    >   FETCH_OBJ_R                                          ~13     !1, 'expr'
         15        INSTANCEOF                                                   ~13, 'stdClass'
         16      > JMPNZ                                                        ~14, ->9
   13    17    >   INIT_FCALL                                                   'var_dump'
         18        SEND_VAR                                                     !0
         19        DO_ICALL                                                     
   14    20        INIT_FCALL                                                   'var_dump'
         21        IS_IDENTICAL                                         ~16     !0, !1
         22        SEND_VAL                                                     ~16
         23        DO_ICALL                                                     
         24      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
168.47 ms | 1727 KiB | 14 Q