Declaration of case-insensitive constants is no longer supported

Description

The define() function used to create case sensitive and case insensitive constants. This was the usage of the third parameter.

Since PHP 8.0, only case sensitive constants may be declared, with const and with define().

Example

<?php

// the third parameter is now ignored
define('CONSTANT_NAME', 'constant value', case_insensitive: true);

?>

Solutions

  • Declare variations of the constant name.