3v4l.org

run code in 300+ PHP versions simultaneously
<?php function t35_handler($no, $msg){ echo __LINE__.__METHOD__."\n"; restore_error_handler(); echo __LINE__.__METHOD__."\n"; } function t35(){ echo "old handler=".set_error_handler("t35_handler")."\n"; trigger_error("error1"); echo "old handler=".set_error_handler("t35_handler")."\n"; trigger_error("error2"); } t35(); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/JC4kH
function name:  (null)
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   INIT_FCALL                                               't35'
          1        DO_FCALL                                      0          
   18     2      > RETURN                                                   1

Function t35_handler:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/JC4kH
function name:  t35_handler
number of ops:  7
compiled vars:  !0 = $no, !1 = $msg
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    4     2        ECHO                                                     '4t35_handler%0A'
    5     3        INIT_FCALL                                               'restore_error_handler'
          4        DO_ICALL                                                 
    6     5        ECHO                                                     '6t35_handler%0A'
    7     6      > RETURN                                                   null

End of function t35_handler

Function t35:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/JC4kH
function name:  t35
number of ops:  19
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   INIT_FCALL                                               'set_error_handler'
          1        SEND_VAL                                                 't35_handler'
          2        DO_ICALL                                         $0      
          3        CONCAT                                           ~1      'old+handler%3D', $0
          4        CONCAT                                           ~2      ~1, '%0A'
          5        ECHO                                                     ~2
   10     6        INIT_FCALL                                               'trigger_error'
          7        SEND_VAL                                                 'error1'
          8        DO_ICALL                                                 
   11     9        INIT_FCALL                                               'set_error_handler'
         10        SEND_VAL                                                 't35_handler'
         11        DO_ICALL                                         $4      
         12        CONCAT                                           ~5      'old+handler%3D', $4
         13        CONCAT                                           ~6      ~5, '%0A'
         14        ECHO                                                     ~6
   12    15        INIT_FCALL                                               'trigger_error'
         16        SEND_VAL                                                 'error2'
         17        DO_ICALL                                                 
   13    18      > RETURN                                                   null

End of function t35

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.99 ms | 1399 KiB | 20 Q