PHP code example of aequasi / environment
1. Go to this page and download the library: Download aequasi/environment 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/ */
aequasi / environment example snippets
ronment = new Aequasi\Environment\Environment;
// By default, the environment is set to 'dev'
echo $environment->getType();
// Above will echo 'dev';
var_dump($environment->isDebug());
// Above will dump true
#!/usr/bin/env php
set_time_limit(0);
Symfony\Bundle\FrameworkBundle\Console\Application;
use Symfony\Component\Console\Input\ArgvInput;
use Symfony\Component\Debug\Debug;
use Aequasi\Environment\SymfonyEnvironment;
$input = new ArgvInput( );
$env = new SymfonyEnvironment( $input );
if( $env->isDebug() ) {
Debug::enable();
}
$kernel = new AppKernel( $env->getType(), $env->isDebug() );
$application = new Application($kernel);
$application->run( $input );