3v4l.org

run code in 500+ PHP versions simultaneously
<?php class C { public static string $prop; } try { var_dump(C::$prop); } catch (Error $e) { echo $e->getMessage(), "\n"; } try { var_dump(C::$nonExistent); } catch (Error $e) { echo $e->getMessage(), "\n"; } var_dump(C::$prop ?? 'default'); var_dump(C::$nonExistent ?? 'default');
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 = 20
Branch analysis from position: 20
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 = 20
Branch analysis from position: 20
Found catch point at position: 15
Branch analysis from position: 15
2 jumps found. (Code = 107) Position 1 = 16, Position 2 = -2
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/S3mf8
function name:  (null)
number of ops:  33
compiled vars:  !0 = $e
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    8     0  E >   INIT_FCALL                                                   'var_dump'
          1        FETCH_STATIC_PROP_R              global lock         ~1      'prop'
          2        SEND_VAL                                                     ~1
          3        DO_ICALL                                                     
          4      > JMP                                                          ->10
    9     5  E > > CATCH                                           last         'Error'
   10     6    >   INIT_METHOD_CALL                                             !0, 'getMessage'
          7        DO_FCALL                                          0  $3      
          8        ECHO                                                         $3
          9        ECHO                                                         '%0A'
   14    10    >   INIT_FCALL                                                   'var_dump'
         11        FETCH_STATIC_PROP_R              unknown             ~4      'nonExistent'
         12        SEND_VAL                                                     ~4
         13        DO_ICALL                                                     
         14      > JMP                                                          ->20
   15    15  E > > CATCH                                           last         'Error'
   16    16    >   INIT_METHOD_CALL                                             !0, 'getMessage'
         17        DO_FCALL                                          0  $6      
         18        ECHO                                                         $6
         19        ECHO                                                         '%0A'
   19    20    >   INIT_FCALL                                                   'var_dump'
         21        FETCH_STATIC_PROP_IS                                 ~7      'prop', 'C'
         22        COALESCE                                             ~8      ~7
         23        QM_ASSIGN                                            ~8      'default'
         24        SEND_VAL                                                     ~8
         25        DO_ICALL                                                     
   21    26        INIT_FCALL                                                   'var_dump'
         27        FETCH_STATIC_PROP_IS                                 ~10     'nonExistent', 'C'
         28        COALESCE                                             ~11     ~10
         29        QM_ASSIGN                                            ~11     'default'
         30        SEND_VAL                                                     ~11
         31        DO_ICALL                                                     
         32      > RETURN                                                       1

Class C: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
160.62 ms | 1463 KiB | 14 Q