snipt

Ctrl+h for KB shortcuts

Text only

all css/php one line comments

/\*([^\*]|[^/].*?)\*/
https://snipt.net/embed/87b7554c82716e0bbfb8b8df2eafdaef/
/raw/87b7554c82716e0bbfb8b8df2eafdaef/
87b7554c82716e0bbfb8b8df2eafdaef
text
Text only
1
2019-07-12T22:46:53
True
False
False
/api/public/snipt/1562/
all-cssphp-one-line-comments
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a>/\*([^\*]|[^/].*?)\*/ </span></pre></div> </td></tr></table>
css, php, regex

PHP

Supprime les accents d'une chaine avec un support basique de l'UTF8

1
2
3
4
5
6
<?
function stripAccentsUTF8($string){
	return utf8_encode(strtr(utf8_decode($string),'àáâãäçèéêëìíîïñòóôõöùúûüýÿÀÁÂÃÄÇÈÉÊËÌÍÎÏÑÒÓÔÕÖÙÚÛÜÝ',
		'aaaaaceeeeiiiinooooouuuuyyAAAAACEEEEIIIINOOOOOUUUUY'));
}
?>
https://snipt.net/embed/cfae6584e751d70abd96f7e1e52b7cbc/
/raw/cfae6584e751d70abd96f7e1e52b7cbc/
cfae6584e751d70abd96f7e1e52b7cbc
php
PHP
6
2019-07-23T01:08:59
True
False
False
/api/public/snipt/1483/
supprime-les-accents-avec-un-support-basique-de-lutf8
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a> <a href="#L-3">3</a> <a href="#L-4">4</a> <a href="#L-5">5</a> <a href="#L-6">6</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a><span class="cp">&lt;?</span> </span><span id="L-2"><a name="L-2"></a><span class="k">function</span> <span class="nf">stripAccentsUTF8</span><span class="p">(</span><span class="nv">$string</span><span class="p">){</span> </span><span id="L-3"><a name="L-3"></a> <span class="k">return</span> <span class="nb">utf8_encode</span><span class="p">(</span><span class="nb">strtr</span><span class="p">(</span><span class="nb">utf8_decode</span><span class="p">(</span><span class="nv">$string</span><span class="p">),</span><span class="s1">&#39;àáâãäçèéêëìíîïñòóôõöùúûüýÿÀÁÂÃÄÇÈÉÊËÌÍÎÏÑÒÓÔÕÖÙÚÛÜÝ&#39;</span><span class="p">,</span> </span><span id="L-4"><a name="L-4"></a> <span class="s1">&#39;aaaaaceeeeiiiinooooouuuuyyAAAAACEEEEIIIINOOOOOUUUUY&#39;</span><span class="p">));</span> </span><span id="L-5"><a name="L-5"></a><span class="p">}</span> </span><span id="L-6"><a name="L-6"></a><span class="cp">?&gt;</span><span class="x"></span> </span></pre></div> </td></tr></table>
accents, php, utf8

PHP

Supprimer les accents d'une chaine (sans support de l'UTF8)

1
2
3
4
5
6
<?
function stripAccents($string){
	return strtr($string,'àáâãäçèéêëìíîïñòóôõöùúûüýÿÀÁÂÃÄÇÈÉÊËÌÍÎÏÑÒÓÔÕÖÙÚÛÜÝ',
		'aaaaaceeeeiiiinooooouuuuyyAAAAACEEEEIIIINOOOOOUUUUY');
}
?>
https://snipt.net/embed/491f3cbfdcddadeb861baa82483bb101/
/raw/491f3cbfdcddadeb861baa82483bb101/
491f3cbfdcddadeb861baa82483bb101
php
PHP
6
2019-07-22T15:00:04
True
False
False
/api/public/snipt/1482/
supprimer-les-accents-dune-chaine-sans-support-de-lutf8
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a> <a href="#L-3">3</a> <a href="#L-4">4</a> <a href="#L-5">5</a> <a href="#L-6">6</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a><span class="cp">&lt;?</span> </span><span id="L-2"><a name="L-2"></a><span class="k">function</span> <span class="nf">stripAccents</span><span class="p">(</span><span class="nv">$string</span><span class="p">){</span> </span><span id="L-3"><a name="L-3"></a> <span class="k">return</span> <span class="nb">strtr</span><span class="p">(</span><span class="nv">$string</span><span class="p">,</span><span class="s1">&#39;àáâãäçèéêëìíîïñòóôõöùúûüýÿÀÁÂÃÄÇÈÉÊËÌÍÎÏÑÒÓÔÕÖÙÚÛÜÝ&#39;</span><span class="p">,</span> </span><span id="L-4"><a name="L-4"></a> <span class="s1">&#39;aaaaaceeeeiiiinooooouuuuyyAAAAACEEEEIIIINOOOOOUUUUY&#39;</span><span class="p">);</span> </span><span id="L-5"><a name="L-5"></a><span class="p">}</span> </span><span id="L-6"><a name="L-6"></a><span class="cp">?&gt;</span><span class="x"></span> </span></pre></div> </td></tr></table>
accents, chaine, php

PHP

hello world

<?php echo "Hello Woerld!"; ?>
https://snipt.net/embed/bcc858ed7244ea7c53f35761d2cc25bc/
/raw/bcc858ed7244ea7c53f35761d2cc25bc/
bcc858ed7244ea7c53f35761d2cc25bc
php
PHP
1
2019-07-22T20:18:24
True
False
False
/api/public/snipt/1234/
hello-world-4
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a><span class="cp">&lt;?php</span> <span class="k">echo</span> <span class="s2">&quot;Hello Woerld!&quot;</span><span class="p">;</span> <span class="cp">?&gt;</span><span class="x"></span> </span></pre></div> </td></tr></table>
php