A project is defined by the existence of a project configuration file 'XMake.conf'. PHP support is configured by enabling the 'phpc' XMExtension.
# XMake PROJECT CONFIGURATION FILE
# This file is for common XMake options; read before
# reading any makefiles

export XMAKE_SHELL_CMD=/usr/local/bin/bash
# or, if you install make as non-root user, use something
# like:
# export XMAKE_BUILD_CMD=$HOME/bin/make
export XMAKE_BUILD_CMD=/usr/local/bin/make

# XMAKE_EXTENSIONS includes the names of all XMake
# Extensions that handle source files
# This value will be overridden by command line options:
# -E
# XMAKE_EXTENSIONS='all' # enables all extensions
# XMAKE_EXTENSIONS='none' # disables all extensions
#: ${XMAKE_EXTENSIONS='c xdir'}; export XMAKE_EXTENSIONS
: ${XMAKE_EXTENSIONS='phpc'}; export XMAKE_EXTENSIONS

######################################################
# phpc XMExtension
# global config file:
#
# /usr/local/apache/htdocs/common/xmake/config/XMExtensions/phpc.conf
######################################################
# XMAKE_XME_PHPC is the path to command line PHP (SAPI
# CLI)
export XMAKE_XME_PHPC=/usr/local/bin/php
# XMAKE_EXT_PHPC_PHP_INI optionally specifies the php.ini
# file;
# if not specified, the default is used:
# /usr/local/lib/php.ini
export XMAKE_EXT_PHPC_PHP_INI=/usr/local/lib/php.ini
# XMAKE_XME_PHPC_FATAL_ERROR_MASK controls which error
# codes are fatal
# when building output files
# E_WARNING|E_USER_ERROR|E_USER_WARNING=2|256|512=770
export XMAKE_XME_PHPC_FATAL_ERROR_MASK=770
# XMAKE_XME_PHPC_ERROR_REPORTING_MASK controls
# error_reporting() level
# E_ALL&~E_NOTICE=2047&~8=2039
# XMAKE_XME_PHPC_ERROR_REPORTING_MASK is used for both
# phpc and php files
export XMAKE_XME_PHPC_ERROR_REPORTING_MASK=2039
# XMAKE_XME_PHPC_LINT_FATAL_ERROR_MASK controls fatal
# errors
# when building the special targets: phpc.lint, php.lint
# XMAKE_XME_PHPC_LINT_FATAL_ERROR_MASK=0;
# don't exit, display as many errors as possible on
# /dev/stderr
export XMAKE_XME_PHPC_LINT_FATAL_ERROR_MASK=0
######################################################