PHP code example of yocto / yoclib-netstring

1. Go to this page and download the library: Download yocto/yoclib-netstring library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

yocto / yoclib-netstring example snippets


use YOCLIB\Netstring\Netstring;

$string = 'abc';

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

use YOCLIB\Netstring\Netstring;

$netstring = '3:abc,';

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