Litterae.eu
Humanities & IT


MiniFunx for dummies

๐Ÿ‡ฎ๐Ÿ‡น Di seguito le funzioni PHP presenti in MiniFunx spiegate e con esempi d'uso.
๐Ÿ‡ฌ๐Ÿ‡ง Here you may find MiniFunx PHP functions with explanations and usage exemples.

CLI()
๐Ÿ‡ฎ๐Ÿ‡น Sostituisce <br> con \n, se PHP sta funzionando da terminale.
๐Ÿ‡ฌ๐Ÿ‡ง It replaces <br> with \n if PHP is running from terminal (CLI).
echo cli("Break after this line.<br>");

CONTAINS()
๐Ÿ‡ฎ๐Ÿ‡น Verifica se una stringa contiene un dato testo. Non distingue tra maiuscole e minuscole.
๐Ÿ‡ฌ๐Ÿ‡ง It checks if a string contains a word. Case insensitive check.
if (contains("Alice in Wonderland","in")) { echo "ok"; } else { echo "no"; }

DATE_ITALIAN()
๐Ÿ‡ฎ๐Ÿ‡น Converte una stringa data nel formato italiano: nome del giorno, data, nome del mese, anno.
๐Ÿ‡ฌ๐Ÿ‡ง It converts a date string to the Italian format and language: day name, day number, month name, year.
date_italian("2023/05/24");

DEACCENT()
๐Ÿ‡ฎ๐Ÿ‡น Ricodifica le lettere con segni diacritici, ad esempio per usare una stringa come parte di un indirizzo.
๐Ÿ‡ฌ๐Ÿ‡ง It removes and codes accents in a string, e.g. for URL purposes.
$page = deaccent("C'รจ chi sรฌ e c'รจ chi no.");

DIACRITICS()
๐Ÿ‡ฎ๐Ÿ‡น Elimina segni diacritici e accenti da una stringa in caratteri latini, ad esempio per usarla come parte di un indirizzo.
๐Ÿ‡ฌ๐Ÿ‡ง It removes diacritics and accents in a string encoded in Latin characters, e.g. for URL purposes.
$page = diacritics("D'oรน la tempรชte est arrivรฉe.");

FCLOSE_MULTI()
๐Ÿ‡ฎ๐Ÿ‡น Chiude piรน file alla volta.
๐Ÿ‡ฌ๐Ÿ‡ง It closes more files at a time.
fclose_multi("one.csv","two.txt","three");

HAS_NUMBERS()
๐Ÿ‡ฎ๐Ÿ‡น Verifica se una stringa contiene dei numeri.
๐Ÿ‡ฌ๐Ÿ‡ง It checks if a string contains any numbers.
if (has_numbers("Born in 1999.")) { echo "ok"; } else { echo "no"; }

INCLUDE_MULTI()
๐Ÿ‡ฎ๐Ÿ‡น Include piรน file alla volta.
๐Ÿ‡ฌ๐Ÿ‡ง It includes more files at a time.
include_multi("one.php","two.php","three.php");

RASNA()
๐Ÿ‡ฎ๐Ÿ‡น Converte testo latino destrorso in caratteri sinistrorsi etruschi del blocco Old Italian Unicode; necessita del font Rasna Haiku per funzionare correttamente.
๐Ÿ‡ฌ๐Ÿ‡ง It converts Latin text to Old Italic Unicode RTL for Etruscan; it needs the Rasna Haiku font to work properly.
rasna("acale");

REACCENT()
๐Ÿ‡ฎ๐Ÿ‡น Ripristina i segni diacritici codificati con deaccent().
๐Ÿ‡ฌ๐Ÿ‡ง It decodes and rewrites the accents of a string previously coded with deaccent().
$page = reaccent("C|e1_chi_si1_e_c|e1_chi_no.");

REQUIRE_MULTI()
๐Ÿ‡ฎ๐Ÿ‡น Richiede piรน file alla volta.
๐Ÿ‡ฌ๐Ÿ‡ง It requires more files at a time.
require_multi("one.php","two.php","three.php");

SPACES()
๐Ÿ‡ฎ๐Ÿ‡น Elimina gli spazi in eccesso in una stringa.
๐Ÿ‡ฌ๐Ÿ‡ง It deletes redundant spaces in a string.
echo spaces(" Once        upon a    time ");

TIMEZONE()
๐Ÿ‡ฎ๐Ÿ‡น Definisce il fuso orario locale da usare.
๐Ÿ‡ฌ๐Ÿ‡ง It sets the local time zone to be used.
timezone("Europe/Rome");

URL_GET_CONTENTS()
๐Ÿ‡ฎ๐Ÿ‡น Alternativa a file_get_contents() per file remoti.
๐Ÿ‡ฌ๐Ÿ‡ง An alternative to file_get_contents() for remote files.
$remotefile = url_get_contents("www.thatsite.com/page.html");

Last update: May 2023.


Site designed by litterae.eu. © 2004-2024. All rights reserved.
Info GDPR EU 2016/679: no cookies used, no personal data collected.