The difference between php in windows and linux: 1. The path of PHP in windows can be represented by "/" or "\" connection, while in linux the path can only be represented by "/"; 2. PHP Developing under Linux requires case sensitivity, while developing under Windows does not.
The operating environment of this article: Windows 10 system, PHP version 7.1, Dell G3 computer.
1. File case problem. File names under Linux are case-sensitive; while under windows, they are not size-sensitive, for example The two files Abc.php and abc.php are the same in windows.php, but they are different in Linux.
2. The size of array keys is different under Linux, but there is no difference under Windows.
3. The difference between '/' and '\' is the best in the program. Use DIRECTORY_SEPARATOR instead.
Windows uses "\", and Linux uses "/". This should be particularly clear.
ps: In PHP windows, you can also use / to represent the path, so PHP/ windows and Linux is universal
4.The include_path path separator in php.ini is also different. Using PATH_SEPARATOR instead can solve the problem
5. Do not use absolute paths for programs, use relative paths
*When developing under windows, you must develop the habit of distinguishing sizes, and the entire project must have The case format of statistics. If you know Linux or have enough patience, just develop under Linux. Beginners have to struggle a lot at the beginning. For example, I am struggling now
Recommended learning: "PHP Video Tutorial》
The above is the detailed content of Is there any difference between php in windows and linux?. For more information, please follow other related articles on the PHP Chinese website!