Script to build a win32 PHP build environment.


It takes many steps to build PHP on windows using the native toolchain. May as well automate the process!

  • php-build requires Cygwin; the final development environment does not require cygwin, nor do any final binaries
  • Build using any VS installation
  • Build from any git branch
  • Uses jom for parallel build on VS2012 or older


Configure the build environment by modifying the supplied file. Then use to compile PHP.

Usage: [options]

  --cmd             Open cmd.exe terminal in src dir with correct environment
  --explorer        Open explorer in src dir with correct environment
  --force           Delete php-sdk directory if it already exists
  --help            Display this message

  - Build PHP, but fail if destination directory already exists:

  - Build PHP, removing destination directory if it already exists:
    ./ --force


  • Build all dependencies instead of using dependency zipfiles from

See Also