<?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>DanDev.com &#187; PHP</title> <atom:link href="http://www.dandev.com/category/php/feed/" rel="self" type="application/rss+xml" /><link>http://www.dandev.com</link> <description>Daniel&#039;s Dev Blog..ish</description> <lastBuildDate>Sat, 28 Jan 2012 18:06:25 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" /> <item><title>Gallery3 with short_open_tag off</title><link>http://www.dandev.com/php/gallery3-with-short_open_tag-off/</link> <comments>http://www.dandev.com/php/gallery3-with-short_open_tag-off/#comments</comments> <pubDate>Sat, 28 Jan 2012 18:06:25 +0000</pubDate> <dc:creator>Daniel</dc:creator> <category><![CDATA[Development]]></category> <category><![CDATA[PHP]]></category> <category><![CDATA[Software]]></category> <guid
isPermaLink="false">http://www.dandev.com/?p=246</guid> <description><![CDATA[If you are on a host that has short_open_tag off you won&#8217;t be able to use the latest Gallery 3 version(as of this writing). The developers have made this a requirement to allow template development to be a little simpler: Why do you use PHP&#8217;s short open tags? Short open tags are considered harmful by some, [...]]]></description> <content:encoded><![CDATA[<p>If you are on a host that has <a
href="http://php.net/ini.core#ini.short-open-tag" target="_blank">short_open_tag</a> off you won&#8217;t be able to use the latest <a
href="http://gallery.menalto.com/" target="_blank">Gallery 3</a> version(as of this writing). The developers have made this a requirement to allow template development to be a little simpler:</p><blockquote><h2>Why do you use PHP&#8217;s short open tags?</h2><p>Short open tags are considered harmful by some, but they result in much tighter syntax in our PHP based templates. Here are some possible ways to print &#8216;Hello World&#8217; in different template systems:</p><pre>   PHP long tags: &lt;?php echo $Hello_World ?&gt;
  php short tags: &lt;?= $Hello_World ?&gt;
             ASP: {% $Hello_World %}
          Django: {{Hello_World}}
          Smarty: {Hello_World}</pre><p>As you can see, PHP with long tags is the noisiest. The main reason for deprecating short tags is because the <strong>&lt;?</strong> token conflicts with XML tags. In our case, this is highly unlikely to ever be a problem, and even if it is it&#8217;s a vanishingly small edge case. We&#8217;re optimizing for a good developer experience here by requiring them to type less to do more. If at some point PHP short tags goes away, we can pretty easily convert the entire app over to using long tags.</p><p><strong>Short open tags will still be enabled by default in all future versions of PHP.</strong> While there was initially <a
href="http://www.php.net/~derick/meeting-notes.html#remove-support-for-and-script-language-php-and-add-php-var" rel="nofollow">an idea to change this in PHP 6</a>, plans have changed and <a
href="http://wiki.php.net/summits/pdmnotesmay09" rel="nofollow">short open tags are here to stay</a>.</p></blockquote><p>Source: <a
href="http://codex.gallery2.org/Gallery3:FAQ#Why_do_you_use_PHP.27s_short_open_tags.3F">http://codex.gallery2.org/Gallery3:FAQ#Why_do_you_use_PHP.27s_short_open_tags.3F</a></p><p>&nbsp;</p><p>So, if your host doesn&#8217;t have short tags on, or if you just don&#8217;t like to use code that requires them in general you can try out this fork I made of Gallery v3 on github:</p><p><a
href="https://github.com/drener/gallery3" target="_blank">Repo</a> | <a
href="https://github.com/drener/gallery3/zipball/master" target="_blank">Download Zip</a></p> ]]></content:encoded> <wfw:commentRss>http://www.dandev.com/php/gallery3-with-short_open_tag-off/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Fatal error: Cannot redeclare pclziputilpathreduction()</title><link>http://www.dandev.com/wordpress/cannon-redeclare-pclziputilpathreduction/</link> <comments>http://www.dandev.com/wordpress/cannon-redeclare-pclziputilpathreduction/#comments</comments> <pubDate>Sun, 25 Jan 2009 14:39:23 +0000</pubDate> <dc:creator>Daniel</dc:creator> <category><![CDATA[Development]]></category> <category><![CDATA[PHP]]></category> <category><![CDATA[WordPress]]></category> <category><![CDATA[fatal error]]></category> <category><![CDATA[pclziputilpathreduction]]></category> <category><![CDATA[wpau]]></category> <guid
isPermaLink="false">http://www.dandev.com/?p=104</guid> <description><![CDATA[I&#8217;ve seen this in a couple of places already, so I&#8217;ll go ahead an post it: If you&#8217;re getting an error with your WordPress install similar to: &#8220;Fatal error: Cannot redeclare pclziputilpathreduction()&#8221; and you&#8217;re using WP 2.7+, disable your WPAU &#8211; WordPress Automatic Upgrade plugin. This error is caused because in version 2.7 WordPress added [...]]]></description> <content:encoded><![CDATA[<p>I&#8217;ve seen this in a couple of places already, so I&#8217;ll go ahead an post it: If you&#8217;re getting an error with your WordPress install similar to: &#8220;Fatal error: Cannot redeclare pclziputilpathreduction()&#8221; and you&#8217;re using WP 2.7+, disable your WPAU &#8211; WordPress Automatic Upgrade plugin. This error is caused because in version 2.7 WordPress added the ability to update itself, so this plugin is no longer needed. Here is an image of what the deactivated plugin should look like on the plugins page:<br
/> <img
class="alignnone size-full wp-image-105" title="wpau-deactivated" src="http://www.dandev.com/wp-content/uploads/2009/01/wpau-deactivated.png" alt="wpau-deactivated" width="585" height="167" /></p><p>Update: This appears to be fixed in the latest version of the plugin. I was able to enable the plugin and browse around without getting errors. But I don&#8217;t see the need for this plugin in WP installs newer than 2.6 anyway.</p> ]]></content:encoded> <wfw:commentRss>http://www.dandev.com/wordpress/cannon-redeclare-pclziputilpathreduction/feed/</wfw:commentRss> <slash:comments>6</slash:comments> </item> <item><title>Happy Holidays</title><link>http://www.dandev.com/php/happy-holidays/</link> <comments>http://www.dandev.com/php/happy-holidays/#comments</comments> <pubDate>Sun, 28 Dec 2008 03:53:09 +0000</pubDate> <dc:creator>Daniel</dc:creator> <category><![CDATA[Life]]></category> <category><![CDATA[PHP]]></category> <category><![CDATA[holidays]]></category> <category><![CDATA[tux]]></category> <guid
isPermaLink="false">http://www.dandev.com/?p=92</guid> <description><![CDATA[I&#8217;d like to say Happy Holidays to you and yours this season. No matter your religion, race, nationality, whatever&#8230; I wish you the best in the new year. PHP.net&#8217;s holiday logo was finally updated this year. The previous one was a bit dated.]]></description> <content:encoded><![CDATA[<p>I&#8217;d like to say Happy Holidays to you and yours this season. No matter your religion, race, nationality, whatever&#8230; I wish you the best in the new year.</p><p><img
class="alignnone size-thumbnail wp-image-95" title="happy-holidays-tux" src="http://www.dandev.com/wp-content/uploads/2008/12/happy-holidays-tux-150x150.jpg" alt="happy-holidays-tux" width="150" height="150" /></p><p>PHP.net&#8217;s holiday logo was finally updated this year. The previous one was a bit dated.</p><p><img
class="alignnone size-full wp-image-97" title="12-27-2008-11-10-27-pm" src="http://www.dandev.com/wp-content/uploads/2008/12/12-27-2008-11-10-27-pm.png" alt="12-27-2008-11-10-27-pm" width="107" height="63" /></p> ]]></content:encoded> <wfw:commentRss>http://www.dandev.com/php/happy-holidays/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>PHP 5.3alpha</title><link>http://www.dandev.com/php/php-53alpha/</link> <comments>http://www.dandev.com/php/php-53alpha/#comments</comments> <pubDate>Mon, 22 Sep 2008 01:56:02 +0000</pubDate> <dc:creator>Daniel</dc:creator> <category><![CDATA[PHP]]></category> <category><![CDATA[Lambda Function]]></category> <category><![CDATA[NOWDOC]]></category> <category><![CDATA[PHP 5.3]]></category> <category><![CDATA[Shortcut]]></category> <category><![CDATA[Ternary]]></category> <guid
isPermaLink="false">http://www.dandev.com/?p=70</guid> <description><![CDATA[The next minor version of PHP5(5.3; currently in the alpha stage) will include support for NOWDOC, Lambda functions &#38; Closures, and the much anticipated ternary shortcut(?:). NOWDOCs are basically HEREDOCs, but without interpolation. It&#8217;s like using single-quotes versus double-quotes in your strings. Lambda functions allow you to define a single-use function so that it doesn&#8217;t [...]]]></description> <content:encoded><![CDATA[<p>The next minor version of PHP5(5.3; currently in the alpha stage) will include support for <a
href="http://php.net/language.types.string#language.types.string.syntax.nowdoc" target="_blank">NOWDOC</a>, <a
href="http://wiki.php.net/rfc/closures" target="_blank">Lambda functions &amp; Closures</a>, and the much anticipated ternary shortcut(?:). NOWDOCs are basically HEREDOCs, but without interpolation. It&#8217;s like using single-quotes versus double-quotes in your strings. Lambda functions allow you to define a single-use function so that it doesn&#8217;t have to be defined in the global scope of the script throughout execution. You can exectute things like loops or callbacks without having to define the function ahead of time, and you can return the value of your loops or callbacks to a variable directly. The Ternary shortcut is to allow you to perform a quick if() &amp; return the result, which is what the Ternary operator(s) does already, but you don&#8217;t have to specify an &#8220;else&#8221; value. Most(all?) of these features were discussed for inclusion in PHP6, but it looks like they&#8217;ve been backported, which is good. <img
src='http://www.dandev.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p><p>Also included will be &#8220;limited GOTO&#8221; which, as I understand it, will entail using the break language construct to jump to a certain position in the script. The information that I&#8217;ve seen is minimal, but this feature could be useful to a lot of people as well.</p> ]]></content:encoded> <wfw:commentRss>http://www.dandev.com/php/php-53alpha/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> </channel> </rss>
