PHPackages                             volt/modern\_php\_scanner - 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. volt/modern\_php\_scanner

ActiveLibrary

volt/modern\_php\_scanner
=========================

Scan URLs from an array and return an array of inaccessible URLs. An example component from Josh Lockhart's book "Modern PHP" (2015)

0.1.1(10y ago)030MITPHPPHP &gt;=5.4

Since Mar 20Pushed 10y ago1 watchersCompare

[ Source](https://github.com/voltel/Scanner-by-Josh-Lockhart)[ Packagist](https://packagist.org/packages/volt/modern_php_scanner)[ Docs](https://github.com/voltel/scanner)[ RSS](/packages/volt-modern-php-scanner/feed)WikiDiscussions master Synced 2mo ago

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

volt/modern\_php\_scanner
=========================

[](#voltmodern_php_scanner)

[![Latest Version on Packagist](https://camo.githubusercontent.com/fe29160c5247ad5aa2dcfe3c4d1482178f073da4c068b7c843f6df9d5ee76afe/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f766f6c742f6d6f6465726e5f7068705f7363616e6e65722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/volt/modern_php_scanner)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Build Status](https://camo.githubusercontent.com/a3a84b1c9cc47e477f68ff2b34cdb11acc53fb0fea3f40bcb43737579c95fe96/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f766f6c742f6d6f6465726e5f7068705f7363616e6e65722f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/volt/modern_php_scanner)[![Coverage Status](https://camo.githubusercontent.com/e40790b68a17f9ca0f537c50031f44ffed777e0465b6daf2871249230a151f48/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f766f6c742f6d6f6465726e5f7068705f7363616e6e65722e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/volt/modern_php_scanner/code-structure)[![Quality Score](https://camo.githubusercontent.com/16f293f5351ece770151fca5700e04ae93588f1976b56778c18b13d94c037f7e/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f766f6c742f6d6f6465726e5f7068705f7363616e6e65722e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/volt/modern_php_scanner)[![Total Downloads](https://camo.githubusercontent.com/22253bf6bc78da4a527f57e4828e255e4a63d4ceeb6d4e0d4e1a84c70a3e66ef/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f766f6c742f6d6f6465726e5f7068705f7363616e6e65722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/volt/modern_php_scanner)

It is just an educational test project. It is a slightly modified example from Josh Lockhart's book **"Modern PHP" by O'Reilly (2015)**.

For original code see [a related GitHub page](https://github.com/modern-php/scanner). You may as well look througgh \[a forked version\] () for some code modifications.

This component uses PSR-4 autoload and utilizes `Oreilly\ModernPhp\` namespace.
For class identification use `\Oreilly\ModernPhp\Url\Scanner` class name.

Install
-------

[](#install)

Via Composer

```
$ composer require volt/modern_php_scanner
```

Usage
-----

[](#usage)

---

```
    // an array of test links
    $a_urls = array(
        'http://www.pravda.com.ua',
        'http://www.xpravda.ua',
        'http://php.net/manual/ru/wrappers.php.php',
        'http://uberhumor.com/',
        'https://github.com/frankperez87/scanner/blob/master/src/Url/Scanner.php',
        'https://www.google.com.ua/maps/'
    );

    $o_scanner = new \Oreilly\ModernPhp\Url\Scanner($a_urls); // instantiate the component class

    $a_invalid_urls_arrays = $o_scanner->getInvalidUrls(); // get an array with resutls of scan

    // print_r($a_invalid_urls_arrays);

    // == the end ==

    // the rest of the code below is compiling html markup for output in $c_html_url_result
    // from array of arrays ($a_invalid_urls_arrays)

    $c_html_url_result = null;
    if (empty($a_invalid_urls_arrays)) {
        $c_html_url_result = "All provided URLs are valid";

    } else {
        $c_html_lis = null;

        foreach((array)$a_invalid_urls_arrays as $a_url_data){

            $c_url = array_key_exists('url', $a_url_data)? $a_url_data['url'] : 'N/A';
            $n_status_code = array_key_exists('status_code', $a_url_data)?
                $a_url_data['status_code'] : 'N/A';

            $c_html_url = htmlspecialchars($c_url, ENT_QUOTES);
            $c_html_lis .= "{$c_html_url} Status message: {$n_status_code}";
        }//endforeach

        $c_html_url_result = "The following URLs are invalid:"
            . "" . $c_html_lis . "";
    }//endif

    echo $c_html_url_result;
```

---

Change log
----------

[](#change-log)

Don't bother looking at [CHANGELOG](CHANGELOG.md) for no additional information on changes is planned to be added.

Testing
-------

[](#testing)

```
 $ composer test
```

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) and [CONDUCT](CONDUCT.md) for details.

Security
--------

[](#security)

Bare in mind, this is just a test project. If you discover any security related issues, please ignore them. You may as well use the issue tracker.

Credits
-------

[](#credits)

- [Volodymyr Telnov](https://github.com/voltel)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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 ~0 days

Total

2

Last Release

3708d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/113125?v=4)[Ryan](/maintainers/volt)[@Volt](https://github.com/Volt)

---

Top Contributors

[![voltel](https://avatars.githubusercontent.com/u/17889468?v=4)](https://github.com/voltel "voltel (32 commits)")

---

Tags

urlvoltscannermodern-phpJosh LockhartOreilly

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/volt-modern-php-scanner/health.svg)

```
[![Health](https://phpackages.com/badges/volt-modern-php-scanner/health.svg)](https://phpackages.com/packages/volt-modern-php-scanner)
```

PHPackages © 2026

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