Title: undefined function str_starts_with()
Last modified: November 14, 2022

---

# undefined function str_starts_with()

 *  [kientv](https://wordpress.org/support/users/kientv/)
 * (@kientv)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/undefined-function-str_starts_with/)
 * I get this below error after click submit.
    I’m using PHP7.4 and WP 5.8.2
 * `*730 FastCGI sent in stderr: “PHP message: PHP Fatal error: Uncaught Error: 
   Call to undefined function str_starts_with() in /wp-content/plugins/contact-form-
   7/includes/rest-api.php:331
    Stack trace: #0 /wp-includes/rest-api/class-wp-rest-
   server.php(1140): WPCF7_REST_Controller->create_feedback() #1 /wp-includes/rest-
   api/class-wp-rest-server.php(987): WP_REST_Server->respond_to_request() #2 /wp-
   includes/rest-api/class-wp-rest-server.php(414): WP_REST_Server->dispatch() #
   3 /wp-includes/rest-api.php(370): WP_REST_Server->serve_request() #4 /wp-includes/
   class-wp-hook.php(303): rest_api_loaded() #5 /wp-includes/class-wp-hook.php(327):
   WP_Hook->apply_filters() #6 /wp-includes/plugin.php(518): WP_Hook->do_action()#
   7 /wp-includes/class-wp.php(388): do_action_ref_array()

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

 *  Plugin Author [Takayuki Miyoshi](https://wordpress.org/support/users/takayukister/)
 * (@takayukister)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/undefined-function-str_starts_with/#post-16198518)
 * Which version of the Contact Form 7 plugin do you use?
 *  Thread Starter [kientv](https://wordpress.org/support/users/kientv/)
 * (@kientv)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/undefined-function-str_starts_with/#post-16198661)
 * It work fine on PHP 8.1
    [@takayukister](https://wordpress.org/support/users/takayukister/)
   I used CF7 latest version
    -  This reply was modified 3 years, 6 months ago by [kientv](https://wordpress.org/support/users/kientv/).
 *  Plugin Author [Takayuki Miyoshi](https://wordpress.org/support/users/takayukister/)
 * (@takayukister)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/undefined-function-str_starts_with/#post-16198793)
 * Where can we see the website in question?
 *  [Patrick Lai](https://wordpress.org/support/users/scoop082110/)
 * (@scoop082110)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/undefined-function-str_starts_with/#post-16207108)
 * Looks like str_starts_with() is new in PHP 8.

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

The topic ‘undefined function str_starts_with()’ is closed to new replies.

 * ![](https://ps.w.org/contact-form-7/assets/icon.svg?rev=2339255)
 * [Contact Form 7](https://wordpress.org/plugins/contact-form-7/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/contact-form-7/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/contact-form-7/)
 * [Active Topics](https://wordpress.org/support/plugin/contact-form-7/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/contact-form-7/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/contact-form-7/reviews/)

 * 4 replies
 * 3 participants
 * Last reply from: [Patrick Lai](https://wordpress.org/support/users/scoop082110/)
 * Last activity: [3 years, 6 months ago](https://wordpress.org/support/topic/undefined-function-str_starts_with/#post-16207108)
 * Status: not resolved