Skip to content

Instantly share code, notes, and snippets.

@rohankhudedev
rohankhudedev / opcache.ini
Last active July 20, 2024 05:21
Best Zend OpCache Settings / Tuning / Configurations
[opcache]
; Determines if Zend OPCache is enabled
opcache.enable=1
; Determines if Zend OPCache is enabled for the CLI version of PHP
;opcache.enable_cli=1
; The OPcache shared memory storage size.
opcache.memory_consumption=512
@puiutucutu
puiutucutu / autoload_for_linux.php
Last active December 5, 2022 22:48
PHP spl_autoload_register for linux servers
<?php
// instantiate SPL (Standard PHP Library) Autoloader
spl_autoload_register(function ($class) {
// replace namespace separators with directory separators and append with .php
$file = str_replace('\\', '/', $class . '.php');
if (file_exists($file)) {
require $file;