PHP code example of struggle-for-php / sfp-phpstan-psr-log
1. Go to this page and download the library: Download struggle-for-php/sfp-phpstan-psr-log 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/ */
struggle-for-php / sfp-phpstan-psr-log example snippets
// bad
$logger->info('message are {foo-hyphen}');
// bad
$logger->info('message are {{foo}}');
// bad
$logger->info('message has {nonContext} .');
// bad
$logger->info('user {user_id} gets an error {error} .', ['user_id' => $user_id]);