PHP Interview questions Exam 03

Source: Internet
Author: User
PHP Interview questions Exam 03
4. What tools are used for version control?
Svn

5, how to implement string rollover?

$str = "Holle world!"; echo Strrev ($STR);//!dlrow ellohecho T_strrev ($str);//!dlrow ellohfunction T_strrev ($str) {$n _str = '; for ($i =strlen ($ STR); $i >=0; $i-) {$n _str. = $str [$i];} return $n _str;} End Func


This is no problem, but it should not be the case.

To solve the Chinese garbled method:
/*** reverses the UTF8 string, the function that starts with the MB * @param string $str * @return string*/function T_strrev ($str) {$len = Mb_strlen ($str, ' UTF-8 '); c0/> $string = ";    for ($i = $len-1; $i >= 0; $i-) {       $string. = Mb_substr ($str, $i, 1, ' UTF-8 ');    }    return $string;} End Func
  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.