Instantly share code, notes, and snippets.

View php-simple-array-to-csv.php
<?php
class CsvLog
{
/**
* @var string
*/
private $path = '';
/**
* @var array
View php-custom-log.php
<?php
error_reporting(E_ALL);
ini_set('display_errors', 0);
ini_set('log_errors', 1);
ini_set('error_log', __DIR__ . '/logs/php-error.log');
View laravel-guzzle-response-cache.php
<?php namespace App\Clients\Middleware;
use GuzzleHttp\Psr7\Response;
use Psr\Http\Message\RequestInterface;
use Psr\Http\Message\ResponseInterface;
use GuzzleHttp\Promise\PromiseInterface;
use GuzzleHttp\Promise\FulfilledPromise;
use Illuminate\Contracts\Cache\Repository;
/**
View wp_terms_checklist_args_hierarchical.php
<?php
add_filter( 'wp_terms_checklist_args', function ( $args ) {
$args['checked_ontop'] = false;
return $args;
} );