PHP code example of kenny1911 / php-clone-with
1. Go to this page and download the library: Download kenny1911/php-clone-with 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/ */
kenny1911 / php-clone-with example snippets
$copy = clone($object, ['property' => 'new value']);
use function Kenny1911\CloneWith\clone_with;
$copy = clone_with($object, ['property' => 'new value']);