1. Go to this page and download the library: Download earc/cast 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/ */
use function eArc\Cast\cast;
use function eArc\Cast\cast_reverse;
cast($origin, $target, $mapping);
//.. do something with the target;
$origin = cast_reverse($target);
use function eArc\Cast\cast_simple;
use function eArc\Cast\generate_mapping;
return json_encode(cast_simple($object, [], generate_mapping($object)));
use eArc\Cast\CastService;
use eArc\Cast\Initializer;
class MyCastService extends CastService
{
// extend/rewrite logic
}
Initializer::init(new MyCastService());
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.