1. Go to this page and download the library: Download granam/remove-diacritics 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/ */
granam / remove-diacritics example snippets
use Granam\RemoveDiacritics\RemoveDiacritics;
// SIMPLE DIACRITICS REMOVAL
$portuguese = 'Luís argüia à Júlia que «brações, fé, chá, óxido, pôr, zângão» eram palavras do português.';
echo RemoveDiacritics::removeDiacritics($portuguese); // 'Luis arguia a Julia que «bracoes, fe, cha, oxido, por, zangao» eram palavras do portugues.'
$greece = 'Α α άλφα';
echo RemoveDiacritics::removeDiacritics($greece); // 'A a alpha'
// CONSTANT-LIKE CONVERSIONS
$danish = 'Høj bly gom vandt fræk sexquiz på wc';
echo RemoveDiacritics::toConstantLikeValue($danish); // 'hoj_bly_gom_vandt_fraek_sexquiz_pa_wc'
// NAMESPACED-NAMES TO snake_case
$classLikeName = 'Foo\\Bar::IHave_VIPCombinationsBAZ';
echo RemoveDiacritics::camelCaseToSnakeCasedBasename($classLikeName); // 'i_have_vip_combinations_baz'
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.