3v4l.org

run code in 300+ PHP versions simultaneously
<?php abstract class DefaultPersistenceProvider { public function __construct() {} /** * Returns a persistence provider using the provided persistence method. * Currently, "XML" is the only supported method. * * @param string $method * @throws Exception * @return DefaultPersistenceProvider */ public static function getByMethod($method) { switch ($method) { case 'XML': return 'xml'; default: throw new Exception('No default persistence provider for method ' . $method . ' is known to exist.'); } } } //another file $pp = DefaultPersistenceProvider::getByMethod('XML'); var_dump($pp);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/NmkU7
function name:  (null)
number of ops:  8
compiled vars:  !0 = $pp
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   25     0  E >   INIT_STATIC_METHOD_CALL                                  'DefaultPersistenceProvider', 'getByMethod'
          1        SEND_VAL                                                 'XML'
          2        DO_FCALL                                      0  $1      
          3        ASSIGN                                                   !0, $1
   26     4        INIT_FCALL                                               'var_dump'
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                                 
          7      > RETURN                                                   1

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

End of function __construct

Function getbymethod:
Finding entry points
Branch analysis from position: 0
3 jumps found. (Code = 188) Position 1 = 5, Position 2 = 6, Position 3 = 2
Branch analysis from position: 5
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 6
1 jumps found. (Code = 108) Position 1 = -2
Branch analysis from position: 2
2 jumps found. (Code = 44) Position 1 = 4, Position 2 = 5
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 6
Branch analysis from position: 6
Branch analysis from position: 5
filename:       /in/NmkU7
function name:  getByMethod
number of ops:  13
compiled vars:  !0 = $method
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   RECV                                             !0      
   16     1      > SWITCH_STRING                                            !0, [ 'XML':->5, ], ->6
   17     2    >   IS_EQUAL                                                 !0, 'XML'
          3      > JMPNZ                                                    ~1, ->5
          4    > > JMP                                                      ->6
   18     5    > > RETURN                                                   'xml'
   20     6    >   NEW                                              $2      'Exception'
          7        CONCAT                                           ~3      'No+default+persistence+provider+for+method+', !0
          8        CONCAT                                           ~4      ~3, '+is+known+to+exist.'
          9        SEND_VAL_EX                                              ~4
         10        DO_FCALL                                      0          
         11      > THROW                                         0          $2
   22    12*     > RETURN                                                   null

End of function getbymethod

End of class DefaultPersistenceProvider.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.45 ms | 1396 KiB | 15 Q