Title: Function wp_some_native_function not found.
Last modified: April 6, 2023

---

# Function wp_some_native_function not found.

 *  [ajaxStardust](https://wordpress.org/support/users/ajaxstardust/)
 * (@ajaxstardust)
 * [3 years, 2 months ago](https://wordpress.org/support/topic/function-wp_some_native_function-not-found/)
 * Not a request for help. This information is cordially shared for anyone who encounters
   an error advising of a WP native function not found.
   Using PHPStan, a tool for
   analyzing (debugging) code based on PHP Framework Interoperability Group recommended
   standards, I recognized some unexpected feedback in the report.
 *     ```wp-block-code
        ------ ------------------------------------------------------------ 
         Line   wp-content/plugins/cheez/inc/admin/class-admin.php                                      
        ------ ------------------------------------------------------------ 
         80     Function plugin_dir_url not found. 
         80     Function wp_enqueue_style not found. 
         102    Function plugin_dir_url not found. 
         102    Function wp_enqueue_script not found. 
         107    Function add_menu_page not found. 
         108    Function __ not found. 
         109    Function __ not found. 
         126    Function add_action not found. 
         140    Function __ not found. 
         144    Function add_screen_option not found. 
         146    Access to an undefined property i_like_cheese\Inc\Admin\Admin::$i_like_cheese_Object. 
       💡 Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property 
         146    Instantiated class i_like_cheese\Inc\Admin\i_like_cheese_Object not found. 
       💡 Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property 
       ```
   
 * A vexing situation, indeed. After quite a bit of trial and error, I ultimately
   realized that the function “not found” issues were a result of incorrect file
   permissions. The time I spent fooling around with Xdebug / PHPStan was mostly
   a waste, considering I should use a checklist for such a situation. That checklist
   should begin w/ things basic like permissions, server conf, error logs, etc. 
   It’s not reasonable to expect that it’s just going to work, even when installing
   the common software in a common environment: the developer must be mindful that
   the possibility of a breaking oversight remains. Alas, I digress. 
   I thought 
   perhaps there was an issue with my Namespace (although it was functioning properly,
   previously, in a different installation). That and a bit of research on `$psr_4_prefix_pos`(
   per Xdebug step debugging) led me to believe perhaps I had an error in the character
   cases (upper/ lower) used in my Namespace declarations. While not the cause of
   my errors, it’s valuable knowledge and worth learning (if you’re concerned with
   doing things correctly). See: Autoloading PHP Namespaces:“PSR-4 based Requests
   2.0.0 classes in a case-sensitive manner”[https://developer.wordpress.org/reference/classes/wporg-requests-autoload/](https://developer.wordpress.org/reference/classes/wporg-requests-autoload/)
 * Once I corrected the file/ dir permission issue, the error was gone. This is 
   not something that I’ve encountered before, but it makes sense that WP won’t 
   see the functions if it can’t read at the file properly, thus resulting in things
   being “not found”.
 * Cheers!
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Ffunction-wp_some_native_function-not-found%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [Viktor Szépe](https://wordpress.org/support/users/szepeviktor/)
 * (@szepeviktor)
 * [3 years, 2 months ago](https://wordpress.org/support/topic/function-wp_some_native_function-not-found/#post-16635401)
 * The extension for WordPress will help you run PHPStan.
 * [https://github.com/szepeviktor/phpstan-wordpress](https://github.com/szepeviktor/phpstan-wordpress)
 *  Thread Starter [ajaxStardust](https://wordpress.org/support/users/ajaxstardust/)
 * (@ajaxstardust)
 * [3 years, 1 month ago](https://wordpress.org/support/topic/function-wp_some_native_function-not-found/#post-16656989)
 * For clarity:
   [https://github.com/szepeviktor/phpstan-wordpress](https://github.com/szepeviktor/phpstan-wordpress)
   doesn’t help to “run” PHPStan, as suggested above. It installs a set of rules
   for PHPStan, or instructions, to help PHPStan understand that the code base is
   the WordPress CMS so reporting is most relevant. (e.g. not to be confused with
   a WordPress plugin). Visual Studio Code users should see the [Marketplace](https://marketplace.visualstudio.com/items?itemName=calsmurf2904.vscode-phpstan)
   for a VS Code extension to enhance use of PHPStan as well.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Function wp_some_native_function not found.’ is closed to new replies.

## Tags

 * [File Permissions](https://wordpress.org/support/topic-tag/file-permissions/)
 * [namespace](https://wordpress.org/support/topic-tag/namespace/)

 * In: [Developing with WordPress](https://wordpress.org/support/forum/wp-advanced/)
 * 3 replies
 * 2 participants
 * Last reply from: [ajaxStardust](https://wordpress.org/support/users/ajaxstardust/)
 * Last activity: [3 years, 1 month ago](https://wordpress.org/support/topic/function-wp_some_native_function-not-found/#post-16656989)
 * Status: not a support question

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
