When I copied & pasted your first line into my text editor and turned on the "show invisible characters" option, it looked like this:
if ($projet['sourceDonnees']•=== (string)$CONSTANTS['sourceDonnees_saisie']) {
Notice the •
between the ]
and the ===
.
Your second line of code showed perfectly clean.
Many times you will pick up stray invisible characters when you copy & paste text from websites. However, I do not know what keyboard combination will reproduce this from scratch.
Further experimentation reveals this invisible character as "non-ASCII"... the BBEdit text editor simply calls them "gremlins", and even has a "zap gremlins" function.