PHP syntax guide and a big fix to Java example code