pts-core: Enhance PHP_BIN detection