3v4l.org

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

Class Test: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.92 ms | 1396 KiB | 17 Q