3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { static function register() { set_error_handler('static::handleError'); } static function handleError() { echo 'ERROR!!!'; } } Foo::register(); assert(is_string(null));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/nuDsa
function name:  (null)
number of ops:  9
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   INIT_STATIC_METHOD_CALL                                  'Foo', 'register'
          1        DO_FCALL                                      0          
   16     2        ASSERT_CHECK                                             
          3        INIT_FCALL                                               'assert'
          4        TYPE_CHECK                                   64  ~1      null
          5        SEND_VAL                                                 ~1
          6        SEND_VAL                                                 'assert%28is_string%28null%29%29'
          7        DO_ICALL                                                 
          8      > RETURN                                                   1

Class Foo:
Function register:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/nuDsa
function name:  register
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   INIT_FCALL                                               'set_error_handler'
          1        SEND_VAL                                                 'static%3A%3AhandleError'
          2        DO_ICALL                                                 
    7     3      > RETURN                                                   null

End of function register

Function handleerror:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/nuDsa
function name:  handleError
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   ECHO                                                     'ERROR%21%21%21'
   11     1      > RETURN                                                   null

End of function handleerror

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
167.89 ms | 1395 KiB | 17 Q