3v4l.org

run code in 500+ PHP versions simultaneously
<?php print "EVAL WITH PARSE ERROR\n"; try { eval("class C { function foo() }"); } catch (\Throwable $e) { print "CAUGHT [" . get_class($e) . "]: " . $e->getMessage() . "\n"; } print "EVAL WITH EMPTY METHOD\n"; try { eval("class C { function foo(); }"); } catch (\Throwable $e) { print "CAUGHT [" . get_class($e) . "]: " . $e->getMessage() . "\n"; } print "EXECUTION COMPLETED\n";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 12
Branch analysis from position: 12
1 jumps found. (Code = 42) Position 1 = 24
Branch analysis from position: 24
1 jumps found. (Code = 62) Position 1 = -2
Found catch point at position: 3
Branch analysis from position: 3
2 jumps found. (Code = 107) Position 1 = 4, Position 2 = -2
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 24
Branch analysis from position: 24
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/YY0Wu
function name:  (null)
number of ops:  26
compiled vars:  !0 = $e
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ECHO                                                         'EVAL+WITH+PARSE+ERROR%0A'
    5     1        INCLUDE_OR_EVAL                                              'class+C+%7B+function+foo%28%29+%7D', EVAL
          2      > JMP                                                          ->12
    7     3  E > > CATCH                                           last         'Throwable'
    8     4    >   GET_CLASS                                            ~2      !0
          5        CONCAT                                               ~3      'CAUGHT+%5B', ~2
          6        CONCAT                                               ~4      ~3, '%5D%3A+'
          7        INIT_METHOD_CALL                                             !0, 'getMessage'
          8        DO_FCALL                                          0  $5      
          9        CONCAT                                               ~6      ~4, $5
         10        CONCAT                                               ~7      ~6, '%0A'
         11        ECHO                                                         ~7
   11    12    >   ECHO                                                         'EVAL+WITH+EMPTY+METHOD%0A'
   13    13        INCLUDE_OR_EVAL                                              'class+C+%7B+function+foo%28%29%3B+%7D', EVAL
         14      > JMP                                                          ->24
   15    15  E > > CATCH                                           last         'Throwable'
   16    16    >   GET_CLASS                                            ~9      !0
         17        CONCAT                                               ~10     'CAUGHT+%5B', ~9
         18        CONCAT                                               ~11     ~10, '%5D%3A+'
         19        INIT_METHOD_CALL                                             !0, 'getMessage'
         20        DO_FCALL                                          0  $12     
         21        CONCAT                                               ~13     ~11, $12
         22        CONCAT                                               ~14     ~13, '%0A'
         23        ECHO                                                         ~14
   19    24    >   ECHO                                                         'EXECUTION+COMPLETED%0A'
         25      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
153.89 ms | 2883 KiB | 8 Q