3v4l.org

run code in 300+ PHP versions simultaneously
<?php $mem = fopen('php://temp', 'w'); fwrite($mem, '<?php echo "boo!\n"; $foo = "foo" $bar; foo();'); fclose($mem); try { require('php://temp'); } catch (throwable $e) { var_dump($e); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 18
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
Found catch point at position: 14
Branch analysis from position: 14
2 jumps found. (Code = 107) Position 1 = 15, Position 2 = -2
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Bk284
function name:  (null)
number of ops:  19
compiled vars:  !0 = $mem, !1 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'fopen'
          1        SEND_VAL                                                 'php%3A%2F%2Ftemp'
          2        SEND_VAL                                                 'w'
          3        DO_ICALL                                         $2      
          4        ASSIGN                                                   !0, $2
    4     5        INIT_FCALL                                               'fwrite'
          6        SEND_VAR                                                 !0
          7        SEND_VAL                                                 '%3C%3Fphp+echo+%22boo%21%5Cn%22%3B+%24foo+%3D+%22foo%22+%24bar%3B+foo%28%29%3B'
          8        DO_ICALL                                                 
    5     9        INIT_FCALL                                               'fclose'
         10        SEND_VAR                                                 !0
         11        DO_ICALL                                                 
    8    12        INCLUDE_OR_EVAL                                          'php%3A%2F%2Ftemp', REQUIRE
         13      > JMP                                                      ->18
    9    14  E > > CATCH                                       last         'throwable'
   10    15    >   INIT_FCALL                                               'var_dump'
         16        SEND_VAR                                                 !1
         17        DO_ICALL                                                 
   11    18    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
143.95 ms | 1395 KiB | 21 Q