yocto/yoclib-netstring

This yocLibrary enables your project to encode and decode Netstring values in PHP.

v1.0.0 2023-11-18 18:00 UTC

This package is auto-updated.

Last update: 2024-10-18 19:48:09 UTC


README

This yocLibrary enables your project to encode and decode Netstring values in PHP.

Status

CI

Installation

composer require yocto/yoclib-netstring

Use

Encoding

use YOCLIB\Netstring\Netstring;

$string = 'abc';

$netstring = Netstring::encode($string);

Decoding

use YOCLIB\Netstring\Netstring;

$netstring = '3:abc,';

$string = Netstring::decode($netstring);