PHPackages                             phppackage/magic-class - 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. phppackage/magic-class

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

phppackage/magic-class
======================

A magical PHP class

v1.0.2(8y ago)114MITPHPPHP ~5.6|~7.0

Since Feb 8Pushed 8y ago1 watchersCompare

[ Source](https://github.com/phppackage/magic-class)[ Packagist](https://packagist.org/packages/phppackage/magic-class)[ Docs](http://github.com/phppackage/magic-class)[ RSS](/packages/phppackage-magic-class/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependencies (1)Versions (4)Used By (0)

Magic Class
-----------

[](#magic-class)

[![Build Status](https://camo.githubusercontent.com/e4d7194c0e56b7fa92c516a1d4ebbb52260affc830ee8fbe802d5db9dcbdfdae/68747470733a2f2f7472617669732d63692e6f72672f7068707061636b6167652f6d616769632d636c6173732e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/phppackage/magic-class)[![StyleCI](https://camo.githubusercontent.com/e85d8e52fb1bd1f03f6213fd60e8017d7027f1b405c7f8188e2ebbfa2dfdcde9/68747470733a2f2f7374796c6563692e696f2f7265706f732f3132303734383236372f736869656c643f6272616e63683d6d6173746572)](https://styleci.io/repos/120748267)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/b2ef86746e317a1ceacbc52ce4fd5c6cb05e333346d009467a4dcfefcb90dd41/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f7068707061636b6167652f6d616769632d636c6173732f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/phppackage/magic-class/?branch=master)[![Code Coverage](https://camo.githubusercontent.com/7a4aedac8a67221d5cd4ce161f02130f5da56525da70a44e6de4d7b73653e6d2/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f7068707061636b6167652f6d616769632d636c6173732f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/phppackage/magic-class/code-structure/master/code-coverage)[![Packagist Version](https://camo.githubusercontent.com/72a25c60ca78ac0017c107e1d736fccc67a27a93bd7c42d4c79e020c256a9090/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7068707061636b6167652f6d616769632d636c6173732e7376673f7374796c653d666c61742d737175617265)](https://github.com/phppackage/magic-class/releases)[![Packagist Downloads](https://camo.githubusercontent.com/2527742fb102c2186b422453d74ec95b8f81e1528093c9fb371223ac879f00ac/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7068707061636b6167652f6d616769632d636c6173732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/phppackage/magic-class)

A magical PHP class, which can be treated as an array or an object, which toString's to json.

Install
-------

[](#install)

Require this package with composer using the following command:

```
$ composer require phppackage/magic-class
```

### Usage example:

[](#usage-example)

```
