3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Prank { public function __construct() { $this->buildMe(); } protected function buildMe() { throw new Exception(); } public function doPraink() { echo 'hi'; } } try { // This may throw an exception when created! $o = new Pronk(); } catch (Exception $ex) { // Handle & exit somehow; not important here return false; } $o->doPronk();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 6
Branch analysis from position: 6
1 jumps found. (Code = 62) Position 1 = -2
Found catch point at position: 4
Branch analysis from position: 4
2 jumps found. (Code = 107) Position 1 = 5, Position 2 = -2
Branch analysis from position: 5
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Qofng
function name:  (null)
number of ops:  9
compiled vars:  !0 = $o, !1 = $ex
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   26     0  E >   NEW                                              $2      'Pronk'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
          3      > JMP                                                      ->6
   28     4  E > > CATCH                                       last         'Exception'
   31     5    > > RETURN                                                   <false>
   34     6    >   INIT_METHOD_CALL                                         !0, 'doPronk'
          7        DO_FCALL                                      0          
          8      > RETURN                                                   1

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

End of function __construct

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

End of function buildme

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

End of function dopraink

End of class Prank.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.2 ms | 1386 KiB | 13 Q