PHPackages                             monospice/spicy-identifiers - 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. [Parsing &amp; Serialization](/categories/parsing)
4. /
5. monospice/spicy-identifiers

ActiveLibrary[Parsing &amp; Serialization](/categories/parsing)

monospice/spicy-identifiers
===========================

An easy way to parse and manipulate identifier names, such as dynamic method names.

0.1.0(9y ago)5945.6k—8.6%58MITPHPPHP &gt;=5.4.0

Since Aug 12Pushed 9y ago1 watchersCompare

[ Source](https://github.com/monospice/spicy-identifiers)[ Packagist](https://packagist.org/packages/monospice/spicy-identifiers)[ RSS](/packages/monospice-spicy-identifiers/feed)WikiDiscussions 1.0.x Synced 1mo ago

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

Spicy Identifiers
=================

[](#spicy-identifiers)

[![Build Status](https://camo.githubusercontent.com/dd378f6df891907c3278cf4d224b060d4056c89462e7ab2b762ffd5cbd12a109/68747470733a2f2f7472617669732d63692e6f72672f6d6f6e6f73706963652f73706963792d6964656e746966696572732e7376673f6272616e63683d312e302e78)](https://travis-ci.org/monospice/spicy-identifiers)

**An easy way to parse and manipulate identifier names, such as dynamic method names.**

This package improves the experience of working with dynamic identifier names such as dynamically accessed methods and variables/properties. It also eases conversion between identifer case formats like `camelCase` and `snake_case`.

For instance, imagine that we have a configuration file that contains an array of configuration directives and a class that consumes those directives. If we write the configuration keys in `snake_case`, but the class uses `camelCase`to define corresponding setter methods, we can use this package to bridge the two more easily. See below for an example.

**Note:** The current stable version only includes support for working with dynamic methods and functions. Support for classes, variables, and properties is under development.

Simple Examples
---------------

[](#simple-examples)

Developers often [use PHP's magic methods to dynamically overload class methods](http://php.net/manual/en/language.oop5.overloading.php#object.call)for more flexible functionality. This package can simplify the work needed to handle the dynamic method call:

```
