PHP code example of rubellum / phpbag
1. Go to this page and download the library: Download rubellum/phpbag 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/ */
rubellum / phpbag example snippets
use Bag\Bag;
$bag = new Bag(['aaa' => 'bbb', 'ccc' => 'ddd']);
// array access
echo $bag['aaa']; // => 'bbb'
// property access
echo $bag->aaa; // => 'bbb'