3v4l.org

run code in 300+ PHP versions simultaneously
<?php class notStdClass { } function foo() { static $id= 0; $object = new notStdClass; $object->id = $id++; return $object; } $foo1 = foo(); $foo2 = 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/9KW0k
function name:  (null)
number of ops:  29
compiled vars:  !0 = $foo1, !1 = $foo2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   INIT_FCALL                                               'foo'
          1        DO_FCALL                                      0  $2      
          2        ASSIGN                                                   !0, $2
   16     3        INIT_FCALL                                               'foo'
          4        DO_FCALL                                      0  $4      
          5        ASSIGN                                                   !1, $4
   18     6        INIT_FCALL                                               'var_dump'
   19     7        INIT_FCALL                                               'spl_object_hash'
          8        SEND_VAR                                                 !0
          9        DO_ICALL                                         $6      
         10        SEND_VAR                                                 $6
   20    11        INIT_FCALL                                               'spl_object_hash'
         12        SEND_VAR                                                 !1
         13        DO_ICALL                                         $7      
         14        SEND_VAR                                                 $7
   21    15        INIT_FCALL                                               'spl_object_hash'
         16        INIT_FCALL                                               'foo'
         17        DO_FCALL                                      0  $8      
         18        SEND_VAR                                                 $8
         19        DO_ICALL                                         $9      
         20        SEND_VAR                                                 $9
   22    21        INIT_FCALL                                               'spl_object_hash'
         22        INIT_FCALL                                               'foo'
         23        DO_FCALL                                      0  $10     
         24        SEND_VAR                                                 $10
         25        DO_ICALL                                         $11     
         26        SEND_VAR                                                 $11
         27        DO_ICALL                                                 
   23    28      > RETURN                                                   1

Function foo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/9KW0k
function name:  foo
number of ops:  9
compiled vars:  !0 = $id, !1 = $object
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   BIND_STATIC                                              !0
   10     1        NEW                                              $2      'notStdClass'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !1, $2
   11     4        POST_INC                                         ~6      !0
          5        ASSIGN_OBJ                                               !1, 'id'
          6        OP_DATA                                                  ~6
   12     7      > RETURN                                                   !1
   13     8*     > RETURN                                                   null

End of function foo

Class notStdClass: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.41 ms | 1399 KiB | 21 Q