PHPackages                             phpnuts/basics - 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. phpnuts/basics

ActiveLibrary

phpnuts/basics
==============

Basics library for PhpNuts

51PHP

Since Nov 10Pushed 6y agoCompare

[ Source](https://github.com/gwillings/phpnuts-basics)[ Packagist](https://packagist.org/packages/phpnuts/basics)[ RSS](/packages/phpnuts-basics/feed)WikiDiscussions master Synced 4d ago

READMEChangelogDependenciesVersions (1)Used By (0)

PhpNuts Basics
==============

[](#phpnuts-basics)

The code within this repository was originally intended to support content added to the PhpNuts YouTube channel:

You can experiment with the code in this repository to learn about PHP. Or, try using it for your own code development.

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

[](#installation)

I recommend installing PhpNuts Basics through [Composer](http://getcomposer.org).

```
composer require phpnuts/basics
```

After installing, you need to require Composer's autoloader:

```
require 'vendor/autoload.php';
```

BasicObject
-----------

[](#basicobject)

In my first PhpNuts video we demonstrated how to create a useful base object from which we can build useful utility classes. This was called BasicObject.

There's a video demonstrating how I made BasicObject and why it's important here:

```
$person = new BasicObject([
    'firstName' => '',
    'lastName' => ''
]);

// These are essentially all the same:
// a) set() method call
$person->set('firstName', 'Bob');

// b) __set() magic method call
$person->firstName = 'Bob';

// c) __call() magic method call
$person->setFirstName('Bob');
```

In most cases, where BasicObject has been extended it is best to use the \_\_call() method because this makes life much easier in the long-term when it comes to refactoring your code.

More soon
---------

[](#more-soon)

Now that this small library is starting to grow, I hope to add more documentation outside of YouTube.

###  Health Score

18

—

LowBetter than 8% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity35

Early-stage or recently created project

 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.

### Community

Maintainers

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

---

Top Contributors

[![gwillings](https://avatars.githubusercontent.com/u/4246446?v=4)](https://github.com/gwillings "gwillings (15 commits)")

### Embed Badge

![Health badge](/badges/phpnuts-basics/health.svg)

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

PHPackages © 2026

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