Skip to content

Instantly share code, notes, and snippets.

@taufik-nurrohman
taufik-nurrohman / php-html-css-js-minifier.php
Last active February 23, 2024 04:30
PHP Function to Minify HTML, CSS and JavaScript
<?php
// Based on <https://github.com/mecha-cms/x.minify>
namespace x\minify\_ { // start namespace
$n = __NAMESPACE__;
\define($n . "\\token_boolean", '\b(?:true|false)\b');
\define($n . "\\token_number", '-?(?:(?:\d+)?\.)?\d+');
@wgh000
wgh000 / countries.php
Created April 29, 2014 12:26
Nazioni Mondo - Array PHP
<?php
$countries = array(
'AD' => 'Andorra',
'AE' => 'United Arab Emirates',
'AF' => 'Afghanistan',
'AG' => 'Antigua &amp; Barbuda',
'AI' => 'Anguilla',
'AL' => 'Albania',
'AM' => 'Armenia',
'AN' => 'Netherlands Antilles',