3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test { static $instances; public function __construct() { var_dump(self::$instances[0] = $this); } function __destruct() { unset(self::$instances[0]); } } new Test(); new Test();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/EbPmd
function name:  (null)
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   NEW                                              $0      'Test'
          1        DO_FCALL                                      0          
          2        FREE                                                     $0
   17     3        NEW                                              $2      'Test'
          4        DO_FCALL                                      0          
          5        FREE                                                     $2
          6      > RETURN                                                   1

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

End of function __construct

Function __destruct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/EbPmd
function name:  __destruct
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   FETCH_STATIC_PROP_UNSET                          $0      'instances'
          1        UNSET_DIM                                                $0, 0
   13     2      > RETURN                                                   null

End of function __destruct

End of class Test.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.45 ms | 1010 KiB | 14 Q