3v4l.org

run code in 300+ PHP versions simultaneously
<?php define( 'WP_ADMIN', true ); // Most likely front-end scenario. function is_admin() { if ( isset( $GLOBALS['current_screen'] ) ) { return $GLOBALS['current_screen']->in_admin(); } elseif ( defined( 'WP_ADMIN' ) ) { return WP_ADMIN; } return false; } function wp_is_json_request() { if ( isset( $_SERVER['HTTP_ACCEPT'] ) && wp_is_json_media_type( $_SERVER['HTTP_ACCEPT'] ) ) { return true; } if ( isset( $_SERVER['CONTENT_TYPE'] ) && wp_is_json_media_type( $_SERVER['CONTENT_TYPE'] ) ) { return true; } return false; } function is_multisite() { if ( defined( 'MULTISITE' ) ) { return MULTISITE; } if ( defined( 'SUBDOMAIN_INSTALL' ) || defined( 'VHOST' ) || defined( 'SUNRISE' ) ) { return true; } return false; } function get_option( $what ) { switch ( $what ) : case 'WPLANG': return 'en_US'; endswitch; return false; } function get_locale() { global $locale, $wp_local_package; if ( isset( $locale ) ) { /** This filter is documented in wp-includes/l10n.php */ return apply_filters( 'locale', $locale ); } if ( isset( $wp_local_package ) ) { $locale = $wp_local_package; } // WPLANG was defined in wp-config. if ( defined( 'WPLANG' ) ) { $locale = WPLANG; } // If multisite, check options. if ( is_multisite() ) { // Don't check blog option when installing. if ( wp_installing() ) { $ms_locale = get_site_option( 'WPLANG' ); } else { $ms_locale = get_option( 'WPLANG' ); if ( false === $ms_locale ) { $ms_locale = get_site_option( 'WPLANG' ); } } if ( false !== $ms_locale ) { $locale = $ms_locale; } } else { $db_locale = get_option( 'WPLANG' ); if ( false !== $db_locale ) { $locale = $db_locale; } } if ( empty( $locale ) ) { $locale = 'en_US'; } /** * Filters the locale ID of the WordPress installation. * * @since 1.5.0 * * @param string $locale The locale ID. */ return apply_filters( 'locale', $locale ); } function get_user_locale( $user = 0 ) { $user_object = false; if ( 0 === $user && function_exists( 'wp_get_current_user' ) ) { $user_object = wp_get_current_user(); } elseif ( $user instanceof WP_User ) { $user_object = $user; } elseif ( $user && is_numeric( $user ) ) { $user_object = get_user_by( 'id', $user ); } if ( ! $user_object ) { return get_locale(); } $locale = $user_object->locale; return $locale ? $locale : get_locale(); } function apply_filters( $a, $b ) { return $b; } function sanitize_locale_name( $a ) { // Limit to A-Z, a-z, 0-9, '_', '-'. $sanitized = preg_replace( '/[^A-Za-z0-9_-]/', '', $locale_name ); /** * Filters a sanitized locale name string. * * @since 6.2.1 * * @param string $sanitized The sanitized locale name. * @param string $locale_name The locale name before sanitization. */ return apply_filters( 'sanitize_locale_name', $sanitized, $locale_name ); } function determine_locale_actual() { /** * Filters the locale for the current request prior to the default determination process. * * Using this filter allows to override the default logic, effectively short-circuiting the function. * * @since 5.0.0 * * @param string|null $locale The locale to return and short-circuit. Default null. */ $determined_locale = apply_filters( 'pre_determine_locale', null ); if ( $determined_locale && is_string( $determined_locale ) ) { return $determined_locale; } if ( isset( $GLOBALS['pagenow'] ) && 'wp-login.php' === $GLOBALS['pagenow'] && ( ! empty( $_GET['wp_lang'] ) || ! empty( $_COOKIE['wp_lang'] ) ) ) { if ( ! empty( $_GET['wp_lang'] ) ) { $determined_locale = sanitize_locale_name( $_GET['wp_lang'] ); } else { $determined_locale = sanitize_locale_name( $_COOKIE['wp_lang'] ); } } elseif ( is_admin() || ( isset( $_GET['_locale'] ) && 'user' === $_GET['_locale'] && wp_is_json_request() ) ) { $determined_locale = get_user_locale(); } if ( ! $determined_locale ) { $determined_locale = get_locale(); } /** * Filters the locale for the current request. * * @since 5.0.0 * * @param string $locale The locale. */ return apply_filters( 'determine_locale', $determined_locale ); } function determine_locale_proposed() { /** * Filters the locale for the current request prior to the default determination process. * * Using this filter allows to override the default logic, effectively short-circuiting the function. * * @since 5.0.0 * * @param string|null $locale The locale to return and short-circuit. Default null. */ $determined_locale = apply_filters( 'pre_determine_locale', null ); if ( $determined_locale && is_string( $determined_locale ) ) { return $determined_locale; } if ( is_admin() || ( isset( $_GET['_locale'] ) && 'user' === $_GET['_locale'] && wp_is_json_request() ) ) { $determined_locale = get_user_locale(); } else { $determined_locale = get_locale(); } if ( isset( $GLOBALS['pagenow'] ) && 'wp-login.php' === $GLOBALS['pagenow'] ) { if ( ! empty( $_GET['wp_lang'] ) ) { $determined_locale = sanitize_locale_name( $_GET['wp_lang'] ) ?: $determined_locale; } elseif ( ! empty( $_COOKIE['wp_lang'] ) ) { $determined_locale = sanitize_locale_name( $_COOKIE['wp_lang'] ) ?: $determined_locale; } } /** * Filters the locale for the current request. * * @since 5.0.0 * * @param string $locale The locale. */ return apply_filters( 'determine_locale', $determined_locale ); } determine_locale_actual(); determine_locale_proposed(); $its = 1e5; $t = hrtime(true); for ( $i = 0; $i++ < $its; ) determine_locale_actual(); echo 'current: ', $old = ( hrtime(true)-$t ) / 1e9, "s\n"; $t = hrtime(true); for ( $i = 0; $i++ < $its; ) determine_locale_proposed(); echo 'proposed: ', $new = ( hrtime(true)-$t ) / 1e9, "s\n\n"; printf( 'Proposed is %sx faster', number_format( $old / $new, 2 ) );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 17
Branch analysis from position: 17
2 jumps found. (Code = 44) Position 1 = 20, Position 2 = 15
Branch analysis from position: 20
1 jumps found. (Code = 42) Position 1 = 37
Branch analysis from position: 37
2 jumps found. (Code = 44) Position 1 = 40, Position 2 = 35
Branch analysis from position: 40
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 35
2 jumps found. (Code = 44) Position 1 = 40, Position 2 = 35
Branch analysis from position: 40
Branch analysis from position: 35
Branch analysis from position: 15
2 jumps found. (Code = 44) Position 1 = 20, Position 2 = 15
Branch analysis from position: 20
Branch analysis from position: 15
filename:       /in/kdEQF
function name:  (null)
number of ops:  59
compiled vars:  !0 = $its, !1 = $t, !2 = $i, !3 = $old, !4 = $new
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'define'
          1        SEND_VAL                                                 'WP_ADMIN'
          2        SEND_VAL                                                 <true>
          3        DO_ICALL                                                 
  229     4        INIT_FCALL                                               'determine_locale_actual'
          5        DO_FCALL                                      0          
  230     6        INIT_FCALL                                               'determine_locale_proposed'
          7        DO_FCALL                                      0          
  232     8        ASSIGN                                                   !0, 100000
  233     9        INIT_FCALL                                               'hrtime'
         10        SEND_VAL                                                 <true>
         11        DO_ICALL                                         $9      
         12        ASSIGN                                                   !1, $9
  234    13        ASSIGN                                                   !2, 0
         14      > JMP                                                      ->17
  235    15    >   INIT_FCALL                                               'determine_locale_actual'
         16        DO_FCALL                                      0          
  234    17    >   POST_INC                                         ~13     !2
         18        IS_SMALLER                                               ~13, !0
         19      > JMPNZ                                                    ~14, ->15
  236    20    >   ECHO                                                     'current%3A++'
         21        INIT_FCALL                                               'hrtime'
         22        SEND_VAL                                                 <true>
         23        DO_ICALL                                         $15     
         24        SUB                                              ~16     $15, !1
         25        DIV                                              ~17     ~16, 1.0e+9
         26        ASSIGN                                           ~18     !3, ~17
         27        ECHO                                                     ~18
         28        ECHO                                                     's%0A'
  238    29        INIT_FCALL                                               'hrtime'
         30        SEND_VAL                                                 <true>
         31        DO_ICALL                                         $19     
         32        ASSIGN                                                   !1, $19
  239    33        ASSIGN                                                   !2, 0
         34      > JMP                                                      ->37
  240    35    >   INIT_FCALL                                               'determine_locale_proposed'
         36        DO_FCALL                                      0          
  239    37    >   POST_INC                                         ~23     !2
         38        IS_SMALLER                                               ~23, !0
         39      > JMPNZ                                                    ~24, ->35
  241    40    >   ECHO                                                     'proposed%3A+'
         41        INIT_FCALL                                               'hrtime'
         42        SEND_VAL                                                 <true>
         43        DO_ICALL                                         $25     
         44        SUB                                              ~26     $25, !1
         45        DIV                                              ~27     ~26, 1.0e+9
         46        ASSIGN                                           ~28     !4, ~27
         47        ECHO                                                     ~28
         48        ECHO                                                     's%0A%0A'
  243    49        INIT_FCALL                                               'printf'
         50        SEND_VAL                                                 'Proposed+is+%25sx+faster'
         51        INIT_FCALL                                               'number_format'
         52        DIV                                              ~29     !3, !4
         53        SEND_VAL                                                 ~29
         54        SEND_VAL                                                 2
         55        DO_ICALL                                         $30     
         56        SEND_VAR                                                 $30
         57        DO_ICALL                                                 
         58      > RETURN                                                   1

Function is_admin:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 2, Position 2 = 7
Branch analysis from position: 2
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
2 jumps found. (Code = 43) Position 1 = 9, Position 2 = 11
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/kdEQF
function name:  is_admin
number of ops:  13
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   ISSET_ISEMPTY_VAR                             2          'current_screen'
          1      > JMPZ                                                     ~0, ->7
    9     2    >   FETCH_R                      global              ~1      'current_screen'
          3        INIT_METHOD_CALL                                         ~1, 'in_admin'
          4        DO_FCALL                                      0  $2      
          5      > RETURN                                                   $2
    8     6*       JMP                                                      ->11
   10     7    >   DEFINED                                                  'WP_ADMIN'
          8      > JMPZ                                                     ~3, ->11
   11     9    >   FETCH_CONSTANT                                   ~4      'WP_ADMIN'
         10      > RETURN                                                   ~4
   14    11    > > RETURN                                                   <false>
   15    12*     > RETURN                                                   null

End of function is_admin

Function wp_is_json_request:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 3, Position 2 = 10
Branch analysis from position: 3
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 12
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 12
2 jumps found. (Code = 46) Position 1 = 15, Position 2 = 22
Branch analysis from position: 15
2 jumps found. (Code = 43) Position 1 = 23, Position 2 = 24
Branch analysis from position: 23
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 24
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 22
Branch analysis from position: 10
filename:       /in/kdEQF
function name:  wp_is_json_request
number of ops:  26
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   FETCH_IS                                         ~0      '_SERVER'
          1        ISSET_ISEMPTY_DIM_OBJ                         0  ~1      ~0, 'HTTP_ACCEPT'
          2      > JMPZ_EX                                          ~1      ~1, ->10
          3    >   INIT_FCALL_BY_NAME                                       'wp_is_json_media_type'
          4        CHECK_FUNC_ARG                                           
          5        FETCH_FUNC_ARG               global              $2      '_SERVER'
          6        FETCH_DIM_FUNC_ARG                               $3      $2, 'HTTP_ACCEPT'
          7        SEND_FUNC_ARG                                            $3
          8        DO_FCALL                                      0  $4      
          9        BOOL                                             ~1      $4
         10    > > JMPZ                                                     ~1, ->12
   19    11    > > RETURN                                                   <true>
   22    12    >   FETCH_IS                                         ~5      '_SERVER'
         13        ISSET_ISEMPTY_DIM_OBJ                         0  ~6      ~5, 'CONTENT_TYPE'
         14      > JMPZ_EX                                          ~6      ~6, ->22
         15    >   INIT_FCALL_BY_NAME                                       'wp_is_json_media_type'
         16        CHECK_FUNC_ARG                                           
         17        FETCH_FUNC_ARG               global              $7      '_SERVER'
         18        FETCH_DIM_FUNC_ARG                               $8      $7, 'CONTENT_TYPE'
         19        SEND_FUNC_ARG                                            $8
         20        DO_FCALL                                      0  $9      
         21        BOOL                                             ~6      $9
         22    > > JMPZ                                                     ~6, ->24
   23    23    > > RETURN                                                   <true>
   26    24    > > RETURN                                                   <false>
   27    25*     > RETURN                                                   null

End of function wp_is_json_request

Function is_multisite:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 2, Position 2 = 4
Branch analysis from position: 2
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 4
2 jumps found. (Code = 47) Position 1 = 6, Position 2 = 8
Branch analysis from position: 6
2 jumps found. (Code = 47) Position 1 = 9, Position 2 = 11
Branch analysis from position: 9
2 jumps found. (Code = 43) Position 1 = 12, Position 2 = 13
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 11
Branch analysis from position: 8
filename:       /in/kdEQF
function name:  is_multisite
number of ops:  15
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   31     0  E >   DEFINED                                                  'MULTISITE'
          1      > JMPZ                                                     ~0, ->4
   32     2    >   FETCH_CONSTANT                                   ~1      'MULTISITE'
          3      > RETURN                                                   ~1
   35     4    >   DEFINED                                          ~2      'SUBDOMAIN_INSTALL'
          5      > JMPNZ_EX                                         ~2      ~2, ->8
          6    >   DEFINED                                          ~3      'VHOST'
          7        BOOL                                             ~2      ~3
          8    > > JMPNZ_EX                                         ~2      ~2, ->11
          9    >   DEFINED                                          ~4      'SUNRISE'
         10        BOOL                                             ~2      ~4
         11    > > JMPZ                                                     ~2, ->13
   36    12    > > RETURN                                                   <true>
   39    13    > > RETURN                                                   <false>
   40    14*     > RETURN                                                   null

End of function is_multisite

Function get_option:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 44) Position 1 = 3, Position 2 = 4
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 5
Branch analysis from position: 5
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 4
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/kdEQF
function name:  get_option
number of ops:  7
compiled vars:  !0 = $what
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   42     0  E >   RECV                                             !0      
   44     1        IS_EQUAL                                                 !0, 'WPLANG'
          2      > JMPNZ                                                    ~1, ->4
          3    > > JMP                                                      ->5
   45     4    > > RETURN                                                   'en_US'
   48     5    > > RETURN                                                   <false>
   49     6*     > RETURN                                                   null

End of function get_option

Function get_locale:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 9
Branch analysis from position: 4
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 12
Branch analysis from position: 11
2 jumps found. (Code = 43) Position 1 = 14, Position 2 = 16
Branch analysis from position: 14
2 jumps found. (Code = 43) Position 1 = 19, Position 2 = 41
Branch analysis from position: 19
2 jumps found. (Code = 43) Position 1 = 22, Position 2 = 27
Branch analysis from position: 22
1 jumps found. (Code = 42) Position 1 = 37
Branch analysis from position: 37
2 jumps found. (Code = 43) Position 1 = 39, Position 2 = 40
Branch analysis from position: 39
1 jumps found. (Code = 42) Position 1 = 48
Branch analysis from position: 48
2 jumps found. (Code = 43) Position 1 = 50, Position 2 = 51
Branch analysis from position: 50
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 51
Branch analysis from position: 40
Branch analysis from position: 27
2 jumps found. (Code = 43) Position 1 = 33, Position 2 = 37
Branch analysis from position: 33
2 jumps found. (Code = 43) Position 1 = 39, Position 2 = 40
Branch analysis from position: 39
Branch analysis from position: 40
Branch analysis from position: 37
Branch analysis from position: 41
2 jumps found. (Code = 43) Position 1 = 47, Position 2 = 48
Branch analysis from position: 47
2 jumps found. (Code = 43) Position 1 = 50, Position 2 = 51
Branch analysis from position: 50
Branch analysis from position: 51
Branch analysis from position: 48
Branch analysis from position: 16
Branch analysis from position: 12
filename:       /in/kdEQF
function name:  get_locale
number of ops:  57
compiled vars:  !0 = $locale, !1 = $wp_local_package, !2 = $ms_locale, !3 = $db_locale
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   52     0  E >   BIND_GLOBAL                                              !0, 'locale'
          1        BIND_GLOBAL                                              !1, 'wp_local_package'
   54     2        ISSET_ISEMPTY_CV                                         !0
          3      > JMPZ                                                     ~4, ->9
   56     4    >   INIT_FCALL_BY_NAME                                       'apply_filters'
          5        SEND_VAL_EX                                              'locale'
          6        SEND_VAR_EX                                              !0
          7        DO_FCALL                                      0  $5      
          8      > RETURN                                                   $5
   59     9    >   ISSET_ISEMPTY_CV                                         !1
         10      > JMPZ                                                     ~6, ->12
   60    11    >   ASSIGN                                                   !0, !1
   64    12    >   DEFINED                                                  'WPLANG'
         13      > JMPZ                                                     ~8, ->16
   65    14    >   FETCH_CONSTANT                                   ~9      'WPLANG'
         15        ASSIGN                                                   !0, ~9
   69    16    >   INIT_FCALL                                               'is_multisite'
         17        DO_FCALL                                      0  $11     
         18      > JMPZ                                                     $11, ->41
   71    19    >   INIT_FCALL_BY_NAME                                       'wp_installing'
         20        DO_FCALL                                      0  $12     
         21      > JMPZ                                                     $12, ->27
   72    22    >   INIT_FCALL_BY_NAME                                       'get_site_option'
         23        SEND_VAL_EX                                              'WPLANG'
         24        DO_FCALL                                      0  $13     
         25        ASSIGN                                                   !2, $13
   71    26      > JMP                                                      ->37
   74    27    >   INIT_FCALL                                               'get_option'
         28        SEND_VAL                                                 'WPLANG'
         29        DO_FCALL                                      0  $15     
         30        ASSIGN                                                   !2, $15
   75    31        TYPE_CHECK                                    4          !2
         32      > JMPZ                                                     ~17, ->37
   76    33    >   INIT_FCALL_BY_NAME                                       'get_site_option'
         34        SEND_VAL_EX                                              'WPLANG'
         35        DO_FCALL                                      0  $18     
         36        ASSIGN                                                   !2, $18
   80    37    >   TYPE_CHECK                                  1018          !2
         38      > JMPZ                                                     ~20, ->40
   81    39    >   ASSIGN                                                   !0, !2
   69    40    > > JMP                                                      ->48
   84    41    >   INIT_FCALL                                               'get_option'
         42        SEND_VAL                                                 'WPLANG'
         43        DO_FCALL                                      0  $22     
         44        ASSIGN                                                   !3, $22
   85    45        TYPE_CHECK                                  1018          !3
         46      > JMPZ                                                     ~24, ->48
   86    47    >   ASSIGN                                                   !0, !3
   90    48    >   ISSET_ISEMPTY_CV                                         !0
         49      > JMPZ                                                     ~26, ->51
   91    50    >   ASSIGN                                                   !0, 'en_US'
  101    51    >   INIT_FCALL_BY_NAME                                       'apply_filters'
         52        SEND_VAL_EX                                              'locale'
         53        SEND_VAR_EX                                              !0
         54        DO_FCALL                                      0  $28     
         55      > RETURN                                                   $28
  102    56*     > RETURN                                                   null

End of function get_locale

Function get_user_locale:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 4, Position 2 = 8
Branch analysis from position: 4
2 jumps found. (Code = 43) Position 1 = 9, Position 2 = 13
Branch analysis from position: 9
1 jumps found. (Code = 42) Position 1 = 28
Branch analysis from position: 28
2 jumps found. (Code = 43) Position 1 = 30, Position 2 = 33
Branch analysis from position: 30
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 33
2 jumps found. (Code = 43) Position 1 = 36, Position 2 = 38
Branch analysis from position: 36
1 jumps found. (Code = 42) Position 1 = 41
Branch analysis from position: 41
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 38
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 13
2 jumps found. (Code = 43) Position 1 = 15, Position 2 = 17
Branch analysis from position: 15
1 jumps found. (Code = 42) Position 1 = 28
Branch analysis from position: 28
Branch analysis from position: 17
2 jumps found. (Code = 46) Position 1 = 18, Position 2 = 22
Branch analysis from position: 18
2 jumps found. (Code = 43) Position 1 = 23, Position 2 = 28
Branch analysis from position: 23
2 jumps found. (Code = 43) Position 1 = 30, Position 2 = 33
Branch analysis from position: 30
Branch analysis from position: 33
Branch analysis from position: 28
Branch analysis from position: 22
Branch analysis from position: 8
filename:       /in/kdEQF
function name:  get_user_locale
number of ops:  43
compiled vars:  !0 = $user, !1 = $user_object, !2 = $locale
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  103     0  E >   RECV_INIT                                        !0      0
  104     1        ASSIGN                                                   !1, <false>
  106     2        IS_IDENTICAL                                     ~4      !0, 0
          3      > JMPZ_EX                                          ~4      ~4, ->8
          4    >   INIT_FCALL                                               'function_exists'
          5        SEND_VAL                                                 'wp_get_current_user'
          6        DO_ICALL                                         $5      
          7        BOOL                                             ~4      $5
          8    > > JMPZ                                                     ~4, ->13
  107     9    >   INIT_FCALL_BY_NAME                                       'wp_get_current_user'
         10        DO_FCALL                                      0  $6      
         11        ASSIGN                                                   !1, $6
  106    12      > JMP                                                      ->28
  108    13    >   INSTANCEOF                                               !0, 'WP_User'
         14      > JMPZ                                                     ~8, ->17
  109    15    >   ASSIGN                                                   !1, !0
  108    16      > JMP                                                      ->28
  110    17    > > JMPZ_EX                                          ~10     !0, ->22
         18    >   INIT_FCALL                                               'is_numeric'
         19        SEND_VAR                                                 !0
         20        DO_ICALL                                         $11     
         21        BOOL                                             ~10     $11
         22    > > JMPZ                                                     ~10, ->28
  111    23    >   INIT_FCALL_BY_NAME                                       'get_user_by'
         24        SEND_VAL_EX                                              'id'
         25        SEND_VAR_EX                                              !0
         26        DO_FCALL                                      0  $12     
         27        ASSIGN                                                   !1, $12
  114    28    >   BOOL_NOT                                         ~14     !1
         29      > JMPZ                                                     ~14, ->33
  115    30    >   INIT_FCALL                                               'get_locale'
         31        DO_FCALL                                      0  $15     
         32      > RETURN                                                   $15
  118    33    >   FETCH_OBJ_R                                      ~16     !1, 'locale'
         34        ASSIGN                                                   !2, ~16
  120    35      > JMPZ                                                     !2, ->38
         36    >   QM_ASSIGN                                        ~18     !2
         37      > JMP                                                      ->41
         38    >   INIT_FCALL                                               'get_locale'
         39        DO_FCALL                                      0  $19     
         40        QM_ASSIGN                                        ~18     $19
         41    > > RETURN                                                   ~18
  121    42*     > RETURN                                                   null

End of function get_user_locale

Function apply_filters:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/kdEQF
function name:  apply_filters
number of ops:  4
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  122     0  E >   RECV                                             !0      
          1        RECV                                             !1      
  123     2      > RETURN                                                   !1
  124     3*     > RETURN                                                   null

End of function apply_filters

Function sanitize_locale_name:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/kdEQF
function name:  sanitize_locale_name
number of ops:  14
compiled vars:  !0 = $a, !1 = $sanitized, !2 = $locale_name
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  125     0  E >   RECV                                             !0      
  127     1        INIT_FCALL                                               'preg_replace'
          2        SEND_VAL                                                 '%2F%5B%5EA-Za-z0-9_-%5D%2F'
          3        SEND_VAL                                                 ''
          4        SEND_VAR                                                 !2
          5        DO_ICALL                                         $3      
          6        ASSIGN                                                   !1, $3
  137     7        INIT_FCALL                                               'apply_filters'
          8        SEND_VAL                                                 'sanitize_locale_name'
          9        SEND_VAR                                                 !1
         10        SEND_VAR                                                 !2
         11        DO_FCALL                                      0  $5      
         12      > RETURN                                                   $5
  138    13*     > RETURN                                                   null

End of function sanitize_locale_name

Function determine_locale_actual:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 6, Position 2 = 8
Branch analysis from position: 6
2 jumps found. (Code = 43) Position 1 = 9, Position 2 = 10
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
2 jumps found. (Code = 46) Position 1 = 12, Position 2 = 15
Branch analysis from position: 12
2 jumps found. (Code = 46) Position 1 = 16, Position 2 = 25
Branch analysis from position: 16
2 jumps found. (Code = 47) Position 1 = 20, Position 2 = 24
Branch analysis from position: 20
2 jumps found. (Code = 43) Position 1 = 26, Position 2 = 44
Branch analysis from position: 26
2 jumps found. (Code = 43) Position 1 = 30, Position 2 = 37
Branch analysis from position: 30
1 jumps found. (Code = 42) Position 1 = 43
Branch analysis from position: 43
1 jumps found. (Code = 42) Position 1 = 63
Branch analysis from position: 63
2 jumps found. (Code = 43) Position 1 = 65, Position 2 = 68
Branch analysis from position: 65
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 68
Branch analysis from position: 37
1 jumps found. (Code = 42) Position 1 = 63
Branch analysis from position: 63
Branch analysis from position: 44
2 jumps found. (Code = 47) Position 1 = 47, Position 2 = 59
Branch analysis from position: 47
2 jumps found. (Code = 46) Position 1 = 50, Position 2 = 54
Branch analysis from position: 50
2 jumps found. (Code = 46) Position 1 = 55, Position 2 = 58
Branch analysis from position: 55
2 jumps found. (Code = 43) Position 1 = 60, Position 2 = 63
Branch analysis from position: 60
2 jumps found. (Code = 43) Position 1 = 65, Position 2 = 68
Branch analysis from position: 65
Branch analysis from position: 68
Branch analysis from position: 63
Branch analysis from position: 58
Branch analysis from position: 54
Branch analysis from position: 59
Branch analysis from position: 24
Branch analysis from position: 25
Branch analysis from position: 15
Branch analysis from position: 8
filename:       /in/kdEQF
function name:  determine_locale_actual
number of ops:  74
compiled vars:  !0 = $determined_locale
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  150     0  E >   INIT_FCALL                                               'apply_filters'
          1        SEND_VAL                                                 'pre_determine_locale'
          2        SEND_VAL                                                 null
          3        DO_FCALL                                      0  $1      
          4        ASSIGN                                                   !0, $1
  152     5      > JMPZ_EX                                          ~3      !0, ->8
          6    >   TYPE_CHECK                                   64  ~4      !0
          7        BOOL                                             ~3      ~4
          8    > > JMPZ                                                     ~3, ->10
  153     9    > > RETURN                                                   !0
  157    10    >   ISSET_ISEMPTY_VAR                             2  ~5      'pagenow'
         11      > JMPZ_EX                                          ~5      ~5, ->15
         12    >   FETCH_R                      global              ~6      'pagenow'
         13        IS_IDENTICAL                                     ~7      ~

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
167.17 ms | 1468 KiB | 31 Q