strlen 


php128 apg

GET a STRING length.





This function return the LENGTH of the $string on SUCCESS and ZERO if the $string is EMPTY.



<?php

int strlen 
str $string )


where,

$string The string to determine the length

?>
 

$string


The STRING to get the length.



  1 EXERCISE   

<?php

$suprc 
'Supercalifragilisticexpialidocious';
$supnc 'Anticonstitucionalissimamente';
$strsp ' ';
$strnp "";


$len_suprc strlen($suprc);
$len_supnc strlen($supnc);

$len_strsp strlen($strsp);
$len_strnp strlen($strnp);


echo 
$suprc '<br>( ' $len_suprc 
' characters )<br><br>' $supnc  
'<br>( ' $len_supnc ' characters )<br><br>';

echo 
$strsp '<br>( ' $len_strsp 
' characters )<br><br>' $strnp  
'<br>( ' $len_strnp ' characters )<br>';

?> 

 RESULT   

Supercalifragilisticexpialidocious
( 34 characters )

Anticonstitucionalissimamente
( 29 characters )

( 1 character )

( 0 characters )