Get the App
SLTechnology News&Howtos  ›  Development  › 

What are the differences between php in windows and linux

Shulou Source: shulou.com Published: 2022-05-31 19:34:51 10月03日 Update

Today, I would like to share with you the relevant knowledge points about the differences between php in windows and linux. The content is detailed and the logic is clear. I believe most people still know too much about this knowledge, so share this article for your reference. I hope you can get something after reading this article.

The difference between php in windows and linux: 1, the path of PHP in windows can be represented by "/" or "\" connection, while the path in linux can only be expressed by "/"; 2. PHP development under linux needs to be case-sensitive, while development under windows does not need to be case-sensitive.

This article operating environment: Windows10 system, PHP7.1 version, Dell G3 computer.

What's the difference between php and linux in windows?

1. File name is case-sensitive under Linux, but not case-sensitive under windows. For example, Abc.php and abc.php are the same in windows.php, but different in linux.

two。 The size of array keys is different under linux, but there is no difference under windows

3. It is best to use DIRECTORY_SEPARATOR in the program instead of the difference of 'magic' in the program.

It should be clear that windows uses "\" and linux uses "/".

Ps: you can also use / to represent paths in PHP windows, so PHP/ windows and linux are universal

The include_path path delimiter in 4.php.ini is also different. Using PATH_SEPARATOR instead of this can solve the problem.

5. The program does not use absolute paths, but relative paths

* develop a size-sensitive habit when developing under windows, and the whole project should have a statistical case format. If you can Linux or have enough patience, just develop under linux. Beginners will have to struggle at the beginning. For example, now I am constantly tossing about.

These are all the contents of this article entitled "what are the differences between php in windows and linux?" Thank you for reading! I believe you will gain a lot after reading this article. The editor will update different knowledge for you every day. If you want to learn more knowledge, please pay attention to the industry information channel.

Tags: Size path knowledge article development file content program problem different big clear patient two delimiter beginner mostly that is array file name Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno vpn Huawei MySQL macOS Docker