3v4l.org

run code in 500+ PHP versions simultaneously
<?php function wp_trigger_error( $function_name, $message, $error_level = E_USER_NOTICE ) { if ( '' !== $function_name ) { $message = sprintf( '%s(): %s', $function_name, $message ); } trigger_error( $message, $error_level ); } function test_triggering_error() { wp_trigger_error( __FUNCTION__, 'message should include the function that triggered the error.' ); } wp_trigger_error( '', 'Message should not include the function as this is not within a function scope.' ); test_triggering_error();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/3I4KF
function name:  (null)
number of ops:  7
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   16     0  E >   INIT_FCALL                                                   'wp_trigger_error'
          1        SEND_VAL                                                     ''
          2        SEND_VAL                                                     'Message+should+not+include+the+function+as+this+is+not+within+a+function+scope.'
          3        DO_FCALL                                          0          
   18     4        INIT_FCALL                                                   'test_triggering_error'
          5        DO_FCALL                                          0          
          6      > RETURN                                                       1

Function wp_trigger_error:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 5, Position 2 = 9
Branch analysis from position: 5
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
filename:       /in/3I4KF
function name:  wp_trigger_error
number of ops:  14
compiled vars:  !0 = $function_name, !1 = $message, !2 = $error_level
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   RECV                                                 !0      
          1        RECV                                                 !1      
          2        RECV_INIT                                            !2      <const ast>
    5     3        IS_NOT_IDENTICAL                                             !0, ''
          4      > JMPZ                                                         ~3, ->9
    6     5    >   ROPE_INIT                                         3  ~5      !0
          6        ROPE_ADD                                          1  ~5      ~5, '%28%29%3A+'
          7        ROPE_END                                          2  ~4      ~5, !1
          8        ASSIGN                                                       !1, ~4
    9     9    >   INIT_FCALL                                                   'trigger_error'
         10        SEND_VAR                                                     !1
         11        SEND_VAR                                                     !2
         12        DO_ICALL                                                     
   10    13      > RETURN                                                       null

End of function wp_trigger_error

Function test_triggering_error:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/3I4KF
function name:  test_triggering_error
number of ops:  5
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   13     0  E >   INIT_FCALL                                                   'wp_trigger_error'
          1        SEND_VAL                                                     'test_triggering_error'
          2        SEND_VAL                                                     'message+should+include+the+function+that+triggered+the+error.'
          3        DO_FCALL                                          0          
   14     4      > RETURN                                                       null

End of function test_triggering_error

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
170.87 ms | 1753 KiB | 17 Q