PHPackages                             mario-deluna/hip - 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. mario-deluna/hip

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

mario-deluna/hip
================

Ultra F\*\*\*ing simple human readable data serialization.

1.0.0(11y ago)102122MITPHP

Since Jan 23Pushed 10y ago2 watchersCompare

[ Source](https://github.com/mario-deluna/Hip)[ Packagist](https://packagist.org/packages/mario-deluna/hip)[ Docs](https://github.com/mario-deluna/Hip)[ RSS](/packages/mario-deluna-hip/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)DependenciesVersions (2)Used By (0)

[![Hip logo](https://cloud.githubusercontent.com/assets/956212/5924947/2c8542ba-a660-11e4-8f30-a50286353b3b.png)](https://cloud.githubusercontent.com/assets/956212/5924947/2c8542ba-a660-11e4-8f30-a50286353b3b.png)

**H**uman **I**n**p**ut / Simple human readable data markup.

[![Build Status](https://camo.githubusercontent.com/f4fd4413c09f70fb9cfe6d3d7770192bb87a6377fcd7ad4488c916c9e7502d90/68747470733a2f2f7472617669732d63692e6f72672f6d6172696f2d64656c756e612f4869702e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/mario-deluna/Hip)[![License](https://camo.githubusercontent.com/7e49699fb98f1fc318b5c65dc895ffdc97808faf33cfc4e17491ad2db0c12c41/687474703a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f636c616e636174732f6672616d65776f726b2e7376673f7374796c653d666c6174)](https://github.com/mario-deluna/Hip)

```
name: "Hip"
type: "Markup language"
version: 1.0
tags: "markup", "serialization", "language"
```

Hip does not try to replace any data markups or create a [new standard](http://xkcd.com/927/). The target of hip is to be readable and writable by non-technicals folks without out having to explain the syntax.

FAQ
---

[](#faq)

- **Why should I use this?** Sorry dude I don't know.. This data parser is an experiment and will maybe be implemented into the ClanCatsFramework 2.1. If you are looking for an approved and stable data serialization format use [YAML](http://yaml.org/). If you believe Hip could be useful, feel free, every user makes me happy :)

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

[](#installation)

This Hip parser is written in *PHP* using *PSR-4* autoloading you can install it using *composer*.

```
"require":
{
    "mario-deluna/hip": "dev-master"
}

```

Usage
-----

[](#usage)

### Encoding / Decoding

[](#encoding--decoding)

Decode a hip data string to an array:

```
Hip\Hip::decode( $hipString );
```

Encode an array to a hip data string:

```
Hip\Hip::decode( $myArray );
```

### Reading / Writing files

[](#reading--writing-files)

Read hip file:

```
Hip\Hip::read( 'my/path/to/file.hip' );
```

Write hip file:

```
Hip\Hip::write( 'my/path/to/file.hip', $myArray );
```

Hip syntax
----------

[](#hip-syntax)

### Simple key values

[](#simple-key-values)

```
name: "Zaphod beeblebrox"
job: "President of the Galaxy"
```

wich equals

```
{
    "name": "Zaphod beeblebrox",
    "job": "President of the Galaxy"
}
```

### Multi layer

[](#multi-layer)

```
recipe:
    duration: 60
    ingredients: "eggs", "bacon", "cream", "leek"
```

wich equals

```
{
    "recipe":
    {
        "duration": 60,
        "ingredients": [ "eggs", "bacon", "cream", "leek" ]
    }
}
```

### Array lists

[](#array-lists)

```
instruments:
    -
    name: "Guitar"
    strings: 6
    --
    name: "Bass"
    strings: 4
    -
```

wich equals

```
{
    "instruments":
    [
        {
            "name": "Guitar",
            "strings": 6
        },
        {
            "name": "Bass",
            "strings": 4
        }
    ]
}
```

### data types

[](#data-types)

```
string: "Hello World"
integer: 42
float: 3.14
yepBool: yes
nopeBool: no
nothing: nil
```

wich equals

```
{
    "string": "Hello World",
    "integer": 42,
    "float": 3.14,
    "yepBool": true,
    "nopeBool": false,
    "nothing": null
}
```

TODO
----

[](#todo)

- Hip config object / utility
- Automatic detect the level indicator ( space, tab etc. )
- more tests...

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity63

Established project with proven stability

 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

4133d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/e61ab6a12a82ed3b52c6e12b8da02b5b903f4833b6e503ac94738c1a9e16c345?d=identicon)[mario-deluna](/maintainers/mario-deluna)

---

Top Contributors

[![mario-deluna](https://avatars.githubusercontent.com/u/956212?v=4)](https://github.com/mario-deluna "mario-deluna (40 commits)")

---

Tags

dataserializationhip

### Embed Badge

![Health badge](/badges/mario-deluna-hip/health.svg)

```
[![Health](https://phpackages.com/badges/mario-deluna-hip/health.svg)](https://phpackages.com/packages/mario-deluna-hip)
```

###  Alternatives

[opis/closure

A library that can be used to serialize closures (anonymous functions) and arbitrary data.

2.6k230.0M284](/packages/opis-closure)[jms/serializer

Library for (de-)serializing data of any complexity; supports XML, and JSON.

2.3k135.8M851](/packages/jms-serializer)[jms/serializer-bundle

Allows you to easily serialize, and deserialize data of any complexity

1.8k89.3M627](/packages/jms-serializer-bundle)[google/flatbuffers

FlatBuffers for PHP

25.7k134.7k4](/packages/google-flatbuffers)[apache/avro

Apache Avro™ is a data serialization system.

3.2k26.8k3](/packages/apache-avro)[flix-tech/avro-serde-php

A library to serialize and deserialize Avro records making use of the confluent schema registry

674.0M17](/packages/flix-tech-avro-serde-php)

PHPackages © 2026

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