basically php chat is really just posting information to a page and having that page automatically refresh itself every so often to see if anyone else has posted.
this has changed since everyone started doing ajax, but it's basically the same thing.
so you're gonna need to figure out how you're going to......
Save Data (text posts, user names, etc) ((Aka: MySQL))
Authenticate Users (or if you even want to)
Refresh the page (*cough JavaScript cough)
Create an easy accessible UI
and that's about it......
sorta...
but that's just the jist of it. good luck have fun 😛
(And I do recommend just use one that's already made. No reason to reinvent the wheel unless you're going to improve it's traction, not just clone it.)