PHP code example of ashleydawson / canonically-flatten-tree
1. Go to this page and download the library: Download ashleydawson/canonically-flatten-tree 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/ */
ashleydawson / canonically-flatten-tree example snippets
is will produce an invalid argument exception stating the nature of the type failure and at what level
// In this case we're asserting that all tree nodes must be of type "string"
try {
\AshleyDawson\CanonicallyFlattenTree\canonically_flatten_scalar_tree(['alpha', [8]], 'string');
} catch (\InvalidArgumentException $e) {
var_dump($e);
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.