PHP code example of gregorj / to-string
1. Go to this page and download the library: Download gregorj/to-string 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/ */
gregorj / to-string example snippets
use GregorJ\ToString\ToString;
echo ToString::fromAny(true);
// true
echo ToString::fromAny("hello\nworld");
// hello\nworld
echo ToString::fromAny(['name' => 'Hello', 'value' => 2.7, 'nothing' => null]);
// [name: "Hello", value: 2.7, nothing: null]
echo ToString::fromAny(new stdClass());
// stdClass