1. Go to this page and download the library: Download gdianov/opium 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/ */
gdianov / opium example snippets
//$t is instance of: gdianov\opium\tests\classes\T
$t = $opium->make('t');
//$c is instance of: gdianov\opium\tests\classes\C with
//injected object $t by constructor
$c = $opium->make('c');
//$p is instance of: gdianov\opium\tests\classes\P with
//injected object $c by property and string by constructor
$p = $opium->make('p');
//You can injected dependency by property and constructor.