Real browsers
Drive Chromium, Firefox, and WebKit through Playwright's own driver, from PHP. Test rendering, JavaScript, network, and browser behavior without moving the suite to a JavaScript test runner.
- Architecture PHP drives the same Playwright browser process
- Three engines One script, three rendering engines
- Isolation Fresh sessions without relaunching the browser
PHP drives the same Playwright browser process
The PHP client sends each command to a local Node driver over a pipe. That driver owns the browser, while your test setup and assertions stay in PHP.
Architecture overview →One script, three rendering engines
Choose Chromium, Firefox, or WebKit when you create the context. The same page, locator, and assertion methods then drive each engine.
Browsers and contexts →$chromium = Playwright::chromium();
$firefox = Playwright::firefox();
$webkit = Playwright::webkit();Fresh sessions without relaunching the browser
Each browser context carries its own cookies, storage, and permissions. Create a fresh context per test to isolate state while reusing the browser process.
Core concepts →Move from the tour to working code.
Choose the explanation, recipe, or runnable example that matches what you need next.