PHP code example of sy / container

1. Go to this page and download the library: Download sy/container 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/ */

    

sy / container example snippets




use Sy\Container;

$container = new Container();

// Set an entry
$container->foo = function() {
	return 'hello';
};

// Get an entry
$var = $container->foo;

// Check an entry
if (isset($container->foo))