PHPackages                             bkuhl/php-selector - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. bkuhl/php-selector

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

bkuhl/php-selector
==================

v1.0(8y ago)1412.7k↑250%MITPHP

Since Oct 13Pushed 8y agoCompare

[ Source](https://github.com/bkuhl/php-selector)[ Packagist](https://packagist.org/packages/bkuhl/php-selector)[ RSS](/packages/bkuhl-php-selector/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

PHP Selector
============

[](#php-selector)

[![Latest Stable Version](https://camo.githubusercontent.com/36493a74934c8ac81ab2a400c337df0ec0a5e984393b78c581046d1063c11261/68747470733a2f2f706f7365722e707567782e6f72672f626b75686c2f7068702d73656c6563746f722f762f737461626c652e706e67)](https://packagist.org/packages/bkuhl/php-selector) [![Total Downloads](https://camo.githubusercontent.com/77192918889051b86c3849662e1df95bfef69718bf4ece780ceac097b3a510d9/68747470733a2f2f706f7365722e707567782e6f72672f626b75686c2f7068702d73656c6563746f722f646f776e6c6f6164732e706e67)](https://packagist.org/packages/bkuhl/php-selector) [![Build Status](https://camo.githubusercontent.com/e9f496448a95147c8af5acfb6272a77e82e7b9443ac117cb208ca8407ade5528/68747470733a2f2f7472617669732d63692e6f72672f626b75686c2f7068702d73656c6563746f722e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/bkuhl/php-selector)

A simple DOM query library originally written by [tj](https://github.com/tj/php-selector).

Installation
------------

[](#installation)

```
composer require bkuhl/php-selector:~1.0

```

Usage
-----

[](#usage)

Given the sample html:

```
$html = find('div > h2:contains(Article)'));
var_dump($dom->find('div p + ul'));
var_dump($dom->find('ul > li:first-child'));
var_dump($dom->find('ul > li ~ li'));
var_dump($dom->find('ul > li:last-child'));
var_dump($dom->find('li a[href=#]'));
```

###  Health Score

35

—

LowBetter than 80% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity31

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

3139d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/27b36d1b791b775002187bab1daf9eda7c676290aa5ba9891497c376b2b3c69a?d=identicon)[bkuhl](/maintainers/bkuhl)

---

Top Contributors

[![Darhazer](https://avatars.githubusercontent.com/u/679778?v=4)](https://github.com/Darhazer "Darhazer (15 commits)")[![tj](https://avatars.githubusercontent.com/u/25254?v=4)](https://github.com/tj "tj (14 commits)")[![rez1dent3](https://avatars.githubusercontent.com/u/5111255?v=4)](https://github.com/rez1dent3 "rez1dent3 (9 commits)")[![Lcfvs](https://avatars.githubusercontent.com/u/2665124?v=4)](https://github.com/Lcfvs "Lcfvs (2 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/bkuhl-php-selector/health.svg)

```
[![Health](https://phpackages.com/badges/bkuhl-php-selector/health.svg)](https://phpackages.com/packages/bkuhl-php-selector)
```

###  Alternatives

[magepal/magento2-form-field-manager

Customer and Address Form Fields Manager for Magento2

293.8k](/packages/magepal-magento2-form-field-manager)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
