<?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>PHPBSD.net &#187; patches</title>
	<atom:link href="http://www.phpbsd.net/tag/patches/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.phpbsd.net</link>
	<description>Blogueando sobre PHP, BSD, SEO, AJAX, Seguridad, Rendimiento... y mucho más</description>
	<lastBuildDate>Thu, 07 Oct 2010 11:57:22 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Funciones anónimas en PHP</title>
		<link>http://www.phpbsd.net/2007/05/18/funciones-anonimas-en-php/</link>
		<comments>http://www.phpbsd.net/2007/05/18/funciones-anonimas-en-php/#comments</comments>
		<pubDate>Fri, 18 May 2007 18:03:52 +0000</pubDate>
		<dc:creator>Oriol</dc:creator>
				<category><![CDATA[Noticias]]></category>
		<category><![CDATA[patches]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[programación]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[webmaster]]></category>

		<guid isPermaLink="false">http://www.phpbsd.net/2007/05/18/funciones-anonimas-en-php/</guid>
		<description><![CDATA[Leo en el report semanal de Zend Developer Zone que alguien ha añadido soporte para funciones anónimas al PHP. Ahora sin necesidad de usar el incómodo create_function() un código como este funcionará:


$data = array&#40;"zoo", "orange", "car", "lemon", "apple"&#41;;
usort&#40;$data, function&#40;$a, $b&#41; &#123; return strcmp&#40;$a, $b&#41;; &#125;&#41;;
var_dump&#40;$data&#41;; # data is sorted alphabetically 



Si te interesa está disponible [...]


Entradas relacionadas:<ul><li><a href='http://www.phpbsd.net/2008/01/09/funciones-php-en-javascript/' rel='bookmark' title='Permanent Link: Funciones PHP en JavaScript'>Funciones PHP en JavaScript</a></li><li><a href='http://www.phpbsd.net/2007/11/28/buscar-funciones-php-desde-firefox/' rel='bookmark' title='Permanent Link: Buscar funciones PHP desde Firefox'>Buscar funciones PHP desde Firefox</a></li><li><a href='http://www.phpbsd.net/2009/04/02/interesantes-usos-y-alternativas-de-__tostring-en-php-5x/' rel='bookmark' title='Permanent Link: Interesantes usos y alternativas de __toString() en PHP 5.x'>Interesantes usos y alternativas de __toString() en PHP 5.x</a></li></ul>]]></description>
			<content:encoded><![CDATA[<p>Leo en el <a target="_blank" href="http://devzone.zend.com/node/view/id/2013" title="Zend Developer Zone | Zend Weekly Summaries Issue #333">report semanal de Zend Developer Zone</a> que alguien ha añadido soporte para <strong>funciones anónimas</strong> al PHP. Ahora sin necesidad de usar el incómodo <a target="_blank" href="http://www.php.net/manual/es/function.create-function.php" title="PHP: create_function - Manual">create_function()</a> un código como este funcionará:</p>
<div class="syntax_hilite">
<div id="php-2">
<div class="php"><span style="color:#0000FF;">$data</span> = <a href="http://www.php.net/array"><span style="color:#000066;">array</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">"zoo"</span>, <span style="color:#FF0000;">"orange"</span>, <span style="color:#FF0000;">"car"</span>, <span style="color:#FF0000;">"lemon"</span>, <span style="color:#FF0000;">"apple"</span><span style="color:#006600; font-weight:bold;">&#41;</span>;<br />
<a href="http://www.php.net/usort"><span style="color:#000066;">usort</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$data</span>, <span style="color:#000000; font-weight:bold;">function</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$a</span>, <span style="color:#0000FF;">$b</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#123;</span> <span style="color:#616100;">return</span> <a href="http://www.php.net/strcmp"><span style="color:#000066;">strcmp</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$a</span>, <span style="color:#0000FF;">$b</span><span style="color:#006600; font-weight:bold;">&#41;</span>; <span style="color:#006600; font-weight:bold;">&#125;</span><span style="color:#006600; font-weight:bold;">&#41;</span>;<br />
<a href="http://www.php.net/var_dump"><span style="color:#000066;">var_dump</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$data</span><span style="color:#006600; font-weight:bold;">&#41;</span>; <span style="color:#008000; font-style:italic;"># data is sorted alphabetically </span></div>
</div>
</div>
<p></p>
<p>Si te interesa está disponible el <a target="_blank" href="http://pastebin.ca/400952" title="general pastebin - Mine - post number 400952">patch</a> para el PHP.</p>
<p>Vía <a target="_blank" href="http://www.ioncannon.net/uncategorized/126/anonymous-functions-in-php/" title="Anonymous functions in PHP @ IONCANNON">IONCANNON</a></p>


<p>Entradas relacionadas:<ul><li><a href='http://www.phpbsd.net/2008/01/09/funciones-php-en-javascript/' rel='bookmark' title='Permanent Link: Funciones PHP en JavaScript'>Funciones PHP en JavaScript</a></li><li><a href='http://www.phpbsd.net/2007/11/28/buscar-funciones-php-desde-firefox/' rel='bookmark' title='Permanent Link: Buscar funciones PHP desde Firefox'>Buscar funciones PHP desde Firefox</a></li><li><a href='http://www.phpbsd.net/2009/04/02/interesantes-usos-y-alternativas-de-__tostring-en-php-5x/' rel='bookmark' title='Permanent Link: Interesantes usos y alternativas de __toString() en PHP 5.x'>Interesantes usos y alternativas de __toString() en PHP 5.x</a></li></ul></p>]]></content:encoded>
			<wfw:commentRss>http://www.phpbsd.net/2007/05/18/funciones-anonimas-en-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

