PHP 8.4.24 Released!

Voting

: five plus zero?
(Example: nine)

The Note You're Voting On

Reinder
3 years ago
In PHP7 you may want to use:

if (!function_exists('str_ends_with')) {
  function str_ends_with($str, $end) {
    return (@substr_compare($str, $end, -strlen($end))==0);
  }
}

AFAIK that is binary safe and doesn't need additional checks.

<< Back to user notes page

To Top