- var_dump: documentation ( source)
- explode: documentation ( source)
<?php
function GetLongestString() {
$args = func_get_args();
$longestString = "";
foreach($args as $str) {
$longestString = strlen($str) > strlen($longestString) ? $str : $longestString;
}
return strlen($longestString);
}
echo GetLongestString("a", "ab", "abc");
var_dump(explode('@', "hello@bye"));