PHP code example of axy / envnorm

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

    

axy / envnorm example snippets


use axy\envnorm\Normalizer;

$normalizer = new Normalizer();
$normalizer->normalize();

Normalizer::createInstance()->normalize();

$config = [
    'datetime' => null,
    'encoding' => 'Windows-1251',
];

Normalizer::createInstance($config)->normalize();

[
    'errors' => [
        'level' => E_ALL,
        'display' => null,
        'handler' => true,
        'ErrorException' => 'ErrorException',
        'exceptionHandler' => null,
        'allowSuppression' => true,
    ],
    'datetime' => [
        'timezone' => 'UTC',
        'keepTimezone' => true,
    ],
    'encoding' => 'UTF-8',
    'options' => [],
];

$custom = [
    'errors' => [
        'handler' => null, // do not use a custom error handler
    ],
    'datetime' => null, // do not perform any action on the date and time settings
];

$a = [];
$a['a'] = $a['b']; // ErrorException

$a = [];
$a['a'] = @$a['b'];

$config = [
    'options' => [
        'sendmail_from' => '[email protected]',
        'mysqli.default_port' => 3307,
    ],
];