Java, PHP,.. common helper