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);?>