Adopt the string functions - str_contains
, str_starts_with
, str_ends_with
- available in PHP 8.
Before
strpos('abc', 'a') !== false;substr($haystack, 0, strlen($needle)) === $needle;substr($haystack, -strlen($needle)) === $needle;
After
str_contains('abc', 'a');str_starts_with($haystack, $needle);str_ends_with($haystack, $needle);
Sign in with any of the following services to connect Shift with your Laravel project.
Don't use one of these services?
Temporarily push your project to a free, private repository on one of these cloud-based services or upgrade your project locally with Shift for Docker.