PHPackages                             fivefilters/readability.php - 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. fivefilters/readability.php

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

fivefilters/readability.php
===========================

A PHP port of Readability.js

v3.3.3(1y ago)3241.0M—0.1%374Apache-2.0PHPPHP &gt;=8.1CI passing

Since Nov 7Pushed 3d ago5 watchersCompare

[ Source](https://github.com/fivefilters/readability.php)[ Packagist](https://packagist.org/packages/fivefilters/readability.php)[ Docs](https://github.com/fivefilters/readability.php)[ RSS](/packages/fivefilters-readabilityphp/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (10)Dependencies (5)Versions (37)Used By (4)

Readability.php
===============

[](#readabilityphp)

[![Latest Stable Version](https://camo.githubusercontent.com/b577629759df1d5bee5ea081bfad2502720f827ba4162ddb62aff3fc652623d3/68747470733a2f2f706f7365722e707567782e6f72672f6669766566696c746572732f726561646162696c6974792e7068702f762f737461626c65)](https://packagist.org/packages/fivefilters/readability.php) [![Tests](https://github.com/fivefilters/readability.php/actions/workflows/main.yml/badge.svg?branch=master)](https://github.com/fivefilters/readability.php/actions/workflows/main.yml)

PHP port of *Mozilla's* **[Readability.js](https://github.com/mozilla/readability)**. Parses HTML (usually news stories and other articles) and returns the **title**, **author**, **main content** and other metadata, without nav bars, ads, footers, or anything that isn't the main body of the text.

[![Screenshot](https://raw.githubusercontent.com/fivefilters/readability.php/assets/screenshot.png)](https://raw.githubusercontent.com/fivefilters/readability.php/assets/screenshot.png)

Version 4.0 is a ground-up rewrite, produced using Claude Code (Anthropic's AI coding tool), to bring the code in line with the latest version of Readability.js (v0.6.0, transcribed method-for-method) and to take advantage of the new, faster native HTML parser introduced in PHP 8.4 ([Lexbor, included in the DOM extension](https://blog.keyvan.net/p/parsing-html-with-php-84)) and the new WHATWG URL parser introduced in PHP 8.5. It parses HTML the way modern browsers do, needs no third-party HTML parsing library, and is tested against Mozilla's own test corpus.

**Original Developer**: Andres Rey

**Developer/Maintainer**: FiveFilters.org

Requirements
------------

[](#requirements)

PHP 8.4+, ext-dom, and ext-mbstring.

How to use it
-------------

[](#how-to-use-it)

First require the library using composer:

`composer require "fivefilters/readability.php:^4.0"`

Then create a Readability instance and feed `parse()` your HTML. It returns an `Article` object:

```
