Find this useful? Enter your email to receive occasional updates for securing PHP code.
Signing you up...
Thank you for signing up!
PHP Decode
<?php namespace Illuminate\Foundation\Console; use Symfony\Component\Process\PhpExecutab..
Decoded Output download
<?php
namespace Illuminate\Foundation\Console;
use Symfony\Component\Process\PhpExecutableFinder;
use Symfony\Component\Process\Process;
trait InteractsWithComposerPackages
{
/**
* Installs the given Composer Packages into the application.
*
* @param string $composer
* @param array $packages
* @return bool
*/
protected function requireComposerPackages(string $composer, array $packages)
{
if ($composer !== 'global') {
$command = [$this->phpBinary(), $composer, 'require'];
}
$command = array_merge(
$command ?? ['composer', 'require'],
$packages,
);
return ! (new Process($command, $this->laravel->basePath(), ['COMPOSER_MEMORY_LIMIT' => '-1']))
->setTimeout(null)
->run(function ($type, $output) {
$this->output->write($output);
});
}
/**
* Get the path to the appropriate PHP binary.
*
* @return string
*/
protected function phpBinary()
{
return (new PhpExecutableFinder())->find(false) ?: 'php';
}
}
?>
Did this file decode correctly?
Original Code
<?php
namespace Illuminate\Foundation\Console;
use Symfony\Component\Process\PhpExecutableFinder;
use Symfony\Component\Process\Process;
trait InteractsWithComposerPackages
{
/**
* Installs the given Composer Packages into the application.
*
* @param string $composer
* @param array $packages
* @return bool
*/
protected function requireComposerPackages(string $composer, array $packages)
{
if ($composer !== 'global') {
$command = [$this->phpBinary(), $composer, 'require'];
}
$command = array_merge(
$command ?? ['composer', 'require'],
$packages,
);
return ! (new Process($command, $this->laravel->basePath(), ['COMPOSER_MEMORY_LIMIT' => '-1']))
->setTimeout(null)
->run(function ($type, $output) {
$this->output->write($output);
});
}
/**
* Get the path to the appropriate PHP binary.
*
* @return string
*/
protected function phpBinary()
{
return (new PhpExecutableFinder())->find(false) ?: 'php';
}
}
Function Calls
None |
Stats
MD5 | fcf091390ca55bbe281036a6a87123ed |
Eval Count | 0 |
Decode Time | 106 ms |