- var_dump: documentation ( source)
<?php
function isPalindrome($str)
{
$strCheck = '';
$length = strlen($str)- 1;
$i=0;
while($length >= 0)
{
$strCheck[$i] = $str[$length];
}
if($strCheck == $str)
{
return true;
}
return false;
}
var_dump(isPalindrome('hello'));
?>