Did people invite this because it's a meta joke?
It reads like someone told an AI bot why they wanted links to their page, and the boat just literally explained it and linked to that page...
<?
namespace lemmy\php;
/*
Welcome to the PHP community on Lemmy
#Rules:
1: Soon(TM)
#Helpful stuff:
#Common frameworks:
*/
echo "Welcome";
Did people invite this because it's a meta joke?
It reads like someone told an AI bot why they wanted links to their page, and the boat just literally explained it and linked to that page...
The code is broken as well.
Why would you trust any user input to begin with? If a person can spam links, there are bigger problems on the site. I would immediately start trying any and all forms of html and script injection if I saw that problem. The data is probably going back to a database anyway, so that is probably vulnerable as well.
Comparing against a short word list is also a lost cause. The input needs to be fully sanitized before it even gets shown.
I applaud the effort to teach, but there are more conceptual issues that need to be addressed first.