PHP 8.5.0 Alpha 1 available for testing

Voting

: seven plus one?
(Example: nine)

The Note You're Voting On

Andrey G
5 years ago
Checking that two strings are anagram:

<?php

function isAnagram($string1, $string2)
{
return
count_chars($string1, 1) === count_chars($string2, 1);
}

isAnagram('act', 'cat'); // true

?>

<< Back to user notes page

To Top