Hello @LVMT i have looked through some things (Other than the engine source code) and this is what i found:
Make an html and css to size and create then add the chat room to the canvas with UI. To be noticed for the chatroom to work it may need to be connected to a network: Other words a multiplayer game, for it to work properly.
EDIT: Also to be noticed i dont think PHP is a possibility to use in playcanvas, you made need to convert to PY or inject a new html file and add the php as a script in the html doc.