3v4l.org

run code in 300+ PHP versions simultaneously
<?php class ClassName { public function __construct() { echo 'object begin' . PHP_EOL; throw new Exception('!! Exception !!'); echo 'object after thow' . PHP_EOL; } public function __destruct() { echo 'object end' . PHP_EOL; } } echo '<< script begin >>' . PHP_EOL; try { $o = new ClassName; } catch (Exception $e) { echo $e->getMessage() . PHP_EOL; } finally { echo 'finally block, object ' . (isset($o) ? 'exist' :'not exist') . PHP_EOL; } echo '<< script end >>' . PHP_EOL;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
2 jumps found. (Code = 162) Position 1 = 12, Position 2 = 11
Branch analysis from position: 12
2 jumps found. (Code = 43) Position 1 = 14, Position 2 = 16
Branch analysis from position: 14
1 jumps found. (Code = 42) Position 1 = 17
Branch analysis from position: 17
1 jumps found. (Code = 163) Position 1 = -2
Branch analysis from position: 16
1 jumps found. (Code = 163) Position 1 = -2
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: 5
Branch analysis from position: 5
2 jumps found. (Code = 107) Position 1 = 6, Position 2 = -2
Branch analysis from position: 6
2 jumps found. (Code = 162) Position 1 = 12, Position 2 = 11
Branch analysis from position: 12
Branch analysis from position: 11
filename:       /in/a3GaS
function name:  (null)
number of ops:  23
compiled vars:  !0 = $o, !1 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   ECHO                                                     '%3C%3C+script+begin+%3E%3E%0A'
   21     1        NEW                                              $3      'ClassName'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $3
          4      > JMP                                                      ->10
   22     5  E > > CATCH                                       last         'Exception'
   23     6    >   INIT_METHOD_CALL                                         !1, 'getMessage'
          7        DO_FCALL                                      0  $6      
          8        CONCAT                                           ~7      $6, '%0A'
          9        ECHO                                                     ~7
   24    10    > > FAST_CALL                                                ->12
         11    > > JMP                                                      ->21
   25    12    >   ISSET_ISEMPTY_CV                                         !0
         13      > JMPZ                                                     ~8, ->16
         14    >   QM_ASSIGN                                        ~9      'exist'
         15      > JMP                                                      ->17
         16    >   QM_ASSIGN                                        ~9      'not+exist'
         17    >   CONCAT                                           ~10     'finally+block%2C+object+', ~9
         18        CONCAT                                           ~11     ~10, '%0A'
         19        ECHO                                                     ~11
         20      > FAST_RET                                                 
   28    21    >   ECHO                                                     '%3C%3C+script+end+%3E%3E%0A'
         22      > RETURN                                                   1

Class ClassName:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 108) Position 1 = -2
filename:       /in/a3GaS
function name:  __construct
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   ECHO                                                     'object+begin%0A'
    8     1        NEW                                              $0      'Exception'
          2        SEND_VAL_EX                                              '%21%21+Exception+%21%21'
          3        DO_FCALL                                      0          
          4      > THROW                                         0          $0
    9     5*       ECHO                                                     'object+after+thow%0A'
   10     6*     > RETURN                                                   null

End of function __construct

Function __destruct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/a3GaS
function name:  __destruct
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   ECHO                                                     'object+end%0A'
   15     1      > RETURN                                                   null

End of function __destruct

End of class ClassName.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
182.87 ms | 1399 KiB | 13 Q