added some PhpDetection fix and tests