3v4l.org

run code in 300+ PHP versions simultaneously
<?php class DestructableObject { public function __destruct() { } } class DestructorCreator { public function __destruct() { $this->test = new DestructableObject; } } class Test { public static $mystatic; } // Uncomment this to avoid segfault Test::$mystatic = new DestructorCreator(); $x = new Test(); if (!isset(Test::$mystatic)) Test::$mystatic = new DestructorCreator(); echo 'bla';
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 10, Position 2 = 14
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 14
filename:       /in/8JMEv
function name:  (null)
number of ops:  16
compiled vars:  !0 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   24     0  E >   NEW                                              $2      'DestructorCreator'
          1        DO_FCALL                                      0          
          2        ASSIGN_STATIC_PROP                                       'mystatic', 'Test'
          3        OP_DATA                                                  $2
   26     4        NEW                                              $4      'Test'
          5        DO_FCALL                                      0          
          6        ASSIGN                                                   !0, $4
   28     7        ISSET_ISEMPTY_STATIC_PROP                        ~7      'mystatic'
          8        BOOL_NOT                                         ~8      ~7
          9      > JMPZ                                                     ~8, ->14
   29    10    >   NEW                                              $10     'DestructorCreator'
         11        DO_FCALL                                      0          
         12        ASSIGN_STATIC_PROP                                       'mystatic', 'Test'
         13        OP_DATA                                                  $10
   31    14    >   ECHO                                                     'bla'
         15      > RETURN                                                   1

Class DestructableObject:
Function __destruct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/8JMEv
function name:  __destruct
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E > > RETURN                                                   null

End of function __destruct

End of class DestructableObject.

Class DestructorCreator:
Function __destruct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/8JMEv
function name:  __destruct
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   NEW                                              $1      'DestructableObject'
          1        DO_FCALL                                      0          
          2        ASSIGN_OBJ                                               'test'
          3        OP_DATA                                                  $1
   15     4      > RETURN                                                   null

End of function __destruct

End of class DestructorCreator.

Class Test: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.82 ms | 1395 KiB | 13 Q