What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Use a real Chrome or Chromium browser controlled from PHP: Symfony Panther is a strong fit for browser tests and crawling, while chrome-php/chrome gives you a direct PHP API for Chrome. Unlike an HTTP client that merely downloads the initial HTML, a headless browser can run the page’s JavaScript, wait for rendered content, interact with elements, and capture the result.

Why use headless Chrome instead of fetching HTML?

A basic HTTP request returns the response body sent by the server. If a page fills in its content only after JavaScript runs, the returned HTML may not contain the data you need. A browser automation library starts or connects to a browser, loads the page, and lets the browser execute scripts as it would for a visitor.

Symfony’s introduction to Panther contrasts its real-browser approach with Goutte, which does not support JavaScript: Symfony’s Panther introduction. Chrome’s headless mode uses the same browser engine as regular Chrome; Chrome for Developers puts it simply: “Headless mode shares code with Chrome.” See Chrome Headless mode.

That does not make every page straightforward to scrape. A browser can execute client-side code, but you still need to wait for the relevant state, handle navigation and failures, and respect a site’s access rules. A JavaScript-rendered page can also depend on login, a specific region, or interaction before its data appears.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Elebase USB to USB C Adapter for iPhone 18 Pro Max,USBC Car Charger Adapter
  • Read Before You Buy — No Video Output: These adapters support charging and USB 2.0 data transfer, but cannot transmit video signals. Except for standard USB webcams (which use USB data only), they are not compatible with HDMI/DisplayPort cables, video-capable USB-C hubs, or docking stations with video output.
  • Convert USB-A Ports to USB-C: Designed to connect USB-C earphones, cables, flash drives, card readers, and other USB-C accessories to standard USB-A ports. Plug-and-play with no drivers or software required.
  • Aluminum Alloy Housing: Built with a sturdy aluminum alloy shell that aids in heat dissipation and protects against daily wear and scratches. Designed to maintain a stable and secure connection.
  • Compact & Travel-Friendly: The ultra-compact design allows the adapter to stay plugged into your device without blocking adjacent ports or adding bulk, reducing wear and tear on your original USB ports.
  • 12-Month Warranty: Backed by a 12-month manufacturer warranty for peace of mind. Designed to meet strict quality control standards for reliable everyday performance.

Choose a PHP browser-control library

Option Best fit Control model What the documentation establishes
Symfony Panther PHP end-to-end tests, browser crawling, and Symfony projects; it can also be used outside Symfony. WebDriver-based browser testing and crawling API. Chrome client, navigation, waits for elements, screenshots, headless configuration, and remote testing options.
chrome-php/chrome PHP applications that want a direct API for controlling Chrome or Chromium. PHP library for launching and controlling the browser. Opening pages, evaluating JavaScript, screenshots, and PDF creation.

Pick Panther when its WebDriver workflow and testing-oriented features match your task, particularly if you want element waits or a documented route to remote browser testing. Pick chrome-php/chrome when its direct browser-control API better matches the way you want to launch a browser and interact with pages. The available documentation does not provide a comparable performance benchmark, so choose by workflow and deployment needs rather than assuming one is faster.

Run JavaScript with Symfony Panther

Install Panther and provide a browser driver

For a test-only dependency, install Panther with Composer:

composer require --dev symfony/panther

Panther controls browsers through WebDriver, so ChromeDriver must be available. Symfony documents using the browser-driver installer and detecting drivers, or placing ChromeDriver in your PATH or the project’s drivers/ directory:

composer require --dev dbrekelmans/bdi
vendor/bin/bdi detect drivers

Check the current Panther documentation for setup details that match your operating system and pinned browser versions. The retrieved documentation does not establish a specific Chrome-and-ChromeDriver version pairing, so verify compatibility when selecting versions for a deployment.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #2
Anker USB-C Hub, 5-in-1 USB Hub for Laptops, 4K HDMI Multiport Adapter
  • 5-in-1 USB-C Hub: Experience comprehensive connectivity featuring a Power Delivery input, two USB-A 2.0 ports, a USB-A 3.0 port, and an HDMI port. (Note: The USB-C power delivery input port is only for connecting an external wall charger to power your laptop and cannot power peripheral devices.)
  • 90W Pass-Through Charging: Achieve optimal charging with 90W pass-through power to your laptop, supported by a total input of 100W, with the hub reserving 10W for operational efficiency. (Note: Wall charger not included.)
  • Quick Data Transfers: Accelerate your productivity with rapid data transfers using a high-speed 5Gbps USB 3.0 port and two 480Mbps USB 2.0 ports.
  • 4K HDMI Display: Enhance your visual experience with a hub capable of delivering 4K resolution at 30Hz in both mirror and extend modes. Please note that this hub is compatible with MacBook (macOS 12 and newer), Windows 10 and 11, ChromeOS, and laptops equipped with DP Alt Mode and Power Delivery. Note: This device is not compatible with Linux.
  • What You Get: Anker USB-C Hub (5-in-1, 4K HDMI), welcome guide, 18-month warranty, and our friendly customer service.

Navigate, wait for JavaScript-rendered content, and read it

This standalone example assumes the Composer packages are installed and a compatible ChromeDriver and Chrome or Chromium are available. Panther’s standalone setup uses Composer’s autoloader; use the installed package’s documented API version when adapting it:

<?php
require __DIR__ . '/vendor/autoload.php';

use SymfonyComponentPantherPantherTestCase;

$client = PantherTestCase::createPantherClient();
$client->request('GET', 'https://example.com');

// Replace this selector with an element added or populated by the page's JavaScript.
$client->waitFor('.results');

$results = $client->getCrawler()->filter('.results')->text();
echo $results . PHP_EOL;

$client->takeScreenshot(__DIR__ . '/page.png');
$client->quit();

The key is the wait: the navigation request can finish before an asynchronous script has populated the result. Replace .results with a selector that appears only when the data you need is ready. If you only need to verify that an element exists, an element wait is more robust than sleeping for an arbitrary number of seconds.

Panther’s docs show the client, navigation, selector waits, content access, and screenshot workflow. Review the current Symfony End-to-End Testing documentation for the exact API and options corresponding to your installed version, especially when translating the illustrative standalone flow into a test case.

Configure headless mode and browser selection

Headless mode is useful on CI servers and machines without a desktop session. Symfony documents these environment variables for Panther:

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #3
Sale
Anker USB C Hub, 7in1 Multi-Port USB Adapter, 4K@60Hz USBC to HDMI Splitter
  • Sleek 7-in-1 USB-C Hub: Features an HDMI port, two USB-A 3.0 ports, and a USB-C data port, each providing 5Gbps transfer speeds. It also includes a USB-C PD input port for charging up to 100W and dual SD and TF card slots, all in a compact design.
  • Flawless 4K@60Hz Video with HDMI: Delivers exceptional clarity and smoothness with its 4K@60Hz HDMI port, making it ideal for high-definition presentations and entertainment. (Note: Only the HDMI port supports video projection; the USB-C port is for data transfer only.)
  • Double Up on Efficiency: The two USB-A 3.0 ports and a USB-C port support a fast 5Gbps data rate, significantly boosting your transfer speeds and improving productivity.
  • Fast and Reliable 85W Charging: Offers high-capacity, speedy charging for laptops up to 85W, so you spend less time tethered to an outlet and more time being productive.
  • What You Get: Anker USB-C Hub (7-in-1), welcome guide, 18-month warranty, and our friendly customer service.
  • PANTHER_NO_HEADLESS disables headless mode so you can watch the browser while debugging.
  • PANTHER_CHROME_BINARY points Panther at a Chrome or Chromium binary other than its default.
  • PANTHER_CHROME_ARGUMENTS supplies Chrome flags.

Use the visible-browser option temporarily when you need to inspect what the automation actually loads. Return to headless mode for unattended runs. Avoid treating PANTHER_NO_SANDBOX as a routine performance setting: Symfony labels disabling Chrome’s sandbox unsafe. If a container requires it, understand and address the security implications of that environment rather than applying it indiscriminately.

Use chrome-php/chrome for direct control

The chrome-php/chrome project describes a Composer-installed PHP API for launching Chrome or Chromium, opening pages, evaluating JavaScript, taking screenshots, and producing PDFs. This route can suit a script that needs to control browser operations directly rather than adopt Panther’s WebDriver-oriented testing API.

The project README, as retrieved for this article, states requirements of PHP 7.4–8.5 and Chrome or Chromium 65 or newer, and says it is tested on Linux while compatible with macOS and Windows. These are version-sensitive project details: check the current README before installing or pinning a production environment.

Install the package with Composer:

composer require chrome-php/chrome

Follow the version-specific examples in the project’s README for creating a browser, opening a page, evaluating JavaScript, and closing the browser cleanly. The repository is the source for the current API; avoid copying code written for a different release without checking its requirements and method signatures.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #4
Sale
UGREEN USB to USB C Adapter Combo 4-Pack, 10Gbps USB C Converter Space Gray
  • Dual Converters, Infinite Potential:Includes 2× USB C male to USB A female adapters and 2× USB A male to USB C female adapters. Perfect for a wide range of uses—tablets with Bluetooth keyboards, expand USB ports on macbook, and more. Two different converters for all your daily needs
  • Next-Level 10Gbps & 3A Charging: No more slow 480Mbps, this usb to usb c adapter has a transfer speed of up to 10Gbps, allowing you to do more transferring in less time. This usb adapter fits both USB A and USB C charger, supporting up to 3A fast charging
  • Upgraded Exquisite Craftsmanship: With an aluminum alloy housing and metal connector, the usbc to usb adapter is extremely durable and sturdy. Rigorously tested to withstand more than 10,000 times of plugging and unplugging, ensuring long-lasting performance
  • Broad Compatible: The usb c to usb adapter widely supports all USB C/ USB A devices like laptops, tablets, cellphones, car chargers, and phone chargers. Such as compatible with MacBook Pro/Air 2023/2022, Thunderbolt 4/3 Devices,Apple MagSafe Watch 9/8/7/SE/Ultra, iPad Pro 2022/2021, Samsung Galaxy S23/S20/S10, and iPhone 17/16/15 Pro. Plug and play
  • Please Note: To reach 10Gbps speed, keep the cable under 3.3 ft. For USB A Male to USB C adapters, try flipping the USB C connector. USB C Male to USB A adapters support bidirectional 10Gbps transfer within 3.3 ft

Make browser automation reliable

Wait for the condition you need

JavaScript-rendered pages often fill in content after the initial load. Wait for a meaningful selector or other explicit condition, then read the page. A fixed delay can be useful when a page offers no observable readiness signal, but it may waste time on fast loads and still be too short on slow ones.

Control the environment

Keep the browser and driver available in the environment that runs PHP, not just on a developer’s workstation. For reproducible runs, document the browser binary, driver installation method, package versions, and relevant Chrome arguments. Panther’s documentation gives CI and container examples and describes setting the Chrome binary explicitly with PANTHER_CHROME_BINARY.

Use remote browsers when local setup is the constraint

For teams that need remote browser infrastructure, Panther’s documentation names Selenium Grid, SauceLabs, and BrowserStack as remote testing options. Their suitability, availability, and pricing depend on the service and setup; Panther’s documentation does not establish current commercial terms.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Troubleshoot common failures

Symptom Likely cause What to check
Panther cannot start a session or find a driver. ChromeDriver is missing or is not discoverable by the process. Confirm the driver is in PATH or in the project’s drivers/ directory, or run the documented installer command vendor/bin/bdi detect drivers.
The browser binary cannot be launched. Chrome or Chromium is absent, or Panther is looking in the wrong location. Verify the installed binary and set PANTHER_CHROME_BINARY to its path where needed.
A selector wait times out although navigation succeeded. The selector is incorrect, the script has not finished, or the page requires another state such as a click or login. Check the selector in the rendered page, wait for the actual readiness element, and determine whether the workflow must interact before the content appears.
The page works visibly but fails in headless mode. The failure may depend on browser flags, environment, or a difference in the page’s runtime conditions. Use PANTHER_NO_HEADLESS to inspect behavior, then adjust documented Chrome arguments or environment configuration and retest headlessly.
Chrome fails in a container with sandbox errors. The container’s user or security configuration may not permit Chrome’s normal sandbox operation. Review the container setup and security model. Symfony warns that PANTHER_NO_SANDBOX is unsafe; do not use it as a casual default.

Or skip the browser setup

If your goal is a screenshot or PDF rather than custom PHP interaction with the page, ScreenshotNeo provides a website screenshot API and MCP server. A single GET request can return a PNG, JPEG, WebP, or PDF. Its clean-shot options accept cookie and consent banners and remove more than 60 known consent platforms, newsletter popups, and chat widgets before capture; each step can be turned off.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

For a screenshot, the cURL request is:

curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp

See the ScreenshotNeo API documentation for parameters and response details. Bot checks or CAPTCHAs, blank pages, timeouts, failed loads, and cache hits cost nothing; response headers say whether a page was billed and its verdict. AI agents can use the MCP server’s take_screenshot, get_page_info, and capture_pdf tools. The free plan includes 1,000 shots per month without a card, and paid plans start at $5 for 3,000 shots.

Best Value
Anker USB C Hub, 5-in-1 USBC to HDMI Splitter with 4K Display
  • 5-in-1 Connectivity: Equipped with a 4K HDMI port, a 5 Gbps USB-C data port, two 5 Gbps USB-A ports, and a USB C 100W PD-IN port. Note: The USB C 100W PD-IN port supports only charging and does not support data transfer devices such as headphones or speakers.
  • Powerful Pass-Through Charging: Supports up to 85W pass-through charging so you can power up your laptop while you use the hub. Note: Pass-through charging requires a charger (not included). Note: To achieve full power for iPad, we recommend using a 45W wall charger.
  • Transfer Files in Seconds: Move files to and from your laptop at speeds of up to 5 Gbps via the USB-C and USB-A data ports. Note: The USB C 5Gbps Data port does not support video output.
  • HD Display: Connect to the HDMI port to stream or mirror content to an external monitor in resolutions of up to 4K@30Hz. Note: The USB-C ports do not support video output.
  • What You Get: Anker 332 USB-C Hub (5-in-1), welcome guide, our worry-free 18-month warranty, and friendly customer service.

Sign up free for 1,000 screenshots a month, with no card required.

FAQ

Can headless Chrome execute the same page JavaScript as regular Chrome?

Chrome for Developers says headless mode shares code with Chrome. A particular page can still behave differently because of its environment or workflow, so verify the page state your automation needs.

Can I use Panther without a Symfony application?

Yes. Symfony documents standalone use; require Composer’s vendor/autoload.php and install the package in your PHP project.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Does Panther support remote browser testing?

Its documentation names Selenium Grid, SauceLabs, and BrowserStack as supported remote testing options. Check each provider’s current setup and terms separately.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.