<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>piouPiouM&#039;s dev&#187; Archives pour le tag validation – piouPiouM&#039;s dev</title>
	<atom:link href="http://pioupioum.fr/tag/validation/feed/" rel="self" type="application/rss+xml" />
	<link>http://pioupioum.fr</link>
	<description>Bloc-note d&#039;un développeur web</description>
	<lastBuildDate>Thu, 29 Jul 2010 16:47:44 +0000</lastBuildDate>
	
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Une console JSLint pour aider vos validations JavaScript</title>
		<link>http://pioupioum.fr/developpement/jslint-console-rhino.html</link>
		<comments>http://pioupioum.fr/developpement/jslint-console-rhino.html#comments</comments>
		<pubDate>Thu, 03 Jun 2010 20:07:49 +0000</pubDate>
		<dc:creator>piouPiouM</dc:creator>
				<category><![CDATA[Développement Web]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[JSLint]]></category>
		<category><![CDATA[licence MIT]]></category>
		<category><![CDATA[Rhino]]></category>
		<category><![CDATA[validation]]></category>

		<guid isPermaLink="false">http://pioupioum.fr/?p=395</guid>
		<description><![CDATA[J&#8217;ai pris l&#8217;habitude de valider mon code JavaScript à l&#8217;aide de JSLint. Outil d&#8217;analyse statique de code, JSLint permet de m&#8217;assurer du niveau de qualité de mon code avant toute déploiement en production.

Cependant la console accompagnant l&#8217;outil ne me convenait pas, et ce pour plusieurs raisons&#160;:


L&#8217;élément window n&#8217;est pas défini via les options passées à [...]]]></description>
			<content:encoded><![CDATA[<!-- google_ad_section_start --><p>J&#8217;ai pris l&#8217;habitude de valider mon code <a href="http://pioupioum.fr/tag/javascript/" title="Archives pour le tag JavaScript – piouPiouM&#039;s dev">JavaScript</a> à l&#8217;aide de <strong><a href="http://www.jslint.com/" title="JSLint, The JavaScript Code Quality Tool">JSLint</a></strong>. Outil d&#8217;<a href="http://fr.wikipedia.org/wiki/Analyse_statique_de_programmes" title="Analyse statique de programmes - Wikipédia">analyse statique</a> de code, <strong>JSLint</strong> permet de m&#8217;assurer du niveau de qualité de mon code avant toute déploiement en production.</p>

<p>Cependant la <a href="http://www.jslint.com/rhino/rhino.js">console</a> accompagnant l&#8217;outil ne me convenait pas, et ce pour plusieurs raisons&#160;:</p>

<ol>
<li>L&#8217;élément <code>window</code> n&#8217;est pas défini <em>via</em> les options passées à <code>JSLINT</code> ce qui m&#8217;oblige à le déclarer, à l&#8217;aide de l&#8217;instruction <code>/*@global</code>, dans une majorité de mes scripts.</li>
<li>Dans le même esprit, j&#8217;utilise couramment certaines options — comme <code>browser: true</code> — non présentes dans l&#8217;appel à <code>JSLINT</code>.</li>
<li>La présentation du résultat ne me convient guère.</li>
</ol>

<p>Vous trouverez dans les lignes qui suivent la console que j&#8217;utilise en remplacement.</p>

<p><span id="more-395"></span></p>

<h2>Table des matières</h2>

<ol>
<li><a href="#source">Code source</a></li>
<li><a href="#prerequis">Prérequis</a></li>
<li><a href="#usage">Usage</a></li>
<li><a href="changelog">Historique des versions et changelog</a></li>
</ol>

<h2 id="source">Code source</h2>

<div class="box file-js">
    <a href="http://static.pioupioum.fr/code/jslint-console.js" title="Télécharger"><span>jslint-console.js (4&nbsp;Ko)</span></a>
</div>


<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
</pre></td><td class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #006600; font-style: italic;">/*global JSLINT */</span>
<span style="color: #009966; font-style: italic;">/*jslint white: true, rhino: true */</span>
<span style="color: #006600; font-style: italic;">/**
 * @fileOverview Provides a JSLint console for Rhino.
 * &lt;p&gt;Usage: &lt;code&gt;java -jar lib/js.jar lib/jslint-console.js lib/fulljslint.js src/testFile1.js src/testFile2.js&lt;/code&gt;&lt;/p&gt;
 * @author Mehdi Kabab &lt;http://pioupioum.fr/&gt;
 * @version 0.1.1 (2010-06-24)
 */</span>
<span style="color: #006600; font-style: italic;">/**
 * @license Copyright (c) 2010 Mehdi Kabab &lt;http://pioupioum.fr/&gt;.
 *
 * Permission is hereby granted, free of charge, to any person
 * obtaining a copy of this software and associated documentation
 * files (the &quot;Software&quot;), to deal in the Software without
 * restriction, including without limitation the rights to use,
 * copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the
 * Software is furnished to do so, subject to the following
 * conditions:
 *
 * The above copyright notice and this permission notice shall be
 * included in all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED &quot;AS IS&quot;, WITHOUT WARRANTY OF ANY KIND,
 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
 * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
 * OTHER DEALINGS IN THE SOFTWARE.
 */</span>
&nbsp;
<span style="color: #006600; font-style: italic;">// Loads the JSLint script given as first argument.</span>
load<span style="color: #009900;">&#40;</span>arguments.<span style="color: #660066;">splice</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">0</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">1</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span> <span style="color: #009900;">&#40;</span>scripts<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #003366; font-weight: bold;">var</span> i<span style="color: #339933;">,</span>
        indentLen <span style="color: #339933;">=</span> <span style="color: #CC0000;">0</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #006600; font-style: italic;">/**
     * Returns the string repeated multiplier times.
     * @param {Number} multiplier Number of time the string should be repeated.
     * @this {String}
     * @return Returns the repeated string.
     * @type String
     * @addon
     */</span>
    String.<span style="color: #660066;">prototype</span>.<span style="color: #660066;">repeat</span> <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">function</span> <span style="color: #009900;">&#40;</span>multiplier<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #CC0000;">0</span> <span style="color: #339933;">&gt;</span> multiplier<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            multiplier <span style="color: #339933;">=</span> <span style="color: #CC0000;">0</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
        <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #003366; font-weight: bold;">new</span> Array<span style="color: #009900;">&#40;</span><span style="color: #CC0000;">1</span> <span style="color: #339933;">+</span> multiplier<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">join</span><span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #006600; font-style: italic;">/**
     * Cleans evidence message and assign &lt;code&gt;identLen&lt;/code&gt;.
     * @private
     * @param {String} str The full message.
     * @param {String} p1 Possible identation.
     * @param {String} p2 The message content.
     * @returns The message content
     * @type String
     */</span>
    <span style="color: #003366; font-weight: bold;">function</span> cleanEvidence<span style="color: #009900;">&#40;</span>str<span style="color: #339933;">,</span> p1<span style="color: #339933;">,</span> p2<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        indentLen <span style="color: #339933;">=</span> p1.<span style="color: #660066;">length</span><span style="color: #339933;">;</span>
        <span style="color: #000066; font-weight: bold;">return</span> p2<span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span> <span style="color: #006600; font-style: italic;">// cleanEvidence</span>
&nbsp;
    <span style="color: #006600; font-style: italic;">/**
     * Check quality code of the given script.
     * @private
     * @param {String} jsfile File to check.
     * @requires JSLINT
     * @requires String#repeat()
     */</span>
    <span style="color: #003366; font-weight: bold;">function</span> lint<span style="color: #009900;">&#40;</span>jsfile<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #003366; font-weight: bold;">var</span> i<span style="color: #339933;">,</span>
            input<span style="color: #339933;">,</span>
            e<span style="color: #339933;">,</span>
            errLen<span style="color: #339933;">,</span>
            errTag <span style="color: #339933;">=</span> <span style="color: #3366CC;">&quot;[ERROR] &quot;</span><span style="color: #339933;">,</span>
            found <span style="color: #339933;">=</span> <span style="color: #CC0000;">0</span><span style="color: #339933;">;</span>
&nbsp;
        <span style="color: #000066;">print</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;Running JSLint on: &quot;</span> <span style="color: #339933;">+</span> jsfile<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        input <span style="color: #339933;">=</span> readFile<span style="color: #009900;">&#40;</span>jsfile<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span>input<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            <span style="color: #000066;">print</span><span style="color: #009900;">&#40;</span>errTag <span style="color: #339933;">+</span> <span style="color: #3366CC;">&quot;Couldn't open file.&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            quit<span style="color: #009900;">&#40;</span><span style="color: #CC0000;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
&nbsp;
        <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span>JSLINT<span style="color: #009900;">&#40;</span>input<span style="color: #339933;">,</span> <span style="color: #009900;">&#123;</span> browser<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">true</span><span style="color: #339933;">,</span> rhino<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">true</span><span style="color: #339933;">,</span> laxbreak<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">true</span><span style="color: #339933;">,</span>
            onevar<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">true</span><span style="color: #339933;">,</span> undef<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">true</span><span style="color: #339933;">,</span> nomen<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">true</span><span style="color: #339933;">,</span> eqeqeq<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">true</span><span style="color: #339933;">,</span> bitwise<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">true</span><span style="color: #339933;">,</span>
            regexp<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">false</span><span style="color: #339933;">,</span> newcap<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">true</span><span style="color: #339933;">,</span>
            predef<span style="color: #339933;">:</span> <span style="color: #009900;">&#91;</span><span style="color: #3366CC;">'window'</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">'escape'</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">'unescape'</span><span style="color: #009900;">&#93;</span>
        <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            <span style="color: #000066; font-weight: bold;">for</span> <span style="color: #009900;">&#40;</span>i <span style="color: #339933;">=</span> <span style="color: #CC0000;">0</span><span style="color: #339933;">,</span> errLen <span style="color: #339933;">=</span> JSLINT.<span style="color: #660066;">errors</span>.<span style="color: #660066;">length</span><span style="color: #339933;">;</span> i <span style="color: #339933;">&lt;</span> errLen<span style="color: #339933;">;</span> <span style="color: #339933;">++</span>i<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
                e <span style="color: #339933;">=</span> JSLINT.<span style="color: #660066;">errors</span><span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
                <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>e<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
                    found <span style="color: #339933;">+=</span> <span style="color: #CC0000;">1</span><span style="color: #339933;">;</span>
                    <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;% scanned).&quot;</span> <span style="color: #339933;">!==</span> e.<span style="color: #660066;">reason</span>.<span style="color: #660066;">substr</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">-</span><span style="color: #CC0000;">11</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
                        <span style="color: #000066;">print</span><span style="color: #009900;">&#40;</span>errTag <span style="color: #339933;">+</span> e.<span style="color: #660066;">reason</span>.<span style="color: #660066;">replace</span><span style="color: #009900;">&#40;</span><span style="color: #009966; font-style: italic;">/\.$/</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">''</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">+</span>
                            <span style="color: #3366CC;">&quot; on line &quot;</span> <span style="color: #339933;">+</span> e.<span style="color: #660066;">line</span> <span style="color: #339933;">+</span> <span style="color: #3366CC;">&quot; character &quot;</span> <span style="color: #339933;">+</span> e.<span style="color: #660066;">character</span> <span style="color: #339933;">+</span> <span style="color: #3366CC;">&quot;.&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                        <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;&quot;</span> <span style="color: #339933;">!==</span> e.<span style="color: #660066;">evidence</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
                            <span style="color: #000066;">print</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot; &quot;</span>.<span style="color: #660066;">repeat</span><span style="color: #009900;">&#40;</span>errTag.<span style="color: #660066;">length</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">+</span>
                                <span style="color: #009900;">&#40;</span>e.<span style="color: #660066;">evidence</span> <span style="color: #339933;">||</span> <span style="color: #3366CC;">''</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">replace</span><span style="color: #009900;">&#40;</span><span style="color: #009966; font-style: italic;">/^(\s*)(\S*(\s+\S+)*)\s*$/</span><span style="color: #339933;">,</span> cleanEvidence<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                            <span style="color: #000066;">print</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot; &quot;</span>.<span style="color: #660066;">repeat</span><span style="color: #009900;">&#40;</span>errTag.<span style="color: #660066;">length</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">+</span>
                                <span style="color: #3366CC;">&quot;.&quot;</span>.<span style="color: #660066;">repeat</span><span style="color: #009900;">&#40;</span>e.<span style="color: #660066;">character</span> <span style="color: #339933;">-</span> indentLen <span style="color: #339933;">-</span> <span style="color: #CC0000;">1</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">+</span> <span style="color: #3366CC;">&quot;^&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                        <span style="color: #009900;">&#125;</span>
                    <span style="color: #009900;">&#125;</span> <span style="color: #000066; font-weight: bold;">else</span> <span style="color: #009900;">&#123;</span>
                        <span style="color: #000066;">print</span><span style="color: #009900;">&#40;</span>errTag <span style="color: #339933;">+</span> e.<span style="color: #660066;">reason</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                    <span style="color: #009900;">&#125;</span>
                <span style="color: #009900;">&#125;</span>
            <span style="color: #009900;">&#125;</span>
            <span style="color: #000066;">print</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;=&gt; &quot;</span> <span style="color: #339933;">+</span> found <span style="color: #339933;">+</span> <span style="color: #3366CC;">&quot; error(s) found.<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            quit<span style="color: #009900;">&#40;</span><span style="color: #CC0000;">2</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span> <span style="color: #000066; font-weight: bold;">else</span> <span style="color: #009900;">&#123;</span>
            <span style="color: #000066;">print</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;OK<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
    <span style="color: #009900;">&#125;</span> <span style="color: #006600; font-style: italic;">// lint</span>
&nbsp;
    <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span>scripts<span style="color: #009900;">&#91;</span><span style="color: #CC0000;">0</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #000066;">print</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;Usage: jslint-console.js fulljslint.js file1.js[ file2.js]&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        quit<span style="color: #009900;">&#40;</span><span style="color: #CC0000;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
    <span style="color: #000066; font-weight: bold;">for</span> <span style="color: #009900;">&#40;</span>i <span style="color: #339933;">=</span> <span style="color: #CC0000;">0</span><span style="color: #339933;">;</span> i <span style="color: #339933;">&lt;</span> scripts.<span style="color: #660066;">length</span><span style="color: #339933;">;</span> <span style="color: #339933;">++</span>i<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        lint<span style="color: #009900;">&#40;</span>scripts<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#40;</span>arguments<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>


<h2 id="prerequis">Prérequis</h2>

<p>Les prérequis sont simples&#160;:</p>

<ul>
<li><a href="http://www.mozilla.org/rhino/download.html" title="Rhino Downloads">Télécharger Rhino</a> et récupérer le fichier <code>js.jar</code>.</li>
<li>Récupérer la version <a href="http://www.jslint.com/rhino/fulljslint.js">complète</a> ou <a href="http://www.jslint.com/rhino/jslint.js">minifiée</a> de JSLint. Attention cependant, il vous faudra supprimer la fonction anonyme embarquée <code>rhino.js</code> (en fin de script).</li>
</ul>

<h2 id="usage">Usage</h2>

<p>Dans un shell, exécutez <code>jslint-console.js</code> à l&#8217;aide de <strong><a href="http://www.mozilla.org/rhino/" title="Rhino - JavaScript for Java">Rhino</a></strong>, comme suis&#160;:</p>

<pre>$ java -jar lib/rhino/js.jar lib/jslint/jslint-console.js lib/jslint/fulljslint.js src/*.js</pre>

<p>Ici, deux arguments sont passés à la <strong>console jslint</strong>&#160;:</p>

<ul>
<li>Le script JSLint, <code>lib/jslint/fulljslint.js</code>, à fournir en premier argument. Je ne le charge pas en dur dans <code>jslint-console.js</code> afin de conserver une souplesse d&#8217;implémentation (<em>via</em> une tâche <a href="http://pioupioum.fr/tag/ant/" title="Archives pour le tag ant – piouPiouM&#039;s dev">Ant</a> par exemple).</li>
<li>La liste des fichiers sources <strong>JavaScript</strong> à analyser.</li>
</ul>

<p>Voici un exemple de sortie de la console&#160;:</p>


<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
</pre></td><td class="code"><pre class="" style="font-family:monospace;">$ java -jar lib/rhino/js-1.7R2.jar lib/jslint/jslint-console.js lib/jslint/fulljslint.js src/*.js
Running JSLint on: src/jsfile1.js
OK
&nbsp;
Running JSLint on: src/jsfile2.js
<span class="br0">&#91;</span>ERROR<span class="br0">&#93;</span> Expected '===' and instead saw '==' on line <span style="">52</span> character 23.
        if <span class="br0">&#40;</span>false == test<span class="br0">&#41;</span> <span class="br0">&#123;</span>
        ..........^
<span class="br0">&#91;</span>ERROR<span class="br0">&#93;</span> Unexpected dangling '_' in '_ob' on line <span style="">74</span> character 17.
        var _ob = window.ob;
        ....^
<span class="br0">&#91;</span>ERROR<span class="br0">&#93;</span> 'ob' is not defined on line <span style="">80</span> character 39.
        if <span class="br0">&#40;</span>'function' !== typeof ob.getVariables<span class="br0">&#41;</span> <span class="br0">&#123;</span>
        ..........................^
<span class="br0">&#91;</span>ERROR<span class="br0">&#93;</span> 'ob' is not defined on line <span style="">83</span> character 26.
        params = ob.getVariables<span class="br0">&#40;</span><span class="br0">&#41;</span>.sequence;
        .........^
=&gt; <span style="">4</span> error<span class="br0">&#40;</span>s<span class="br0">&#41;</span> found.</pre></td></tr></table></div>


<h2 id="changelog">Historique des versions et changelog</h2>

<h3>0.1.1 (2010-06-24)</h3>

<ul>
<li>Forcer un multiplieur positif dans String.prototype.repeat</li>
</ul>

<h3>0.1 (2010-06-03)</h3>

<ul>
<li>Version initiale.</li>
</ul>

<h3 class='related_post_title'>Continuez votre lecture sur des sujets similaires</h3>

<ul class='related_post'><li><a href='http://pioupioum.fr/developpement/javascript-array-intersection.html' title='JavaScript : optimiser le calcul de l&#8217;intersection de tableaux de grandes tailles'>JavaScript&#160;: optimiser le calcul de l&#8217;intersection de tableaux de grandes tailles</a></li><li><a href='http://pioupioum.fr/outils-astuces/license-helper-textmate-bundle.html' title='Bundle License Helper pour TextMate'>Bundle License Helper pour TextMate</a></li><li><a href='http://pioupioum.fr/snippets/textmate-commande-exporter-mots-word-wrap.html' title='TextMate : commande &laquo;&nbsp;Export words&nbsp;&raquo;'>TextMate&#160;: commande &laquo;&nbsp;Export words&nbsp;&raquo;</a></li><li><a href='http://pioupioum.fr/outils-astuces/textmate-convertir-couleur-hexadecimale-html-rgba.html' title='TextMate : convertir une couleur hexadécimale en notation RGBA'>TextMate&#160;: convertir une couleur hexadécimale en notation RGBA</a></li><li><a href='http://pioupioum.fr/developpement/optimiser-rapidite-chargement-adsense-jquery.html' title='Optimiser le chargement des AdSense'>Optimiser le chargement des AdSense</a></li></ul>
<!-- google_ad_section_end -->]]></content:encoded>
			<wfw:commentRss>http://pioupioum.fr/developpement/jslint-console-rhino.html/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>PHP&#160;: valider qu&#8217;une URL pointe sur un domaine donné</title>
		<link>http://pioupioum.fr/snippets/php-valider-url-domaine.html</link>
		<comments>http://pioupioum.fr/snippets/php-valider-url-domaine.html#comments</comments>
		<pubDate>Sat, 05 Sep 2009 23:35:41 +0000</pubDate>
		<dc:creator>piouPiouM</dc:creator>
				<category><![CDATA[Snippets]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[URL]]></category>
		<category><![CDATA[validation]]></category>

		<guid isPermaLink="false">http://pioupioum.fr/?p=236</guid>
		<description><![CDATA[Voici une petite fonction PHP pour vérifier qu&#8217;une URL pointe bien sur un domaine donné.

On valide dans un premier temps, via filter_var1, le format de l&#8217;URL. Cette dernière doit notamment être accompagné d&#8217;un protocole. La récupération de l&#8217;hôte depuis l&#8217;URL se fait très simplement avec la fonction parse_url. Enfin, on s&#8217;assure que le domaine cible [...]]]></description>
			<content:encoded><![CDATA[<!-- google_ad_section_start --><p>Voici une petite fonction PHP pour vérifier qu&#8217;une <abbr title="Uniform Resource Locator">URL</abbr> pointe bien sur un domaine donné.</p>

<p>On valide dans un premier temps, <em>via</em> <a href="http://www.php.net/manual/fr/function.filter-var.php" title="PHP: filter_var - Manual">filter_var</a><sup id="fnref:1"><a href="#fn:1" rel="footnote">1</a></sup>, le format de l&#8217;<abbr title="Uniform Resource Locator">URL</abbr>. Cette dernière doit notamment être accompagné d&#8217;un protocole. La récupération de l&#8217;hôte depuis l&#8217;<abbr title="Uniform Resource Locator">URL</abbr> se fait très simplement avec la fonction <a href="http://www.php.net/manual/fr/function.parse-url.php" title="PHP: parse_url - Manual">parse_url</a>. Enfin, on s&#8217;assure que le domaine cible est bien le domaine principal de l&#8217;hôte.</p>


<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #009933; font-style: italic;">/**
 * Checks a URL belongs to a given domain.
 *
 * @param string $url The URL to test.
 * @param string $domain The target domain.
 * @return boolean
 */</span>
<span style="color: #000000; font-weight: bold;">function</span> isDomainOf<span style="color: #009900;">&#40;</span><span style="color: #000088;">$url</span><span style="color: #339933;">,</span> <span style="color: #000088;">$domain</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
    <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #009900; font-weight: bold;">false</span> <span style="color: #339933;">===</span> <span style="color: #990000;">filter_var</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$url</span><span style="color: #339933;">,</span> FILTER_VALIDATE_URL<span style="color: #339933;">,</span> FILTER_FLAG_HOST_REQUIRED<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
    <span style="color: #009900;">&#123;</span>
        <span style="color: #b1b100;">return</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
    <span style="color: #000088;">$host</span> <span style="color: #339933;">=</span> <span style="color: #990000;">parse_url</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$url</span><span style="color: #339933;">,</span> PHP_URL_HOST<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #009900; font-weight: bold;">false</span> <span style="color: #339933;">===</span> <span style="color: #000088;">$host</span><span style="color: #009900;">&#41;</span>
    <span style="color: #009900;">&#123;</span>
        <span style="color: #b1b100;">return</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
    <span style="color: #b1b100;">return</span> <span style="color: #009900;">&#40;</span>boolean<span style="color: #009900;">&#41;</span> <span style="color: #990000;">preg_match</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'#^(?:[^\.]*\.){0,}'</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$domain</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'$#'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$host</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>


<p><span id="more-236"></span></p>

<h2>Suite de tests</h2>


<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$test</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
    <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
        <span style="color: #0000ff;">'domain'</span>   <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'pioupioum.fr'</span><span style="color: #339933;">,</span>
        <span style="color: #0000ff;">'url'</span>      <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'http://pioupioum.fr'</span><span style="color: #339933;">,</span>
        <span style="color: #0000ff;">'synopsis'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'Le domaine testé lui même.'</span>
    <span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
    <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
        <span style="color: #0000ff;">'domain'</span>   <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'pioupioum.fr'</span><span style="color: #339933;">,</span>
        <span style="color: #0000ff;">'url'</span>      <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'http://example.com'</span><span style="color: #339933;">,</span>
        <span style="color: #0000ff;">'synopsis'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'Un domaine différent.'</span>
    <span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
    <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
        <span style="color: #0000ff;">'domain'</span>   <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'pioupioum.fr'</span><span style="color: #339933;">,</span>
        <span style="color: #0000ff;">'url'</span>      <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'http://www.pioupioum.fr'</span><span style="color: #339933;">,</span>
        <span style="color: #0000ff;">'synopsis'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'Un sous-domaine.'</span>
    <span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
    <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
        <span style="color: #0000ff;">'domain'</span>   <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'pioupioum.fr'</span><span style="color: #339933;">,</span>
        <span style="color: #0000ff;">'url'</span>      <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'http://foo.bar.pioupioum.fr'</span><span style="color: #339933;">,</span>
        <span style="color: #0000ff;">'synopsis'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'Un double sous-domaine.'</span>
    <span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
    <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
        <span style="color: #0000ff;">'domain'</span>   <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'bar.pioupioum.fr'</span><span style="color: #339933;">,</span>
        <span style="color: #0000ff;">'url'</span>      <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'http://foo.bar.pioupioum.fr'</span><span style="color: #339933;">,</span>
        <span style="color: #0000ff;">'synopsis'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'Le dommaine cible contient un sous-domaine.'</span>
    <span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
    <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
        <span style="color: #0000ff;">'domain'</span>   <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'pioupioum.fr'</span><span style="color: #339933;">,</span>
        <span style="color: #0000ff;">'url'</span>      <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'http://assets1.pioupioum.fr/foo/bar.png'</span><span style="color: #339933;">,</span>
        <span style="color: #0000ff;">'synopsis'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'Un contenu hébergé sur un sous-domaine.'</span>
    <span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
    <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
        <span style="color: #0000ff;">'domain'</span>   <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'pioupioum.fr'</span><span style="color: #339933;">,</span>
        <span style="color: #0000ff;">'url'</span>      <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'http://www.example.com/foo/bar.png'</span><span style="color: #339933;">,</span>
        <span style="color: #0000ff;">'synopsis'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'Un contenu hébergé sur un domaine différent.'</span>
    <span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
    <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
        <span style="color: #0000ff;">'domain'</span>   <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'pioupioum.fr'</span><span style="color: #339933;">,</span>
        <span style="color: #0000ff;">'url'</span>      <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'http://fakepioupioum.fr'</span><span style="color: #339933;">,</span>
        <span style="color: #0000ff;">'synopsis'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'Un domaine proche.'</span>
    <span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
    <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
        <span style="color: #0000ff;">'domain'</span>   <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'pioupioum.fr'</span><span style="color: #339933;">,</span>
        <span style="color: #0000ff;">'url'</span>      <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'http://www.fakepioupioum.fr'</span><span style="color: #339933;">,</span>
        <span style="color: #0000ff;">'synopsis'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'Un domaine proche avec un sous-domaine.'</span>
    <span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
    <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
        <span style="color: #0000ff;">'domain'</span>   <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'pioupioum.fr'</span><span style="color: #339933;">,</span>
        <span style="color: #0000ff;">'url'</span>      <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'pioupioum.fr'</span><span style="color: #339933;">,</span>
        <span style="color: #0000ff;">'synopsis'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'Aucun protocol n\'étant spécifié, la fonction filter_var invalide le test.'</span>
    <span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #b1b100;">for</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$i</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">,</span> <span style="color: #000088;">$c</span> <span style="color: #339933;">=</span> <span style="color: #990000;">count</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$test</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000088;">$c</span> <span style="color: #339933;">&gt;</span> <span style="color: #000088;">$i</span><span style="color: #339933;">;</span> <span style="color: #339933;">++</span><span style="color: #000088;">$i</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
    <span style="color: #000088;">$ok</span> <span style="color: #339933;">=</span> isDomainOf<span style="color: #009900;">&#40;</span><span style="color: #000088;">$test</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$i</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'url'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$test</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$i</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'domain'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #990000;">printf</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;<span style="color: #009933; font-weight: bold;">%s</span><span style="color: #000099; font-weight: bold;">\n</span>[<span style="color: #009933; font-weight: bold;">%s</span>] L'URL <span style="color: #000099; font-weight: bold;">\&quot;</span><span style="color: #009933; font-weight: bold;">%s</span><span style="color: #000099; font-weight: bold;">\&quot;</span> <span style="color: #009933; font-weight: bold;">%s</span> sur le domaine <span style="color: #000099; font-weight: bold;">\&quot;</span><span style="color: #009933; font-weight: bold;">%s</span><span style="color: #000099; font-weight: bold;">\&quot;</span>.<span style="color: #000099; font-weight: bold;">\n</span><span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">,</span>
        <span style="color: #000088;">$test</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$i</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'synopsis'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span>
        <span style="color: #009900;">&#40;</span><span style="color: #000088;">$ok</span><span style="color: #009900;">&#41;</span> ? <span style="color: #0000ff;">'SUCCESS'</span> <span style="color: #339933;">:</span> <span style="color: #0000ff;">'FAIL'</span><span style="color: #339933;">,</span>
        <span style="color: #000088;">$test</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$i</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'url'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span>
        <span style="color: #009900;">&#40;</span><span style="color: #000088;">$ok</span><span style="color: #009900;">&#41;</span> ? <span style="color: #0000ff;">'pointe bien'</span> <span style="color: #339933;">:</span> <span style="color: #0000ff;">'ne pointe pas'</span><span style="color: #339933;">,</span>
        <span style="color: #000088;">$test</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$i</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'domain'</span><span style="color: #009900;">&#93;</span>
    <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>


<p>Qui nous donne l&#8217;affichage suivant&#160;:</p>


<div class="wp_syntax"><div class="code"><pre class="plain" style="font-family:monospace;">Le domaine testé lui même.
[SUCCESS] L'URL &quot;http://pioupioum.fr&quot; pointe bien sur le domaine &quot;pioupioum.fr&quot;.
&nbsp;
Un domaine différent.
[FAIL] L'URL &quot;http://example.com&quot; ne pointe pas sur le domaine &quot;pioupioum.fr&quot;.
&nbsp;
Un sous-domaine.
[SUCCESS] L'URL &quot;http://www.pioupioum.fr&quot; pointe bien sur le domaine &quot;pioupioum.fr&quot;.
&nbsp;
Un double sous-domaine.
[SUCCESS] L'URL &quot;http://foo.bar.pioupioum.fr&quot; pointe bien sur le domaine &quot;pioupioum.fr&quot;.
&nbsp;
Le dommaine cible contient un sous-domaine.
[SUCCESS] L'URL &quot;http://foo.bar.pioupioum.fr&quot; pointe bien sur le domaine &quot;bar.pioupioum.fr&quot;.
&nbsp;
Un contenu hébergé sur un sous-domaine.
[SUCCESS] L'URL &quot;http://assets1.pioupioum.fr/foo/bar.png&quot; pointe bien sur le domaine &quot;pioupioum.fr&quot;.
&nbsp;
Un contenu hébergé sur un domaine différent.
[FAIL] L'URL &quot;http://www.example.com/foo/bar.png&quot; ne pointe pas sur le domaine &quot;pioupioum.fr&quot;.
&nbsp;
Un domaine proche.
[FAIL] L'URL &quot;http://fakepioupioum.fr&quot; ne pointe pas sur le domaine &quot;pioupioum.fr&quot;.
&nbsp;
Un domaine proche avec un sous-domaine.
[FAIL] L'URL &quot;http://www.fakepioupioum.fr&quot; ne pointe pas sur le domaine &quot;pioupioum.fr&quot;.
&nbsp;
Aucun protocol n'étant spécifié, la fonction filter_var invalide le test.
[FAIL] L'URL &quot;pioupioum.fr&quot; ne pointe pas sur le domaine &quot;pioupioum.fr&quot;.</pre></div></div>


<h3 class='related_post_title'>Continuez votre lecture sur des sujets similaires</h3>

<ul class='related_post'><li><a href='http://pioupioum.fr/developpement/jslint-console-rhino.html' title='Une console JSLint pour aider vos validations JavaScript'>Une console JSLint pour aider vos validations JavaScript</a></li><li><a href='http://pioupioum.fr/snippets/textmate-commande-exporter-mots-word-wrap.html' title='TextMate : commande &laquo;&nbsp;Export words&nbsp;&raquo;'>TextMate&#160;: commande &laquo;&nbsp;Export words&nbsp;&raquo;</a></li><li><a href='http://pioupioum.fr/snippets/php-installer-apc-macosx.html' title='PHP : installer APC sous Mac OS X Leopard'>PHP&#160;: installer APC sous Mac OS X Leopard</a></li><li><a href='http://pioupioum.fr/snippets/php-convertir-datetime-unix-timestamp.html' title='PHP : convertir un DATETIME en un timestamp UNIX'>PHP&#160;: convertir un DATETIME en un timestamp UNIX</a></li><li><a href='http://pioupioum.fr/snippets/php-uncamel-fonction-convertir-camel-case.html' title='PHP : fonction uncamel() pour inverser une notation en CamelCase'>PHP&#160;: fonction uncamel() pour inverser une notation en CamelCase</a></li></ul>

<div class="footnotes">
<hr />
<ol>

<li id="fn:1">
<p>la fonction requiers au minimum PHP 5.2.0.&#160;<a href="#fnref:1" rev="footnote">&#8617;</a></p>
</li>

</ol>
</div>
<!-- google_ad_section_end -->]]></content:encoded>
			<wfw:commentRss>http://pioupioum.fr/snippets/php-valider-url-domaine.html/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
