PHPackages                             erebot/callable-wrapper - 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. erebot/callable-wrapper

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

erebot/callable-wrapper
=======================

Callable wrapper for PHP &lt; 5.4.0

1.0.0(9y ago)01.4k1GPL-3.0+PHPPHP &gt;=5.3.0

Since Apr 5Pushed 8y ago1 watchersCompare

[ Source](https://github.com/Erebot/CallableWrapper)[ Packagist](https://packagist.org/packages/erebot/callable-wrapper)[ Docs](https://github.com/Erebot/CallableWrapper)[ RSS](/packages/erebot-callable-wrapper/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependencies (2)Versions (3)Used By (1)

A DEPRECATED wrapper for the callable typehint in PHP &lt; 5.4.0
================================================================

[](#a-deprecated-wrapper-for-the-callable-typehint-in-php--540)

Warning

This component is now deprecated and is unneeded in newer versions of PHP. Do not use it in new code.

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

[](#installation)

Download the [composer.phar](https://getcomposer.org/composer.phar)executable or use the installer.

```
$ curl -sS https://getcomposer.org/installer | php
```

Create a `composer.json` that requires Erebot's Callable component.

```
{
    "require": {
        "erebot/callable-wrapper": "dev-master"
    }
}
```

Run Composer.

```
$ php composer.phar install
```

Usage
-----

[](#usage)

To use the wrapper, first include composer's autoloader and call `Erebot\\CallableWrapper::initialize()`, this will make sure everything is set up properly.

Now, use `Erebot\\CallableWrapper::wrap()` every time you want to execute some callable code while using the `callable` typehint.

```
