Obtain the PHP method of the x rule in aAAAxAAAa for example-PHP source code

Source: Internet
Author: User
Obtain the PHP method of the x rule in aAAAxAAAa for example. As for this question, I just modified my program and now the answer has come out, which of the following PHP experts can help me optimize my code structure! Thank you!

1. FILENAME. php

 3 & $ I <$ length-3) {$ flag = getFlag ($ data, $ I ); // if the front | after the fourth one is uppercase, it is not true if (isUpper ($ data [$ I + 4]) | isUpper ($ data [$ I-4]) {$ flag = false;} else {$ flag = false;} if ($ flag) {@ $ str. = $ data [$ I] ;}}return $ str ;}// the first three and the last three functions of the common current character getFlag ($ data, $ I) {$ flag = true; for ($ j = $ I-3; $ j <= $ I + 3; $ j ++) {if ($ j! = $ I) {// if one of them is lowercase, it is not true if (! IsUpper ($ data [$ j]) {$ flag = false ;}}return $ flag ;} /***** determine whether it is an uppercase letter */function isUpper ($ s) {if (@ ord ($ s) <97) {return true ;} else {return false ;}$ res = ''; $ handle = fopen (". /input.txt ", 'r'); $ d = fread ($ handle, filesize (". /input.txt "); $ res = getlower (str_replace (" \ r \ n "," ", $ d);/* while (! Feof ($ handle) {// row-by-row Read method $ buffer = fgets ($ handle, 4096); $ res. = getlower ($ buffer);} */echo $ res; fclose ($ handle);?>

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.