3v4l.org

run code in 300+ PHP versions simultaneously
<?php set_error_handler(function($no, $str, $file, $line) { throw new ErrorException($str, 0, $no, $file, $line); }); set_exception_handler(function(\Exception $e) { echo "Halp! I cant rite teh codez: " . $e->getMessage() . "\n" . $e->getTraceAsString() . "\n"; }); function crappy_codez() { trigger_error("You dun made a mistaek", E_USER_WARNING); } echo "La-di-dah, off I go to do something\n"; crappy_codez(); echo "F*ck it, that'll do, I'm off down the pub";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/5joMY
function name:  (null)
number of ops:  13
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'set_error_handler'
          1        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2F5joMY%3A3%240'
    5     2        SEND_VAL                                                 ~0
          3        DO_ICALL                                                 
    7     4        INIT_FCALL                                               'set_exception_handler'
          5        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2F5joMY%3A7%241'
    9     6        SEND_VAL                                                 ~2
          7        DO_ICALL                                                 
   16     8        ECHO                                                     'La-di-dah%2C+off+I+go+to+do+something%0A'
   17     9        INIT_FCALL                                               'crappy_codez'
         10        DO_FCALL                                      0          
   18    11        ECHO                                                     'F%2Ack+it%2C+that%27ll+do%2C+I%27m+off+down+the+pub'
         12      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2F5joMY%3A3%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 108) Position 1 = -2
filename:       /in/5joMY
function name:  {closure}
number of ops:  13
compiled vars:  !0 = $no, !1 = $str, !2 = $file, !3 = $line
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV                                             !2      
          3        RECV                                             !3      
    4     4        NEW                                              $4      'ErrorException'
          5        SEND_VAR_EX                                              !1
          6        SEND_VAL_EX                                              0
          7        SEND_VAR_EX                                              !0
          8        SEND_VAR_EX                                              !2
          9        SEND_VAR_EX                                              !3
         10        DO_FCALL                                      0          
         11      > THROW                                         0          $4
    5    12*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2F5joMY%3A3%240

Function %00%7Bclosure%7D%2Fin%2F5joMY%3A7%241:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/5joMY
function name:  {closure}
number of ops:  11
compiled vars:  !0 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
    8     1        INIT_METHOD_CALL                                         !0, 'getMessage'
          2        DO_FCALL                                      0  $1      
          3        CONCAT                                           ~2      'Halp%21+I+cant+rite+teh+codez%3A+', $1
          4        CONCAT                                           ~3      ~2, '%0A'
          5        INIT_METHOD_CALL                                         !0, 'getTraceAsString'
          6        DO_FCALL                                      0  $4      
          7        CONCAT                                           ~5      ~3, $4
          8        CONCAT                                           ~6      ~5, '%0A'
          9        ECHO                                                     ~6
    9    10      > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2F5joMY%3A7%241

Function crappy_codez:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/5joMY
function name:  crappy_codez
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   INIT_FCALL                                               'trigger_error'
          1        SEND_VAL                                                 'You+dun+made+a+mistaek'
          2        SEND_VAL                                                 512
          3        DO_ICALL                                                 
   14     4      > RETURN                                                   null

End of function crappy_codez

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152 ms | 1403 KiB | 20 Q