Advertisement
7_2009-2012 Debugging and Error Handling #230145

Pallindrome Checker

Check to see if a string is a palindrome in only 5 lines of code!

AI

Riepilogo AI: This codebase represents a historical implementation of the logic described in the metadata. Our preservation engine analyzes the structure to provide context for modern developers.

Codice sorgente
original-source
<html>
<head>
<title>Palindrome Checker</title>
</head>
<body>
<?php
$str_reversed = strrev($str);
if ($str == $str_reversed) {
	print("\'$str\' is a palindrome.<br>\n");
} else {
	print("\'$str\' is <b>not</b> a palindrome.<br>\n");
}
?>
</body>
</html>
Commenti originali (3)
Recuperato da Wayback Machine