3v4l.org

run code in 500+ PHP versions simultaneously
<?php class Parser { public function parse($convertClassic = true) { $context = func_num_args() > 1 ? func_get_arg(1) : null; if ($context !== null && !$context instanceof DOMElement) { throw new InvalidArgumentException(__METHOD__ . ': Argument #1 ($context) must be of type ?DOMElement, ' . gettype($context) . ' given'); } } } class ChildParser extends Parser { public function parse($convertClassic = true, DOMElement $context = null) { return parent::parse($convertClassic, $context); } }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/21UXa
function name:  (null)
number of ops:  1
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   16     0  E > > RETURN                                                       1

Class Parser:
Function parse:
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 = 42) Position 1 = 10
Branch analysis from position: 10
2 jumps found. (Code = 46) Position 1 = 13, Position 2 = 16
Branch analysis from position: 13
2 jumps found. (Code = 43) Position 1 = 17, Position 2 = 24
Branch analysis from position: 17
1 jumps found. (Code = 108) Position 1 = -2
Branch analysis from position: 24
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 16
Branch analysis from position: 9
2 jumps found. (Code = 46) Position 1 = 13, Position 2 = 16
Branch analysis from position: 13
Branch analysis from position: 16
filename:       /in/21UXa
function name:  parse
number of ops:  25
compiled vars:  !0 = $convertClassic, !1 = $context
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    4     0  E >   RECV_INIT                                            !0      <true>
    5     1        FUNC_NUM_ARGS                                        ~2      
          2        IS_SMALLER                                                   1, ~2
          3      > JMPZ                                                         ~3, ->9
          4    >   INIT_FCALL                                                   'func_get_arg'
          5        SEND_VAL                                                     1
          6        DO_ICALL                                             $4      
          7        QM_ASSIGN                                            ~5      $4
          8      > JMP                                                          ->10
          9    >   QM_ASSIGN                                            ~5      null
         10    >   ASSIGN                                                       !1, ~5
    6    11        TYPE_CHECK                                      1020  ~7      !1
         12      > JMPZ_EX                                              ~7      ~7, ->16
         13    >   INSTANCEOF                                           ~8      !1, 'DOMElement'
         14        BOOL_NOT                                             ~9      ~8
         15        BOOL                                                 ~7      ~9
         16    > > JMPZ                                                         ~7, ->24
    7    17    >   NEW                                                  $10     'InvalidArgumentException'
         18        GET_TYPE                                             ~11     !1
         19        CONCAT                                               ~12     'Parser%3A%3Aparse%3A+Argument+%231+%28%24context%29+must+be+of+type+%3FDOMElement%2C+', ~11
         20        CONCAT                                               ~13     ~12, '+given'
         21        SEND_VAL_EX                                                  ~13
         22        DO_FCALL                                          0          
         23      > THROW                                             0          $10
    9    24    > > RETURN                                                       null

End of function parse

End of class Parser.

Class ChildParser:
Function parse:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/21UXa
function name:  parse
number of ops:  8
compiled vars:  !0 = $convertClassic, !1 = $context
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   13     0  E >   RECV_INIT                                            !0      <true>
          1        RECV_INIT                                            !1      null
   14     2        INIT_STATIC_METHOD_CALL                                      'parse'
          3        SEND_VAR_EX                                                  !0
          4        SEND_VAR_EX                                                  !1
          5        DO_FCALL                                          0  $2      
          6      > RETURN                                                       $2
   15     7*     > RETURN                                                       null

End of function parse

End of class ChildParser.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
161.86 ms | 3300 KiB | 13 Q