PHP code example of mf / stringify

1. Go to this page and download the library: Download mf/stringify 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/ */

    

mf / stringify example snippets


use MF\Stringify\Stringify;

echo Stringify::stringify([1, 2, 3]);   // "[1, 2, 3]"

use function MF\Stringify\stringify;

echo stringify([1, 2, 3]);   // "[1, 2, 3]"

$result = array_map(stringify(...), [1, 'two']); // ['1', '"two"']

use function MF\Stringify\sprintf;

echo sprintf('Hello %A!', 'world');     // Hello "world"!
echo sprintf('Hello %A!', ['world']);   // Hello ["world"]!