Q:

Will all PHP versions work the same regardless of OS/platform?

I am coding in a Windows platform, then I hosted it in a Linux platform, then some codes did not work as it should be. So I am curious if this is normal or I just have an error on my part. Both PHP versions on Windows and Linux are PHP 7.1.1.

A:

They will not all work the same.  As PHP has matured it's deprecated features and added new ones.  Simple code, and code designed for maximum compatibility should run on a range of versions - sometimes all versions, but it is very common to come across functions which require a minimum version - somewhat less common to find functions that don't work in newer versions (but often require supressing debug messages and/or yweeking configs to make it work)

