3v4l.org

run code in 300+ PHP versions simultaneously
<?php class OfferSearch { private static $instance; private $_solr = null; /** * Return a new instance of OfferSearch * * @return OfferSearch */ public static function instance() { if (is_null(self::$instance)) { self::$instance = new self; self::$instance->_solr = 'hello'; } return self::$instance; } public function getSolr() { return $this->_solr; } } var_dump(OfferSearch::instance()->getSolr());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ViJPb
function name:  (null)
number of ops:  8
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   30     0  E >   INIT_FCALL                                               'var_dump'
          1        INIT_STATIC_METHOD_CALL                                  'OfferSearch', 'instance'
          2        DO_FCALL                                      0  $0      
          3        INIT_METHOD_CALL                                         $0, 'getSolr'
          4        DO_FCALL                                      0  $1      
          5        SEND_VAR                                                 $1
          6        DO_ICALL                                                 
          7      > RETURN                                                   1

Class OfferSearch:
Function instance:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 10
Branch analysis from position: 3
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
filename:       /in/ViJPb
function name:  instance
number of ops:  13
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   FETCH_STATIC_PROP_R          unknown             ~0      'instance'
          1        TYPE_CHECK                                    2          ~0
          2      > JMPZ                                                     ~1, ->10
   17     3    >   NEW                          self                $3      
          4        DO_FCALL                                      0          
          5        ASSIGN_STATIC_PROP                                       'instance'
          6        OP_DATA                                                  $3
   18     7        FETCH_STATIC_PROP_W          unknown             $5      'instance'
          8        ASSIGN_OBJ                                               $5, '_solr'
          9        OP_DATA                                                  'hello'
   21    10    >   FETCH_STATIC_PROP_R          unknown             ~7      'instance'
         11      > RETURN                                                   ~7
   22    12*     > RETURN                                                   null

End of function instance

Function getsolr:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ViJPb
function name:  getSolr
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   26     0  E >   FETCH_OBJ_R                                      ~0      '_solr'
          1      > RETURN                                                   ~0
   27     2*     > RETURN                                                   null

End of function getsolr

End of class OfferSearch.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
164.17 ms | 1401 KiB | 15 Q