Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
C0D4681454yPreg_split() returns false if there is something wrong, probably what it is doing.
If you don't need to split with regex, use explode() instead. -
msdsk31824y@C0D4
I was using it for regex. Turns out regex engine got changed a bit between 7.2 (my local PHP) and 7.3 (production version). Turns out that life is an endless hell by itself. -
@msdsk I was going to come here and ask about this, but seems you figured it out (had this exact same problem before)
-
Inigo3764yRunning different versions of php on local vs production is usually asking for trouble tbh
-
@Inigo yep preferably never do that on purpose unless you’re gearing up for a php version update for prod.
-
@msdsk
Looks regular to me.
But hyphen embedded in a group actually are to be treated as defining a range if not escaped. So 7.3 fixed a bug.
Related Rants
why does preg_split work on my local copy but not on production? WHY DOES IT RETURN LITERALLY NOTHING? IS PHP JUST HELL? AAAAAAAAA
rant
php