<?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>code-diesel &#187; visualization</title>
	<atom:link href="http://www.codediesel.com/tag/visualization/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.codediesel.com</link>
	<description>/* PHP &#38; MySQL Journal */</description>
	<lastBuildDate>Thu, 02 Feb 2012 13:19:04 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>PHP built in functions map</title>
		<link>http://www.codediesel.com/php/php-built-in-functions-map/</link>
		<comments>http://www.codediesel.com/php/php-built-in-functions-map/#comments</comments>
		<pubDate>Fri, 16 Jan 2009 07:52:44 +0000</pubDate>
		<dc:creator>sameer</dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[visualization]]></category>

		<guid isPermaLink="false">http://www.codediesel.com/?p=213</guid>
		<description><![CDATA[Wordle is a online Java Applet for generating word clouds. The application is simple. You enter a bunch of text and Wordle does the rest. The applet provides options to change color, font and layout. Just for fun I created a Wordle cloud to display php&#8217;s built in functions. Two samples are shown below. The [...]]]></description>
			<content:encoded><![CDATA[<p><a target="_blank" href="http://www.wordle.net/">Wordle</a> is a online Java Applet for generating word clouds. The application is simple. You enter a bunch of text and Wordle does the rest. The applet provides options to change color, font and layout. Just for fun I created a Wordle cloud to display php&#8217;s built in functions. Two samples are shown below. The size of the font in the cloud is proportional to the number of functions starting with the particular name.<br />
<span id="more-213"></span><br />
<img style="border: 2px solid #c0c0c0;" src="http://www.codediesel.com/wp-content/uploads/2009/01/wordle1.gif" alt="php built in functions map" title="php built in functions map" width="466" height="303" class="aligncenter size-full wp-image-214" /></p>
<p><img style="border: 2px solid #c0c0c0;" src="http://www.codediesel.com/wp-content/uploads/2009/01/wordle2.gif" alt="php built in functions map" title="php built in functions map" width="466" height="303" class="aligncenter size-half wp-image-215" /></p>
<div class="download">
<a href="http://www.codediesel.com/data/pdf/wordle.pdf">Download PDF versions.</a></div>
<p>The word list to generate the cloud was obtained by the following code:</p>

<div class="wp_codebox"><table><tr id="p2133"><td class="code" id="p213code3"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$functions_list</span> <span style="color: #339933;">=</span> <span style="color: #990000;">get_defined_functions</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">foreach</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$functions_list</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'internal'</span><span style="color: #009900;">&#93;</span> <span style="color: #000000; font-weight: bold;">as</span> <span style="color: #000088;">$function_name</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">echo</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$function_name</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>To see how many functions start with a particular name the following code was used:</p>

<div class="wp_codebox"><table><tr id="p2134"><td class="code" id="p213code4"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$functions_list</span> <span style="color: #339933;">=</span> <span style="color: #990000;">get_defined_functions</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$keys</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">foreach</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$functions_list</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'internal'</span><span style="color: #009900;">&#93;</span> <span style="color: #000000; font-weight: bold;">as</span> <span style="color: #000088;">$function_name</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #000088;">$pieces</span> <span style="color: #339933;">=</span> <span style="color: #990000;">explode</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;_&quot;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$function_name</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #990000;">array_key_exists</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$pieces</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$keys</span><span style="color: #009900;">&#41;</span> ? <span style="color: #000088;">$keys</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$pieces</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">++</span> <span style="color: #339933;">:</span> <span style="color: #000088;">$keys</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$pieces</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">1</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #990000;">arsort</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$keys</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #990000;">print_r</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$keys</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://www.codediesel.com/php/php-built-in-functions-map/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

