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

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

armesas/phpquery
================

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

0.9.7(5y ago)059MITPHPPHP &gt;=5.3.3

Since Mar 21Pushed 5y agoCompare

[ Source](https://github.com/armesas/phpquery)[ Packagist](https://packagist.org/packages/armesas/phpquery)[ Docs](http://code.google.com/p/phpquery/)[ RSS](/packages/armesas-phpquery/feed)WikiDiscussions master Synced 1w ago

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

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

[](#revisiting-phpquery)

[![Build Status](https://camo.githubusercontent.com/c51e2c17a0da9e6877e1bf76333c1077cbb7e706a9d16fc996d833a065e0e7ec/68747470733a2f2f7472617669732d63692e6f72672f776974746977732f70687071756572792e706e673f6272616e63683d6d6173746572)](https://travis-ci.org/wittiws/phpquery)

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

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 57.7% 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.

###  Release Activity

Cadence

Every ~2675 days

Total

2

Last Release

2131d ago

### Community

Maintainers

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

---

Top Contributors

[![stackpr](https://avatars.githubusercontent.com/u/1994413?v=4)](https://github.com/stackpr "stackpr (30 commits)")[![miholeus](https://avatars.githubusercontent.com/u/310593?v=4)](https://github.com/miholeus "miholeus (6 commits)")[![electrolinux](https://avatars.githubusercontent.com/u/601587?v=4)](https://github.com/electrolinux "electrolinux (4 commits)")[![qris](https://avatars.githubusercontent.com/u/754175?v=4)](https://github.com/qris "qris (3 commits)")[![armesas](https://avatars.githubusercontent.com/u/8417509?v=4)](https://github.com/armesas "armesas (3 commits)")[![panrafal](https://avatars.githubusercontent.com/u/1268900?v=4)](https://github.com/panrafal "panrafal (2 commits)")[![TobiaszCudnik](https://avatars.githubusercontent.com/u/93027?v=4)](https://github.com/TobiaszCudnik "TobiaszCudnik (2 commits)")[![vitaliy-evsyukov](https://avatars.githubusercontent.com/u/370739?v=4)](https://github.com/vitaliy-evsyukov "vitaliy-evsyukov (1 commits)")[![lsowen](https://avatars.githubusercontent.com/u/1014577?v=4)](https://github.com/lsowen "lsowen (1 commits)")

### Embed Badge

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

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

###  Alternatives

[lullabot/amp

A set of useful classes and utilities to convert html to AMP html (See https://www.ampproject.org/)

3802.9M10](/packages/lullabot-amp)[padaliyajay/php-autoprefixer

CSS Autoprefixer written in pure PHP.

468.3M8](/packages/padaliyajay-php-autoprefixer)[northys/css-inliner

PHP Library that converts css file into html inline styles.

4516.2k](/packages/northys-css-inliner)[drupaljedi/css-tree-shaking

Helps you to eliminate the portions of CSS you aren't using. Usually should be used to generate AMP pages, where is the fixed limit for maximum styles size.

1122.3k](/packages/drupaljedi-css-tree-shaking)

PHPackages © 2026

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