PHP PHP Interview

How to find string length in PHP without using strlen()?

Pinterest LinkedIn Tumblr
<?php

$str = 'abc d';
$i = 0;

while(isset($str[$i]))
{
    $i++;
}
echo $i;
?>

Write A Comment

Open chat
Hey Visitor,

How can I help you?