Php5.2 was used in the past, but recently it was found that the version was slightly lower, and it was switched to php5.3 (I used the phpstudy Combination Package). However, after switching, previously, the program written in php5.2 will receive a notice prompt, although it does not affect the running of the correct results. Which version should I use later...
Php5.2 was used in the past, but recently it was found that the version was slightly lower, and it was switched to php5.3 (I used the phpstudy Combination Package). However, after switching, previously, the program written in php5.2 will receive a notice prompt, although it does not affect the running of the correct results.
Image Description
Which version of php should I use in the future ?? I still like to use combination packages.
This is the error page code:
"; // Echo"
Programming Language: $ t33 "; // print_r ($ t); echo" programming language: "; // Method 1: traverse the array, the last comma at that time cannot be avoided // foreach ($ t as $ key => $ value) {// echo $ value. ","; //} // Method 2: Use for loop $ len = count ($ tt); // obtain the length of the array $ str = ""; for ($ I = 0; $ I <$ len; $ I ++) {if ($ I = $ len-1) {// $ str. = $ tt [$ I]. ". "; $ Str = $ str. $ tt [$ I].". ";}Else {$ str. = $ tt [$ I].", ";}} echo $ str; echo"
Account: $ id "; echo"
Password: $ pwd "; echo"
Introduction: $ wb "; echo"
Car: $ car "; echo"
Faculty: $ yx ";?>! [Image description] [1] I don't think it's a code issue or a php version switch. What do you say ???
Reply content:
Php5.2 was used in the past, but recently it was found that the version was slightly lower, and it was switched to php5.3 (I used the phpstudy Combination Package). However, after switching, previously, the program written in php5.2 will receive a notice prompt, although it does not affect the running of the correct results.
Image Description
Which version of php should I use in the future ?? I still like to use combination packages.
This is the error page code:
"; // Echo"
Programming Language: $ t33 "; // print_r ($ t); echo" programming language: "; // Method 1: traverse the array, the last comma at that time cannot be avoided // foreach ($ t as $ key => $ value) {// echo $ value. ","; //} // Method 2: Use for loop $ len = count ($ tt); // obtain the length of the array $ str = ""; for ($ I = 0; $ I <$ len; $ I ++) {if ($ I = $ len-1) {// $ str. = $ tt [$ I]. ". "; $ Str = $ str. $ tt [$ I].". ";}Else {$ str. = $ tt [$ I].", ";}} echo $ str; echo"
Account: $ id "; echo"
Password: $ pwd "; echo"
Introduction: $ wb "; echo"
Car: $ car "; echo"
Faculty: $ yx ";?>! [Image description] [1] I don't think it's a code issue or a php version switch. What do you say ???
This does not have much to do with the php version. Instead, you should develop a good programming habit. If you are not sure whether there is a value, you must determine whether it is output.
Otherwise, the error message "direct path" is reported.
You should change it:
If (isset ($ user ['yx ']) {echo $ user ['yx'];} // or if (! Empty ($ user ['yx ']) {echo $ user ['yx'];}
In addition, we recommend that you directly use the latest stable version, as:5.6.21
It has nothing to do with the version. If the variable is not defined, it will be used. Of course, an error should be reported! Note that you must first define non-predefined variables before using them!
In addition, the version is determined based on market share and specific projects.
We recommend that you use 5.6 in the production environment.
Of course, 5.3 is used at most 5.4, followed
7 fastest
$ Tt is not defined. In addition, this is irrelevant to the version. In this case, an error is reported, but the error setting levels of php. ini are different, so that you will not report an error if you think the error is 5.2.
Use isset to determine first