PHP code example of spaze / phpinfo

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

    

spaze / phpinfo example snippets


$phpInfo = new \Spaze\PhpInfo\PhpInfo();
$html = $phpInfo->getHtml();

$this->template->phpinfo = Html::el()->setHtml($this->phpInfo->getHtml());

$phpInfo = new \Spaze\PhpInfo\PhpInfo();
echo $phpInfo->getFullPageHtml();

addSanitization(string $sanitize, ?string $with = null): self

$phpInfo->addSanitization($this->sessionHandler->getId(), '[***]'); // where $this->sessionHandler is your custom service for example

$phpInfo->addSanitization($_COOKIE['MYSESSID'], '[***]'); // where MYSESSID is your session name

$sanitizer = new \Spaze\PhpInfo\SensitiveValueSanitizer();
$string = $sanitizer->addSanitization('🍍', '🍌')->sanitize('🍍🍕');

$phpInfo = new \Spaze\PhpInfo\PhpInfo($sanitizer);
$html = $phpInfo->getHtml();