PHPackages                             fuko-php/source - 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. fuko-php/source

ActiveLibrary

fuko-php/source
===============

Extracts chunks of source code identified by code references, e.g. filename + line

1.0.0(4y ago)142MITPHPPHP &gt;=7.1

Since Jun 8Pushed 4y ago1 watchersCompare

[ Source](https://github.com/fuko-php/source)[ Packagist](https://packagist.org/packages/fuko-php/source)[ RSS](/packages/fuko-php-source/feed)WikiDiscussions main Synced 1mo ago

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

Fuko\\Source [![GitHub license](https://camo.githubusercontent.com/c0534c03b5fe898ca52c280b289f0498cf08639eb420d1ae94270fbee1425a85/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f66756b6f2d7068702f736f757263652e737667)](https://github.com/fuko-php/source/blob/master/LICENSE) [![Latest Version](https://camo.githubusercontent.com/fcd236a503d46feb64792f7db6c25b3437c59f06d208e47549da76d0315b9aad/687474703a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f66756b6f2d7068702f736f757263652e737667)](https://packagist.org/packages/fuko-php/source)
====================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================

[](#fukosource--)

**Fuko\\Source** is a small PHP library that helps you to extracts chunks of source code identified by code references, e.g. filename + line.

It is really simple to use. Imagine you want to extract a piece of code, and you know what source code line exactly you want to reference: for example `/var/www/html/index.php` at line 17. You must first create a new `\Fuko\Source\Code`object, and then call the `getLinesAt()` method:

```
include __DIR__ . '/vendor/autoload.php';

$source = new \Fuko\Source\Code('/var/www/html/index.php');
print_r($source->getLinesAt(17));
/*
Array
(
    [14] => Illuminate\Support\ClassLoader::register();
    [15] => Illuminate\Support\ClassLoader::addDirectories(array(CLASS_DIR,CONTROLLERS,CONTROLLERS.'Middleware/', MODELS, CONTROLLERS.'Admin/'));
    [16] =>
    [17] => $FileLoader = new FileLoader(new Filesystem,  RESOURCES.'lang');
    [18] => $translator = new Translator($FileLoader, 'en');
    [19] => $Container = new Container();
    [20] => $validation = new Factory($translator, $Container);
)
*/
```

By default there are 7 lines of code (LOCs) returned, but you can specify a different number in the range of 1 to 20 (as defined in `\Fuko\Source\Code::LOC_MAX`):

```
include __DIR__ . '/vendor/autoload.php';

$source = new \Fuko\Source\Code('/var/www/html/index.php');
print_r($source->getLinesAt(17, 1));
/*
Array
(
    [17] => $FileLoader = new FileLoader(new Filesystem,  RESOURCES.'lang');
)
*/
```

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity46

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

Unknown

Total

1

Last Release

1805d ago

### Community

Maintainers

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

---

Top Contributors

[![kktsvetkov](https://avatars.githubusercontent.com/u/694812?v=4)](https://github.com/kktsvetkov "kktsvetkov (9 commits)")

---

Tags

fukofuko-phpsourcesource-codesourcefukofuko-phpsource-code

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/fuko-php-source/health.svg)

```
[![Health](https://phpackages.com/badges/fuko-php-source/health.svg)](https://phpackages.com/packages/fuko-php-source)
```

###  Alternatives

[nunomaduro/phpinsights

Instant PHP quality checks from your console.

5.6k10.8M426](/packages/nunomaduro-phpinsights)[fuko-php/masked

Masks sensitive data: replaces blacklisted elements with redacted values

14094.5k](/packages/fuko-php-masked)[sbamtr/laravel-source-encrypter

Laravel Source Encrypter

58545.6k](/packages/sbamtr-laravel-source-encrypter)[koraktor/steam-condenser

The Steam Condenser is a library for querying the Steam Community, Source and GoldSrc game servers

21045.6k](/packages/koraktor-steam-condenser)

PHPackages © 2026

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