3v4l.org

run code in 500+ PHP versions simultaneously
<?php function makeClass() { class Foo { public $prop = "Hello World"; } } try { echo (new Foo)->prop; } catch (Throwable $e) { echo $e->getMessage() . "\n"; } makeClass(); try { echo (new Foo)->prop; } catch (Throwable $e) { echo $e->getMessage() . "\n"; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 22
Branch analysis from position: 22
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
1 jumps found. (Code = 42) Position 1 = 22
Branch analysis from position: 22
Found catch point at position: 17
Branch analysis from position: 17
2 jumps found. (Code = 107) Position 1 = 18, Position 2 = -2
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Kpdnu
function name:  (null)
number of ops:  23
compiled vars:  !0 = $e
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   10     0  E >   NEW                                                  $1      'Foo'
          1        DO_FCALL                                          0          
          2        FETCH_OBJ_R                                          ~3      $1, 'prop'
          3        ECHO                                                         ~3
          4      > JMP                                                          ->10
   11     5  E > > CATCH                                           last         'Throwable'
   12     6    >   INIT_METHOD_CALL                                             !0, 'getMessage'
          7        DO_FCALL                                          0  $4      
          8        CONCAT                                               ~5      $4, '%0A'
          9        ECHO                                                         ~5
   15    10    >   INIT_FCALL                                                   'makeclass'
         11        DO_FCALL                                          0          
   18    12        NEW                                                  $7      'Foo'
         13        DO_FCALL                                          0          
         14        FETCH_OBJ_R                                          ~9      $7, 'prop'
         15        ECHO                                                         ~9
         16      > JMP                                                          ->22
   19    17  E > > CATCH                                           last         'Throwable'
   20    18    >   INIT_METHOD_CALL                                             !0, 'getMessage'
         19        DO_FCALL                                          0  $10     
         20        CONCAT                                               ~11     $10, '%0A'
         21        ECHO                                                         ~11
   21    22    > > RETURN                                                       1

Function makeclass:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Kpdnu
function name:  makeClass
number of ops:  2
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    4     0  E >   DECLARE_CLASS                                                'foo'
    7     1      > RETURN                                                       null

End of function makeclass

Class Foo: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
163.48 ms | 2008 KiB | 13 Q