Created
April 14, 2015 11:51
-
-
Save rafasashi/73fb3b15892253d80273 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function custom_strlen($str=''){ | |
$strlen=0; | |
if(is_string($str)){ | |
if(function_exists('mb_strlen')){ | |
$strlen= mb_strlen($str); | |
} | |
else{ | |
$strlen= strlen($str); | |
} | |
} | |
else{ | |
//vdump($str); | |
} | |
return $strlen; | |
} | |
function strlen_compare($a,$b){ | |
return custom_strlen($b) - custom_strlen($a); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment