3v4l.org

run code in 500+ 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'] ); } } else if ( ( isset( $_GET['_locale'] ) && 'user' === $_GET['_locale'] && wp_is_json_request() ) || is_admin() ) { $determined_locale = get_user_locale(); } else { $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/UMJj3
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                                                     
  226     4        INIT_FCALL                                                   'determine_locale_actual'
          5        DO_FCALL                                          0          
  227     6        INIT_FCALL                                                   'determine_locale_proposed'
          7        DO_FCALL                                          0          
  229     8        ASSIGN                                                       !0, 100000
  230     9        INIT_FCALL                                                   'hrtime'
         10        SEND_VAL                                                     <true>
         11        DO_ICALL                                             $9      
         12        ASSIGN                                                       !1, $9
  231    13        ASSIGN                                                       !2, 0
         14      > JMP                                                          ->17
  232    15    >   INIT_FCALL                                                   'determine_locale_actual'
         16        DO_FCALL                                          0          
  231    17    >   POST_INC                                             ~13     !2
         18        IS_SMALLER                                                   ~13, !0
         19      > JMPNZ                                                        ~14, ->15
  233    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'
  235    29        INIT_FCALL                                                   'hrtime'
         30        SEND_VAL                                                     <true>
         31        DO_ICALL                                             $19     
         32        ASSIGN                                                       !1, $19
  236    33        ASSIGN                                                       !2, 0
         34      > JMP                                                          ->37
  237    35    >   INIT_FCALL                                                   'determine_locale_proposed'
         36        DO_FCALL                                          0          
  236    37    >   POST_INC                                             ~23     !2
         38        IS_SMALLER                                                   ~23, !0
         39      > JMPNZ                                                        ~24, ->35
  238    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'
  240    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/UMJj3
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/UMJj3
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/UMJj3
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/UMJj3
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/UMJj3
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 = 26
Branch analysis from position: 26
2 jumps found. (Code = 43) Position 1 = 28, Position 2 = 31
Branch analysis from position: 28
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 31
2 jumps found. (Code = 43) Position 1 = 34, Position 2 = 36
Branch analysis from position: 34
1 jumps found. (Code = 42) Position 1 = 39
Branch analysis from position: 39
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 36
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 = 26
Branch analysis from position: 26
Branch analysis from position: 17
2 jumps found. (Code = 46) Position 1 = 18, Position 2 = 20
Branch analysis from position: 18
2 jumps found. (Code = 43) Position 1 = 21, Position 2 = 26
Branch analysis from position: 21
2 jumps found. (Code = 43) Position 1 = 28, Position 2 = 31
Branch analysis from position: 28
Branch analysis from position: 31
Branch analysis from position: 26
Branch analysis from position: 20
Branch analysis from position: 8
filename:       /in/UMJj3
function name:  get_user_locale
number of ops:  41
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                                                          ->26
  108    13    >   INSTANCEOF                                                   !0, 'WP_User'
         14      > JMPZ                                                         ~8, ->17
  109    15    >   ASSIGN                                                       !1, !0
  108    16      > JMP                                                          ->26
  110    17    > > JMPZ_EX                                              ~10     !0, ->20
         18    >   FRAMELESS_ICALL_1                is_numeric          ~11     !0
         19        BOOL                                                 ~10     ~11
         20    > > JMPZ                                                         ~10, ->26
  111    21    >   INIT_FCALL_BY_NAME                                           'get_user_by'
         22        SEND_VAL_EX                                                  'id'
         23        SEND_VAR_EX                                                  !0
         24        DO_FCALL                                          0  $12     
         25        ASSIGN                                                       !1, $12
  114    26    >   BOOL_NOT                                             ~14     !1
         27      > JMPZ                                                         ~14, ->31
  115    28    >   INIT_FCALL                                                   'get_locale'
         29        DO_FCALL                                          0  $15     
         30      > RETURN                                                       $15
  118    31    >   FETCH_OBJ_R                                          ~16     !1, 'locale'
         32        ASSIGN                                                       !2, ~16
  120    33      > JMPZ                                                         !2, ->36
         34    >   QM_ASSIGN                                            ~18     !2
         35      > JMP                                                          ->39
         36    >   INIT_FCALL                                                   'get_locale'
         37        DO_FCALL                                          0  $19     
         38        QM_ASSIGN                                            ~18     $19
         39    > > RETURN                                                       ~18
  121    40*     > 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/UMJj3
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/UMJj3
function name:  sanitize_locale_name
number of ops:  11
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        FRAMELESS_ICALL_3                preg_replace        ~3      '%2F%5B%5EA-Za-z0-9_-%5D%2F', ''
          2        OP_DATA                                                      !2
          3        ASSIGN                                                       !1, ~3
  137     4        INIT_FCALL                                                   'apply_filters'
          5        SEND_VAL                                                     'sanitize_locale_name'
          6        SEND_VAR                                                     !1
          7        SEND_VAR                                                     !2
          8        DO_FCALL                                          0  $5      
          9      > RETURN                                                       $5
  138    10*     > 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 = 67
Branch analysis from position: 67
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 37
1 jumps found. (Code = 42) Position 1 = 67
Branch analysis from position: 67
Branch analysis from position: 44
2 jumps found. (Code = 46) Position 1 = 47, Position 2 = 51
Branch analysis from position: 47
2 jumps found. (Code = 46) Position 1 = 52, Position 2 = 55
Branch analysis from position: 52
2 jumps found. (Code = 47) Position 1 = 56, Position 2 = 59
Branch analysis from position: 56
2 jumps found. (Code = 43) Position 1 = 60, Position 2 = 64
Branch analysis from position: 60
1 jumps found. (Code = 42) Position 1 = 67
Branch analysis from position: 67
Branch analysis from position: 64
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 59
Branch analysis from position: 55
Branch analysis from position: 51
Branch analysis from position: 24
Branch analysis from position: 25
Branch analysis from position: 15
Branch analysis from position: 8
filename:       /in/UMJj3
function name:  determine_locale_actual
number of ops:  73
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

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
173.28 ms | 1824 KiB | 29 Q