3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test { var $test = 'test'; } $test = array(new Test()); var_dump(spl_object_hash($test)); foreach ($test as $t) { $t->test = 'nope'; } var_dump(spl_object_hash($test));
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 11, Position 2 = 15
Branch analysis from position: 11
2 jumps found. (Code = 78) Position 1 = 12, Position 2 = 15
Branch analysis from position: 12
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 15
filename:       /in/jQFFl
function name:  (null)
number of ops:  23
compiled vars:  !0 = $test, !1 = $t
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   NEW                                              $2      'Test'
          1        DO_FCALL                                      0          
          2        INIT_ARRAY                                       ~4      $2
          3        ASSIGN                                                   !0, ~4
    8     4        INIT_FCALL                                               'var_dump'
          5        INIT_FCALL                                               'spl_object_hash'
          6        SEND_VAR                                                 !0
          7        DO_ICALL                                         $6      
          8        SEND_VAR                                                 $6
          9        DO_ICALL                                                 
   10    10      > FE_RESET_R                                       $8      !0, ->15
         11    > > FE_FETCH_R                                               $8, !1, ->15
   11    12    >   ASSIGN_OBJ                                               !1, 'test'
         13        OP_DATA                                                  'nope'
   10    14      > JMP                                                      ->11
         15    >   FE_FREE                                                  $8
   14    16        INIT_FCALL                                               'var_dump'
         17        INIT_FCALL                                               'spl_object_hash'
         18        SEND_VAR                                                 !0
         19        DO_ICALL                                         $10     
         20        SEND_VAR                                                 $10
         21        DO_ICALL                                                 
         22      > RETURN                                                   1

Class Test: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.71 ms | 936 KiB | 18 Q