PHP code example of hvasoares / commons
1. Go to this page and download the library: Download hvasoares/commons 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/ */
hvasoares / commons example snippets
$top = new \hvasoares\commons\Registry();
$obj = new stdClass;
$top['someObject'] = $obj;
$obj == $top['someObject']; //will return true
$child = new \hvasoares\commons\Registry($top);
$child['someObject'] == $top['someObject']; //will return true
$newObj = new stdClass;
$child['someObject'] = $newObj;
$child['someObject'] == $top['someObject']; //will return false
$child['someObject] == $newObj; //will return true