php

WordPress Developer Note: str_contains is Polyfilled Since WP 5.9

October 13, 2023

One of the nice functions introduced in PHP 8.1 is str_contains. Also introduced is str_starts_with. These functions are easier to use for certain use-cases than strrpos. If you’re a developer for WordPress you’re probably thinking that it would be nice to use these functions but you have no way to guarantee that your plugin/theme code is going to be running…

Read More