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

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

khongchi/phpquery
=================

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

0.9.6(13y ago)0302MITPHP

Since Mar 21Pushed 10y ago1 watchersCompare

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

READMEChangelogDependenciesVersions (2)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

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity53

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

Unknown

Total

1

Last Release

4806d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/3a8cfd3ddfa4d227ea7d93d93c0e89439ca26330eb4bea41780bfb4d4b23d4f7?d=identicon)[khongchi](/maintainers/khongchi)

---

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)")[![khongchi](https://avatars.githubusercontent.com/u/1772843?v=4)](https://github.com/khongchi "khongchi (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/khongchi-phpquery/health.svg)

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

PHPackages © 2026

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