What are the potential pitfalls of using new features or functions in PHP without considering compatibility with older versions?

Using new features or functions in PHP without considering compatibility with older versions can lead to code breaking on servers running older PHP versions. To avoid this issue, it's important to check the PHP version before using any new features or functions and provide alternative code for older versions if necessary.

// Check PHP version before using new features
if (version_compare(PHP_VERSION, '7.0.0') >= 0) {
    // Use new features or functions
    // Code using new features or functions
} else {
    // Provide alternative code for older versions
    // Code for older PHP versions
}