3v4l.org

run code in 300+ PHP versions simultaneously
<?php class DriverBaseService { private static $instance; public static function getInstance() { if(empty(self::$instance)) { self::$instance = new self(); } return self::$instance; } public function test() { echo __CLASS__; } } class DriverService extends DriverBaseService { } DriverService::getInstance()->test();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Q2UFj
function name:  (null)
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   INIT_STATIC_METHOD_CALL                                  'DriverService', 'getInstance'
          1        DO_FCALL                                      0  $0      
          2        INIT_METHOD_CALL                                         $0, 'test'
          3        DO_FCALL                                      0          
          4      > RETURN                                                   1

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

End of function getinstance

Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Q2UFj
function name:  test
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   ECHO                                                     'DriverBaseService'
   12     1      > RETURN                                                   null

End of function test

End of class DriverBaseService.

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

End of function getinstance

Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Q2UFj
function name:  test
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   ECHO                                                     'DriverBaseService'
   12     1      > RETURN                                                   null

End of function test

End of class DriverService.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
161.58 ms | 1399 KiB | 13 Q