PHPackages                             mlb0925/phpquery - 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. mlb0925/phpquery

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

mlb0925/phpquery
================

PHP5.3+ namespaced version of phpQuery with enhanced CSS support

01PHP

Since Aug 17Pushed 2y ago1 watchersCompare

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

READMEChangelogDependenciesVersions (1)Used By (0)

Revisiting PhpQuery
===================

[](#revisiting-phpquery)

支持 php7.4+以上的版本

使用方法
====

[](#使用方法)

```
composer require mlb0925/phpquery

```

[![Build Status](https://camo.githubusercontent.com/889fde21afa017cef8375e43bf0732fd5efaa8077953d384cbedbcc259cc0d12/68747470733a2f2f7472617669732d63692e6f72672f776974746977732f70686f6e6172632e706e673f6272616e63683d6d6173746572)](https://travis-ci.org/wittiws/phonarc)

Basic usage of this fork
------------------------

[](#basic-usage-of-this-fork)

```
// This gives you the phpQuery object as normally used.
use PhpQuery\PhpQuery as phpQuery;

// This creates the pq() function in your namespace.
PhpQuery::use_function(__NAMESPACE__);

// This creates the pq() function in the global namespace.
PhpQuery::use_function();
```

About this fork
---------------

[](#about-this-fork)

This fork includes several modernizations:

1. Merged  with
2. Removed CSSParser from this repository and included it via composer
3. Added PhpQuery\\ namespace
4. Adjusted the folder structure to reflect usage of PSR-4
5. Corrected the unit tests and integrated with travis-ci

Beyond these adjustments, this project will be minimally maintained. For more phpQuery usage information and fork history, I highly recommend you review the  README.

Very Similar Project
--------------------

[](#very-similar-project)

See [QueryPath](https://github.com/technosophos/querypath) for a more active project that also works to replicate the jQuery syntax for PHP.

My Preferred Alternative
------------------------

[](#my-preferred-alternative)

There are several alternatives to phpQuery out there. While several have a healthy adoption rate, I was looking for a library that leveraged SimpleXML and focused on the PHP use case rather than building all of the functionality from scratch and adding unnecessarily methods and selectors simply for jQuery semantic completeness. In the end, I selected to launch a project that attempts to a be a PHP-centric lightweight wrapper for SimpleXML. [Learn more about QuipXml.](https://github.com/wittiws/quipxml)

###  Health Score

13

—

LowBetter than 1% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity1

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity21

Early-stage or recently created project

 Bus Factor1

Top contributor holds 60% of commits — single point of failure

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/c973556e5a5af567cb65557f84e1771291bc5b6fcd9d0fa8c54cad1b9a6e0096?d=identicon)[shophome](/maintainers/shophome)

---

Top Contributors

[![lanrenchengxu](https://avatars.githubusercontent.com/u/37446565?v=4)](https://github.com/lanrenchengxu "lanrenchengxu (3 commits)")[![mlb0925](https://avatars.githubusercontent.com/u/1799159?v=4)](https://github.com/mlb0925 "mlb0925 (2 commits)")

### Embed Badge

![Health badge](/badges/mlb0925-phpquery/health.svg)

```
[![Health](https://phpackages.com/badges/mlb0925-phpquery/health.svg)](https://phpackages.com/packages/mlb0925-phpquery)
```

###  Alternatives

[php-smpp/php-smpp

PHP-based SMPP client lib

234197.5k8](/packages/php-smpp-php-smpp)[tanmuhittin/nova-scroll-top

On route change scrolls to the top

22216.2k](/packages/tanmuhittin-nova-scroll-top)[hirasso/focal-point-picker

Zero-dependency custom focal point picker for your WordPress images 🎯

355.0k](/packages/hirasso-focal-point-picker)

PHPackages © 2026

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