Compare two strings and returns true
if both strings are anagram, false
otherwise.
title |
tags |
isAnagram
|
string,beginner
|
- Use
count_chars()
to compare $string1
and $string2
.
function isAnagram($string1, $string2)
{
return count_chars($string1, 1) === count_chars($string2, 1);
}
isAnagram('act', 'cat'); // true
License: CC-0
RELATED WEBSITES AND SERVICES
These are paid advertisements or products and services ran by ourselves
Privacy preserving, cookieless website visitor tracking for your website completely free. unrive.io
Choose from over 100 quick & easy to use SEO, webmaster and developer tools. seoyex.com
Lorum Ipsum Generator, List Randomiser Tool, List Alphabetizer Tools, Case Converter Tools. seoyex.com
CSS Minifier, JS Minifier, HTML Formatter, CSS Formatter, JS Obfuscator Tools. unrivewebtools.com