3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test { public function __destruct() { var_dump(spl_object_hash($this)); } } function foo() { return new Test; } $foo1 = foo(); $foo2 = foo(); echo spl_object_hash(foo()); echo PHP_EOL; echo spl_object_hash(foo()); /*var_dump( spl_object_hash($foo1), spl_object_hash($foo2), spl_object_hash(foo()), spl_object_hash(foo()) );*/
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/URJRX
function name:  (null)
number of ops:  20
compiled vars:  !0 = $foo1, !1 = $foo2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   INIT_FCALL                                               'foo'
          1        DO_FCALL                                      0  $2      
          2        ASSIGN                                                   !0, $2
   19     3        INIT_FCALL                                               'foo'
          4        DO_FCALL                                      0  $4      
          5        ASSIGN                                                   !1, $4
   21     6        INIT_FCALL                                               'spl_object_hash'
          7        INIT_FCALL                                               'foo'
          8        DO_FCALL                                      0  $6      
          9        SEND_VAR                                                 $6
         10        DO_ICALL                                         $7      
         11        ECHO                                                     $7
   22    12        ECHO                                                     '%0A'
   23    13        INIT_FCALL                                               'spl_object_hash'
         14        INIT_FCALL                                               'foo'
         15        DO_FCALL                                      0  $8      
         16        SEND_VAR                                                 $8
         17        DO_ICALL                                         $9      
         18        ECHO                                                     $9
   31    19      > RETURN                                                   1

Function foo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/URJRX
function name:  foo
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   NEW                                              $0      'Test'
          1        DO_FCALL                                      0          
          2      > RETURN                                                   $0
   16     3*     > RETURN                                                   null

End of function foo

Class Test:
Function __destruct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/URJRX
function name:  __destruct
number of ops:  8
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   INIT_FCALL                                               'var_dump'
          1        INIT_FCALL                                               'spl_object_hash'
          2        FETCH_THIS                                       ~0      
          3        SEND_VAL                                                 ~0
          4        DO_ICALL                                         $1      
          5        SEND_VAR                                                 $1
          6        DO_ICALL                                                 
    8     7      > RETURN                                                   null

End of function __destruct

End of class Test.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.66 ms | 1403 KiB | 21 Q