3v4l.org

run code in 300+ PHP versions simultaneously
<?php class NothingDoer { public function doSomthing() { throw new \RuntimeException("No chance!"); } public function lookForWork() { throw new \DomainException("Nope!"); } public function pickupGiro() { // I can do that. } } $chav = new NothingDoer(); try { $chav->pickupGiro(); try { $chav->lookForWork(); } catch (\DomainException $e) { echo $e->getMessage() . PHP_EOL; } } catch (\RuntimeException $e) { echo $e->getMessage() . PHP_EOL; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 13
Branch analysis from position: 13
1 jumps found. (Code = 42) Position 1 = 19
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Found catch point at position: 8
Branch analysis from position: 8
2 jumps found. (Code = 107) Position 1 = 9, Position 2 = -2
Branch analysis from position: 9
1 jumps found. (Code = 42) Position 1 = 19
Branch analysis from position: 19
Found catch point at position: 14
Branch analysis from position: 14
2 jumps found. (Code = 107) Position 1 = 15, Position 2 = -2
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/6S8YN
function name:  (null)
number of ops:  20
compiled vars:  !0 = $chav, !1 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   21     0  E >   NEW                                              $2      'NothingDoer'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
   24     3        INIT_METHOD_CALL                                         !0, 'pickupGiro'
          4        DO_FCALL                                      0          
   27     5        INIT_METHOD_CALL                                         !0, 'lookForWork'
          6        DO_FCALL                                      0          
          7      > JMP                                                      ->13
   28     8  E > > CATCH                                       last         'DomainException'
   29     9    >   INIT_METHOD_CALL                                         !1, 'getMessage'
         10        DO_FCALL                                      0  $7      
         11        CONCAT                                           ~8      $7, '%0A'
         12        ECHO                                                     ~8
         13    > > JMP                                                      ->19
   31    14  E > > CATCH                                       last         'RuntimeException'
   32    15    >   INIT_METHOD_CALL                                         !1, 'getMessage'
         16        DO_FCALL                                      0  $9      
         17        CONCAT                                           ~10     $9, '%0A'
         18        ECHO                                                     ~10
   33    19    > > RETURN                                                   1

Class NothingDoer:
Function dosomthing:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 108) Position 1 = -2
filename:       /in/6S8YN
function name:  doSomthing
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   NEW                                              $0      'RuntimeException'
          1        SEND_VAL_EX                                              'No+chance%21'
          2        DO_FCALL                                      0          
          3      > THROW                                         0          $0
    8     4*     > RETURN                                                   null

End of function dosomthing

Function lookforwork:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 108) Position 1 = -2
filename:       /in/6S8YN
function name:  lookForWork
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   NEW                                              $0      'DomainException'
          1        SEND_VAL_EX                                              'Nope%21'
          2        DO_FCALL                                      0          
          3      > THROW                                         0          $0
   13     4*     > RETURN                                                   null

End of function lookforwork

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

End of function pickupgiro

End of class NothingDoer.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.15 ms | 1399 KiB | 13 Q