PHPackages                             baha2rmirzazadeh/phpscanner - 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. [CLI &amp; Console](/categories/cli)
4. /
5. baha2rmirzazadeh/phpscanner

ActiveLibrary[CLI &amp; Console](/categories/cli)

baha2rmirzazadeh/phpscanner
===========================

A php library to handle input stream. It inspired from Java Scanner class.

v1.5.5(6y ago)1792MITPHPPHP ^7.2

Since Oct 2Pushed 6y ago1 watchersCompare

[ Source](https://github.com/Baha2rM98/PHPScanner)[ Packagist](https://packagist.org/packages/baha2rmirzazadeh/phpscanner)[ RSS](/packages/baha2rmirzazadeh-phpscanner/feed)WikiDiscussions master Synced yesterday

READMEChangelog (5)DependenciesVersions (10)Used By (2)

PHPScanner
==========

[](#phpscanner)

This library contains efficient classes and methods to work with input stream data for example: get numbers and strings from input stream(keyboard), also have some features for open and read files.

This library inspired from Scanner class in Java.

Features
--------

[](#features)

Get input stream as integer, float, string etc. Also it provide some methods to open and read files.

You can find more information in documentation.

Installation
------------

[](#installation)

Use \[Composer\] to install this package:

```
$ composer require baha2rmirzazadeh/phpscanner

```

Example
-------

[](#example)

```
use PHPScanner\Scanner\Scanner;

$scn = new Scanner();
$a = $scn->nextString();
print $a;

$m = $scn->nextFloat();
print $m;

$a = array();
for ($i = 0; $i < 3; $i++) {
    $a[$i] = $scn->nextInt();
}
print_r($a);

$file_reader = new Scanner("C:\Users\Baha2r\Desktop\A.txt");
$file = "";
while ($file_reader->hasNext()) {
    $file .= $file_reader->nextLine();
}
$file_reader->close();
print $file;
echo "\n";
```

### Classes and Methods description

[](#classes-and-methods-description)

All of classes and methods have documentation, you can read them and figure out how they work

Authors
-------

[](#authors)

- \[Bahador Mirzazadeh\]
- E-Mail: \[\]

License
-------

[](#license)

All contents of this package library are licensed under the \[MIT license\].

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity59

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 ~14 days

Recently: every ~22 days

Total

9

Last Release

2295d ago

PHP version history (2 changes)1.0.0PHP &gt;=7.1.0

v1.5.4PHP ^7.2

### Community

Maintainers

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

---

Top Contributors

[![Baha2rM98](https://avatars.githubusercontent.com/u/49520007?v=4)](https://github.com/Baha2rM98 "Baha2rM98 (90 commits)")

---

Tags

php-libraryphp7phpcliinputscannerpromptinput stream

### Embed Badge

![Health badge](/badges/baha2rmirzazadeh-phpscanner/health.svg)

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

###  Alternatives

[nunomaduro/termwind

It's like Tailwind CSS, but for the console.

2.5k239.8M286](/packages/nunomaduro-termwind)[seld/cli-prompt

Allows you to prompt for user input on the command line, and optionally hide the characters they type

24725.8M17](/packages/seld-cli-prompt)[nunomaduro/laravel-console-task

Laravel Console Task is a output method for your Laravel/Laravel Zero commands.

2582.1M11](/packages/nunomaduro-laravel-console-task)[mehrancodes/laravel-harbor

A CLI tool to Quickly create On-Demand preview environment for your apps.

9989.0k](/packages/mehrancodes-laravel-harbor)[alecrabbit/php-cli-snake

Lightweight cli spinner with zero dependencies

29211.3k5](/packages/alecrabbit-php-cli-snake)

PHPackages © 2026

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