From the docs -
int strlen ( string $string )
it takes string as a parameter, now when I am doing this-
$a = array('tex','ben');
echo strlen($a);
Output -
5
However I was expecting, two type of output-
If it is an array, php might convert it into string so the array will become-
'texben'
so it may output -6
If 1st one is not it will convert it something like this -
"array('tex','ben')"
so the expected output should be -18
(count of all items)
But every time it output- 5
My consideration from the output is 5
from array
word count but I am not sure. If it is the case how PHP is doing this ?(means counting 5)