3v4l.org

run code in 300+ PHP versions simultaneously
<?php function log_error($num, $str, $file, $line, $context = null) { throw new ErrorException( $str, 0, $num, $file, $line ); } set_error_handler('log_error'); ob_start(); file_put_contents('test.php', '<?php /*'); $out = php_strip_whitespace('test.php'); unlink('test.php'); var_dump(ob_get_clean(), $out);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/UO5Ho
function name:  (null)
number of ops:  23
compiled vars:  !0 = $out
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   INIT_FCALL                                               'set_error_handler'
          1        SEND_VAL                                                 'log_error'
          2        DO_ICALL                                                 
    7     3        INIT_FCALL                                               'ob_start'
          4        DO_ICALL                                                 
    9     5        INIT_FCALL                                               'file_put_contents'
          6        SEND_VAL                                                 'test.php'
          7        SEND_VAL                                                 '%3C%3Fphp+%2F%2A'
          8        DO_ICALL                                                 
   10     9        INIT_FCALL                                               'php_strip_whitespace'
         10        SEND_VAL                                                 'test.php'
         11        DO_ICALL                                         $4      
         12        ASSIGN                                                   !0, $4
   11    13        INIT_FCALL                                               'unlink'
         14        SEND_VAL                                                 'test.php'
         15        DO_ICALL                                                 
   13    16        INIT_FCALL                                               'var_dump'
         17        INIT_FCALL                                               'ob_get_clean'
         18        DO_ICALL                                         $7      
         19        SEND_VAR                                                 $7
         20        SEND_VAR                                                 !0
         21        DO_ICALL                                                 
         22      > RETURN                                                   1

Function log_error:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 108) Position 1 = -2
filename:       /in/UO5Ho
function name:  log_error
number of ops:  14
compiled vars:  !0 = $num, !1 = $str, !2 = $file, !3 = $line, !4 = $context
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV                                             !2      
          3        RECV                                             !3      
          4        RECV_INIT                                        !4      null
    4     5        NEW                                              $5      'ErrorException'
          6        SEND_VAR_EX                                              !1
          7        SEND_VAL_EX                                              0
          8        SEND_VAR_EX                                              !0
          9        SEND_VAR_EX                                              !2
         10        SEND_VAR_EX                                              !3
         11        DO_FCALL                                      0          
         12      > THROW                                         0          $5
    5    13*     > RETURN                                                   null

End of function log_error

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.56 ms | 1396 KiB | 27 Q