Registry / utility / browscap-browscap-php

browscap-browscap-php

JSON →
library7.7.1phppackagistunverified

Standalone replacement for PHP's native get_browser() function.

composer require browscap/browscap-php
INSTALL
IMPORT
SIG · BROWSCAP-BROWSCAP-
B
browscap-browscap-php
utilityphpv7.7.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Browscap
use BrowscapPHP\Browscap;

Detect browser capabilities from a user agent string.

<?php use BrowscapPHP\Browscap; $browscap = new Browscap(); $browser = $browscap->getBrowser('Mozilla/5.0 ...'); echo $browser->getBrowser();
Debug
Known issues
gotchaRequires PHP 7.4+; large cache file may cause memory issues.
fix
Use a persistent cache like Redis or APCu.
affects: >=7.0.0
Upgrade
Version history
7.7.1latest on Packagist
Audit
Dependencies

No dependency data recorded yet.

Agent activity
7 hits · last 30 days
node
6
Meta
1
Resources
browscap-browscap-php — pip install browscap-browscap-php · libregistry