3v4l.org

run code in 300+ 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 = 11
Branch analysis from position: 5
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 11
filename:       /in/3I4KF
function name:  wp_trigger_error
number of ops:  16
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, ->11
    6     5    >   INIT_FCALL                                               'sprintf'
          6        SEND_VAL                                                 '%25s%28%29%3A+%25s'
          7        SEND_VAR                                                 !0
          8        SEND_VAR                                                 !1
          9        DO_ICALL                                         $4      
         10        ASSIGN                                                   !1, $4
    9    11    >   INIT_FCALL                                               'trigger_error'
         12        SEND_VAR                                                 !1
         13        SEND_VAR                                                 !2
         14        DO_ICALL                                                 
   10    15      > 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.0.0


preferences:
160.15 ms | 1437 KiB | 18 Q