Suggestions appear as you type. Use the up and down arrows to choose one and Enter to open it.

This page's audience our own tag's counts — open to see them
–Visits
–Page views
–Clicks to vendors
–Time on page
–Reading now
Clicks to vendors, by tool
  • –
Top countries
  • –
Devices
  • –

– · visits, page views and clicks counted by our own tag, which counts more than our checked analytics; every figure rounded down · how we count

phpspec review

Free#26 of 29 in BDD Testing Tools

A focused SpecBDD workflow for PHP object-behavior specifications.

5.7/10Editor score
phpspec5.7 Visit phpspec

Reviewed by iTechGuides Editors · Editorial team · Updated Oct 2026

phpspec is an open-source PHP tool for behaviour-driven development at the specification level. It is designed for developers who describe object behaviour in PHP specifications, then iteratively implement and refactor the code. The workflow is SpecBDD rather than StoryBDD: specifications focus on object behaviour, with Composer handling installation and the executable placed in the project's vendor or configured binary directory.

Its strongest feature set is the depth of its PHP specification workflow. phpspec can generate specifications and classes, apply built-in behaviour matchers, and work with stubs, mocks, and spies. Configurable suites and PSR-4 support help organize specifications and source locations, while custom matchers and extensions allow teams to adapt the workflow. Multiple output formatters, including HTML, JUnit, TAP, and pretty output, also make results usable in different reporting contexts.

The trade-off is a narrow scope. phpspec executes locally and does not support Gherkin, so it is a poor fit for teams that need feature files shared across technical and nontechnical roles. It is also not suited to browser or API testing, or to workflows built around external integrations. Choose phpspec when PHP object design and specification-level feedback are the priority; choose another BDD tool when acceptance scenarios, browser coverage, API coverage, or broader integration support are central requirements.

phpspec pros and cons

  • Where it wins
    • Generates specifications and classes for a Composer-based PHP workflow
    • Includes matchers, stubs, mocks, spies, suites, and PSR-4 support
    • Exports HTML, JUnit, TAP, pretty, and other formatter outputs
  • Where it doesn't
    • Does not support Gherkin or StoryBDD workflows
    • Runs locally rather than providing a hosted execution model
    • Not suited to browser, API, or external-integration testing

phpspec fact sheet, pricing and score →

Advertiser disclosure: iTechGuides is reader-supported. Vendors can pay for top positions in our rankings and for a place on other products' pages, and we may earn a commission when you click some links. Bought places stand at the number bought; this page and our disclosure say so. Paying vendors may get a fuller, more detailed review from our editors, and that review can change their score. How we rank.

Last updated · How we research and update