r/PHPhelp • • 26d ago

Patching code full of old syntax/functions

Hello,

I am patching some php code of some kind of DB web integration and the code is quite old. After giving it into phpstorm to check for problems, it showed dozens of syntax errors (mostly curly braces for accessing array elements, no big deal in changing them to squared ones) and whole functions that arent supported anymore. Mostly things as MYSQL_BOTH, MYSQL_NUM, etc. Is there a nice way to fix those issues, maybe even some kind of software, or do I need to manually rewrite those passages w/o the functions?

8 Upvotes

12 comments sorted by

View all comments

Show parent comment

2

u/Takeoded 26d ago

Reddit Rich Text Editor, in its infinite wisdom, added a real nbsp to the visible part of your url, and an url-encoded nbsp (%C2%A0) to the actual underlying hyperlink, so your link goes to https://getrector.com/hire-team%C2%A0 ... which returns HTTP 404 Not Found.

Consider trying the Markdown Editor :)

1

u/Tomas_Votruba 25d ago

I just used plain text like here, but space + ( got wrong somehow. Thanks for spotting :)

Fixed