A palindrome is a word, number or even a phrase, which is symmetrical, for example when you read the letters in the word from from left to right and right to left, in other words, it’s the same backward as it is forwards. An example of a palindromes is “racecar” or even in numbers such as “12321”.
title |
tags |
title |
tags |
palindrome
|
string,beginner
|
Returns true if the given string is a palindrome, false otherwise.
- Check if the value of
strrev($string) is equal to the passed $string .
|
string,beginner
|
function palindrome($string)
{
return strrev($string) === (string) $string;
}
palindrome('racecar'); // true
palindrome(2221222); // true
CC0-1.0 license
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