PHP is not a very fast programming language. I think it would not be a very good idea to implement SVM in PHP. Maybe that a better idea is to call some C++ or Java implementation of SVM from your PHP code or just run it offline? That might be easier than implementing SVM by yourself in PHP, or trying to find a library.