Modified to use correctly vars

Java -> PhP is difficult !