3v4l.org

run code in 300+ PHP versions simultaneously
<?php class StorageArea { protected $instance = null; public static function getInstance() { if ($this->instance === null) { $this->instance = new self; } return $this->instance; } } $a = StorageArea::getInstance();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/CSilS
function name:  (null)
number of ops:  4
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   INIT_STATIC_METHOD_CALL                                  'StorageArea', 'getInstance'
          1        DO_FCALL                                      0  $1      
          2        ASSIGN                                                   !0, $1
          3      > RETURN                                                   1

Class StorageArea:
Function getinstance:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 9
Branch analysis from position: 4
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
filename:       /in/CSilS
function name:  getInstance
number of ops:  13
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   FETCH_THIS                                       $0      
          1        FETCH_OBJ_R                                      ~1      $0, 'instance'
          2        TYPE_CHECK                                    2          ~1
          3      > JMPZ                                                     ~2, ->9
    8     4    >   FETCH_THIS                                       $3      
          5        NEW                          self                $5      
          6        DO_FCALL                                      0          
          7        ASSIGN_OBJ                                               $3, 'instance'
          8        OP_DATA                                                  $5
   10     9    >   FETCH_THIS                                       $7      
         10        FETCH_OBJ_R                                      ~8      $7, 'instance'
         11      > RETURN                                                   ~8
   11    12*     > RETURN                                                   null

End of function getinstance

End of class StorageArea.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.58 ms | 1393 KiB | 13 Q