3v4l.org

run code in 300+ PHP versions simultaneously
<?php // First, some magic! function custom_error_handler($level, $message, $file = '', $line = 0, $context = array()) { if (error_reporting() & $level) { throw new Exception($message, 0, $level, $file, $line); } } set_error_handler('custom_error_handler'); error_reporting(0); // Yeah, not the best solution class SomeClass {} function test(SomeClass $instance) { echo 'wtf: '.$instance; } // NOTE: E_RECOVERABLE_ERROR (4096) occurs here test(1);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/sYMNC
function name:  (null)
number of ops:  10
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   INIT_FCALL                                               'set_error_handler'
          1        SEND_VAL                                                 'custom_error_handler'
          2        DO_ICALL                                                 
   14     3        INIT_FCALL                                               'error_reporting'
          4        SEND_VAL                                                 0
          5        DO_ICALL                                                 
   23     6        INIT_FCALL                                               'test'
          7        SEND_VAL                                                 1
          8        DO_FCALL                                      0          
          9      > RETURN                                                   1

Function custom_error_handler:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 9, Position 2 = 17
Branch analysis from position: 9
1 jumps found. (Code = 108) Position 1 = -2
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/sYMNC
function name:  custom_error_handler
number of ops:  18
compiled vars:  !0 = $level, !1 = $message, !2 = $file, !3 = $line, !4 = $context
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV_INIT                                        !2      ''
          3        RECV_INIT                                        !3      0
          4        RECV_INIT                                        !4      <array>
    6     5        INIT_FCALL                                               'error_reporting'
          6        DO_ICALL                                         $5      
          7        BW_AND                                           ~6      !0, $5
          8      > JMPZ                                                     ~6, ->17
    8     9    >   NEW                                              $7      'Exception'
         10        SEND_VAR_EX                                              !1
         11        SEND_VAL_EX                                              0
         12        SEND_VAR_EX                                              !0
         13        SEND_VAR_EX                                              !2
         14        SEND_VAR_EX                                              !3
         15        DO_FCALL                                      0          
         16      > THROW                                         0          $7
   10    17    > > RETURN                                                   null

End of function custom_error_handler

Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/sYMNC
function name:  test
number of ops:  4
compiled vars:  !0 = $instance
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   19     0  E >   RECV                                             !0      
          1        CONCAT                                           ~1      'wtf%3A+', !0
          2        ECHO                                                     ~1
          3      > RETURN                                                   null

End of function test

Class SomeClass: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.47 ms | 1403 KiB | 18 Q