How to get max length of multiple strings at once in PHP

1 Answer

0 votes
$s1 = "abc";
$s2 = "uvwxyz";
$s3 = "op";

$max_len = max(strlen($s1), strlen($s2), strlen($s3));

echo $max_len;

/*
run:

6 

*/

 



answered Dec 4, 2018 by avibootz
...