3v4l.org

run code in 300+ PHP versions simultaneously
<?php class MockReflectionMethod extends ReflectionFunctionAbstract { public static function export() {} public function __toString() {} } try { (new MockReflectionMethod)->isStatic(); } catch(Throwable $e) { echo "Caught exception: ", $e->getMessage(); } try { (new MockReflectionMethod)->getReturnType(); } catch(Throwable $e) { echo "Caught exception: ",$e->getMessage(); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 21
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
Found catch point at position: 6
Branch analysis from position: 6
2 jumps found. (Code = 107) Position 1 = 7, Position 2 = -2
Branch analysis from position: 7
1 jumps found. (Code = 42) Position 1 = 21
Branch analysis from position: 21
Found catch point at position: 16
Branch analysis from position: 16
2 jumps found. (Code = 107) Position 1 = 17, Position 2 = -2
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/f20S1
function name:  (null)
number of ops:  22
compiled vars:  !0 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   DECLARE_CLASS                                            'mockreflectionmethod', 'reflectionfunctionabstract'
   11     1        NEW                                              $1      'MockReflectionMethod'
          2        DO_FCALL                                      0          
          3        INIT_METHOD_CALL                                         $1, 'isStatic'
          4        DO_FCALL                                      0          
          5      > JMP                                                      ->11
   12     6  E > > CATCH                                       last         'Throwable'
   13     7    >   ECHO                                                     'Caught+exception%3A+'
          8        INIT_METHOD_CALL                                         !0, 'getMessage'
          9        DO_FCALL                                      0  $4      
         10        ECHO                                                     $4
   17    11    >   NEW                                              $5      'MockReflectionMethod'
         12        DO_FCALL                                      0          
         13        INIT_METHOD_CALL                                         $5, 'getReturnType'
         14        DO_FCALL                                      0          
         15      > JMP                                                      ->21
   18    16  E > > CATCH                                       last         'Throwable'
   19    17    >   ECHO                                                     'Caught+exception%3A+'
         18        INIT_METHOD_CALL                                         !0, 'getMessage'
         19        DO_FCALL                                      0  $8      
         20        ECHO                                                     $8
   20    21    > > RETURN                                                   1

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

End of function export

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

End of function __tostring

End of class MockReflectionMethod.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
144.19 ms | 1395 KiB | 13 Q