I have been tasked with converting several php classes into java classes, which is quickly becoming a nightmare for me. I understand the basic language structure, it being simil
A human is the best tool.
I would try to rewrite the php to remove most of the php features to something C like. Then you'll have an easy time rewriting in Java.
But I need to ask, why do you need to convert the php? Can you not wrap the php into something callable from Java? This way you won't add any errors while converting it.