<?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>Tinsology &#187; PHP</title> <atom:link href="http://tinsology.net/category/php/feed/" rel="self" type="application/rss+xml" /><link>http://tinsology.net</link> <description>Searching for the Right Questions</description> <lastBuildDate>Wed, 25 Jan 2012 16:57:44 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.1</generator> <item><title>PHP 5.4 Preview</title><link>http://tinsology.net/2011/08/php-5-4-preview/</link> <comments>http://tinsology.net/2011/08/php-5-4-preview/#comments</comments> <pubDate>Tue, 02 Aug 2011 03:10:12 +0000</pubDate> <dc:creator>Tinsley</dc:creator> <category><![CDATA[PHP]]></category> <category><![CDATA[php5.4]]></category> <guid
isPermaLink="false">http://tinsology.net/?p=1737</guid> <description><![CDATA[The alpha release of PHP5.4 came out about a month ago. Along with the release came an announcement containing several of the more important changes, but not much in the way of detail. Here is a quick explanation of the &#8230; <a
href="http://tinsology.net/2011/08/php-5-4-preview/">Continue reading <span
class="meta-nav">&#8594;</span></a>]]></description> <wfw:commentRss>http://tinsology.net/2011/08/php-5-4-preview/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Weekly Function: gethostbyaddr</title><link>http://tinsology.net/2011/08/weekly-function-gethostbyaddr/</link> <comments>http://tinsology.net/2011/08/weekly-function-gethostbyaddr/#comments</comments> <pubDate>Mon, 01 Aug 2011 07:41:32 +0000</pubDate> <dc:creator>Tinsley</dc:creator> <category><![CDATA[PHP]]></category> <category><![CDATA[weekly function]]></category> <guid
isPermaLink="false">http://tinsology.net/?p=1720</guid> <description><![CDATA[This function can be used to retrieve the host name for a particular IP address. For example, if you give it the IP address 74.207.242.169 it will output tinsology.net. Just off of the top of my head, one potential use &#8230; <a
href="http://tinsology.net/2011/08/weekly-function-gethostbyaddr/">Continue reading <span
class="meta-nav">&#8594;</span></a>]]></description> <wfw:commentRss>http://tinsology.net/2011/08/weekly-function-gethostbyaddr/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Weekly Function: ctype_digit</title><link>http://tinsology.net/2011/07/weekly-function-ctype_digit/</link> <comments>http://tinsology.net/2011/07/weekly-function-ctype_digit/#comments</comments> <pubDate>Thu, 21 Jul 2011 07:00:02 +0000</pubDate> <dc:creator>Tinsley</dc:creator> <category><![CDATA[PHP]]></category> <category><![CDATA[weekly function]]></category> <guid
isPermaLink="false">http://tinsology.net/?p=1698</guid> <description><![CDATA[I had actually never heard of this function before my random function grabber spit it out, or for that matter any of the ctype functions. What this function does is takes a value and determines if it consists entirely of &#8230; <a
href="http://tinsology.net/2011/07/weekly-function-ctype_digit/">Continue reading <span
class="meta-nav">&#8594;</span></a>]]></description> <wfw:commentRss>http://tinsology.net/2011/07/weekly-function-ctype_digit/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Weekly PHP Function</title><link>http://tinsology.net/2011/07/weekly-php-function/</link> <comments>http://tinsology.net/2011/07/weekly-php-function/#comments</comments> <pubDate>Thu, 21 Jul 2011 01:10:24 +0000</pubDate> <dc:creator>Tinsley</dc:creator> <category><![CDATA[PHP]]></category> <category><![CDATA[weekly function]]></category> <guid
isPermaLink="false">http://tinsology.net/?p=1694</guid> <description><![CDATA[Starting this week I&#8217;m going to be writing a post about a particular PHP function. Each week a function will be chosen at random from php.net&#8217;s Function List and I&#8217;ll write about (including but not limited to) basic usage, interest &#8230; <a
href="http://tinsology.net/2011/07/weekly-php-function/">Continue reading <span
class="meta-nav">&#8594;</span></a>]]></description> <wfw:commentRss>http://tinsology.net/2011/07/weekly-php-function/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>PHP Donts</title><link>http://tinsology.net/2011/07/php-donts/</link> <comments>http://tinsology.net/2011/07/php-donts/#comments</comments> <pubDate>Sun, 03 Jul 2011 09:56:09 +0000</pubDate> <dc:creator>Tinsley</dc:creator> <category><![CDATA[My Thoughts and Rants]]></category> <category><![CDATA[PHP]]></category> <guid
isPermaLink="false">http://tinsology.net/?p=1645</guid> <description><![CDATA[The following is a non-comprehensive list (in no particular order) of things I often see people doing while using PHP that they probably shouldn&#8217;t. The purpose of this list is to inform; hopefully it will shed some light on what &#8230; <a
href="http://tinsology.net/2011/07/php-donts/">Continue reading <span
class="meta-nav">&#8594;</span></a>]]></description> <wfw:commentRss>http://tinsology.net/2011/07/php-donts/feed/</wfw:commentRss> <slash:comments>3</slash:comments> </item> <item><title>PHP json_encode and json_decode Alternatives</title><link>http://tinsology.net/2011/04/php-json_encode-and-json_decode-alternatives/</link> <comments>http://tinsology.net/2011/04/php-json_encode-and-json_decode-alternatives/#comments</comments> <pubDate>Wed, 20 Apr 2011 14:38:00 +0000</pubDate> <dc:creator>Tinsley</dc:creator> <category><![CDATA[PHP]]></category> <category><![CDATA[json]]></category> <guid
isPermaLink="false">http://tinsology.net/?p=1475</guid> <description><![CDATA[The number of APIs and other remote services that either support or require json as a means for transferring data is growing. However, PHP does not have guaranteed support for json encoding or decoding functions until version 5.2, which means if you want your application to be as portable as possible you'll need to find an alternative. The following functions should provide that. Note that I haven't exhaustively tested either of these functions and they may not completely replicate all of the functionality of their built in counterparts, but they should be sufficient for basic usage: <a
href="http://tinsology.net/2011/04/php-json_encode-and-json_decode-alternatives/">Continue reading <span
class="meta-nav">&#8594;</span></a>]]></description> <wfw:commentRss>http://tinsology.net/2011/04/php-json_encode-and-json_decode-alternatives/feed/</wfw:commentRss> <slash:comments>2</slash:comments> </item> <item><title>Fetching Remote Content in PHP</title><link>http://tinsology.net/2010/12/fetching-remote-content-in-php/</link> <comments>http://tinsology.net/2010/12/fetching-remote-content-in-php/#comments</comments> <pubDate>Tue, 21 Dec 2010 14:08:43 +0000</pubDate> <dc:creator>Tinsley</dc:creator> <category><![CDATA[PHP]]></category> <category><![CDATA[Programming]]></category> <category><![CDATA[curl]]></category> <category><![CDATA[fopen]]></category> <category><![CDATA[fsockopen]]></category> <category><![CDATA[remote]]></category> <category><![CDATA[url]]></category> <guid
isPermaLink="false">http://tinsology.net/?p=1283</guid> <description><![CDATA[Reading in remote content with PHP can be an incredibly simple task:
<code> $url = 'http://example.com/foo.php?bar=1';
$remote_content = file_get_contents($url); </code> One problem with the above solution is that it requires allow_url_fopen to be enabled in your php.ini. If you're writing a portable application that depends on being able to fetch remote content you probably don't want to tell your users to modify their php.ini. Doing so would mean turning away users who don't have access to their php.ini (as is the case with some shared hosts). Ideally you would want a solution that offers some redundancy. <a
href="http://tinsology.net/2010/12/fetching-remote-content-in-php/">Continue reading <span
class="meta-nav">&#8594;</span></a>]]></description> <wfw:commentRss>http://tinsology.net/2010/12/fetching-remote-content-in-php/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Managing URL Parameters in PHP</title><link>http://tinsology.net/2010/12/managing-url-parameters-in-php/</link> <comments>http://tinsology.net/2010/12/managing-url-parameters-in-php/#comments</comments> <pubDate>Mon, 06 Dec 2010 00:22:28 +0000</pubDate> <dc:creator>Tinsley</dc:creator> <category><![CDATA[PHP]]></category> <category><![CDATA[get]]></category> <category><![CDATA[uri]]></category> <category><![CDATA[url]]></category> <category><![CDATA[url parameters]]></category> <guid
isPermaLink="false">http://tinsology.net/?p=1255</guid> <description><![CDATA[This is a function that I find myself using more and more often to create or modify URLs that contain a query string: <a
href="http://tinsology.net/2010/12/managing-url-parameters-in-php/">Continue reading <span
class="meta-nav">&#8594;</span></a>]]></description> <wfw:commentRss>http://tinsology.net/2010/12/managing-url-parameters-in-php/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Doing Things the Hard Way</title><link>http://tinsology.net/2010/08/doing-things-the-hard-way/</link> <comments>http://tinsology.net/2010/08/doing-things-the-hard-way/#comments</comments> <pubDate>Tue, 17 Aug 2010 09:09:39 +0000</pubDate> <dc:creator>Tinsley</dc:creator> <category><![CDATA[My Thoughts and Rants]]></category> <category><![CDATA[PHP]]></category> <category><![CDATA[Programming]]></category> <category><![CDATA[Bugs]]></category> <category><![CDATA[Errors]]></category> <guid
isPermaLink="false">http://tinsology.net/?p=1179</guid> <description><![CDATA[Every now and then I discover something that makes me feel like I've been doing things the hard way. The feeling is an interesting combination of excitement and embarrassment. I experienced this today while browsing PHP documentation. I discovered two function that will make my life a lot easier in the future: <a
href="http://www.php.net/manual/en/function.debug-backtrace.php">debug_backtrace</a> and <a
href="http://www.php.net/manual/en/function.debug-print-backtrace.php">debug_print_backtrace</a>. As someone who has written his fair share of Java, I'm very accustomed <a
href="http://tinsology.net/2010/08/doing-things-the-hard-way/">Continue reading <span
class="meta-nav">&#8594;</span></a>]]></description> <wfw:commentRss>http://tinsology.net/2010/08/doing-things-the-hard-way/feed/</wfw:commentRss> <slash:comments>2</slash:comments> </item> <item><title>Apparatus 0.4</title><link>http://tinsology.net/2010/04/apparatus-0-4/</link> <comments>http://tinsology.net/2010/04/apparatus-0-4/#comments</comments> <pubDate>Thu, 29 Apr 2010 03:03:09 +0000</pubDate> <dc:creator>Tinsley</dc:creator> <category><![CDATA[PHP]]></category> <category><![CDATA[Software]]></category> <category><![CDATA[Apparatus]]></category> <guid
isPermaLink="false">http://tinsology.net/?p=1136</guid> <description><![CDATA[A new version of <a
href="http://tinsology.net/scripts/apparatus/">Apparatus</a> is available. Previously I wrote about several new features that would be included in this version, however rather than further postpone a release, I've decided to hold off on those features until the next version. Version 0.4 incorporates a new theme, the latest version of tab override (which should resolve any browser compatibility issues), and various improvements and modifications <a
href="http://tinsology.net/2010/04/apparatus-0-4/">Continue reading <span
class="meta-nav">&#8594;</span></a>]]></description> <wfw:commentRss>http://tinsology.net/2010/04/apparatus-0-4/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>PHP Overloading</title><link>http://tinsology.net/2010/04/php-polymorphism/</link> <comments>http://tinsology.net/2010/04/php-polymorphism/#comments</comments> <pubDate>Sat, 17 Apr 2010 02:33:34 +0000</pubDate> <dc:creator>Tinsley</dc:creator> <category><![CDATA[My Thoughts and Rants]]></category> <category><![CDATA[PHP]]></category> <category><![CDATA[Programming]]></category> <category><![CDATA[overloading]]></category> <guid
isPermaLink="false">http://tinsology.net/?p=1099</guid> <description><![CDATA[The lack of function overloading is one of my biggest complaints about PHP. If you're not familiar with overloading, its a feature of some languages that allows you to defined multiple methods (or functions) with the same name, but taking different paramenters. In Java, for instance, methods are not identified solely by their name. Instead, functions are distinguished by their signature: their name, return type, number of parameters and their <a
href="http://tinsology.net/2010/04/php-polymorphism/">Continue reading <span
class="meta-nav">&#8594;</span></a>]]></description> <wfw:commentRss>http://tinsology.net/2010/04/php-polymorphism/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Apparatus Update Preview</title><link>http://tinsology.net/2010/03/apparatus-update-preview/</link> <comments>http://tinsology.net/2010/03/apparatus-update-preview/#comments</comments> <pubDate>Wed, 10 Mar 2010 22:50:49 +0000</pubDate> <dc:creator>Tinsley</dc:creator> <category><![CDATA[PHP]]></category> <category><![CDATA[Apparatus]]></category> <guid
isPermaLink="false">http://tinsology.net/?p=1054</guid> <description><![CDATA[I've been making some progress on the next version of <a
href="http://tinsology.net/scripts/apparatus/">Apparatus</a>. Along with some bug fixes there are a few new features. One new thing is the option to attach a database to allow for more advanced functionality. For now this includes something I'm calling examples generation, which allows you to store your code and output and allow others to view it. This is done without giving them access <a
href="http://tinsology.net/2010/03/apparatus-update-preview/">Continue reading <span
class="meta-nav">&#8594;</span></a>]]></description> <wfw:commentRss>http://tinsology.net/2010/03/apparatus-update-preview/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>PHP Confirmation Emails</title><link>http://tinsology.net/2010/02/php-confirmation-emails/</link> <comments>http://tinsology.net/2010/02/php-confirmation-emails/#comments</comments> <pubDate>Thu, 18 Feb 2010 18:56:17 +0000</pubDate> <dc:creator>Tinsley</dc:creator> <category><![CDATA[PHP]]></category> <category><![CDATA[confirmation]]></category> <category><![CDATA[email]]></category> <guid
isPermaLink="false">http://tinsology.net/?p=1026</guid> <description><![CDATA[If you are implementing your own user management system you may want to ensure that emails associated with users' accounts are valid. The most straightforward way of doing this is to send an email to this account and verify that the user received it. Obviously we don't want to do this manually so the solution is to write a script that automates the process.
<strong>High Level Concept</strong> What we <a
href="http://tinsology.net/2010/02/php-confirmation-emails/">Continue reading <span
class="meta-nav">&#8594;</span></a>]]></description> <wfw:commentRss>http://tinsology.net/2010/02/php-confirmation-emails/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Apparatus (also Happy New Year!)</title><link>http://tinsology.net/2010/01/apparatus-also-happy-new-year/</link> <comments>http://tinsology.net/2010/01/apparatus-also-happy-new-year/#comments</comments> <pubDate>Fri, 01 Jan 2010 08:00:05 +0000</pubDate> <dc:creator>Tinsley</dc:creator> <category><![CDATA[PHP]]></category> <category><![CDATA[Apparatus]]></category> <guid
isPermaLink="false">http://tinsology.net/?p=1004</guid> <description><![CDATA[For a while now I've been working on a web-based PHP interpreter; an interface I can use to quickly test or develop code from my browser. Ultimately this resulted in <a
href="http://tinsology.net/scripts/apparatus/">Apparatus</a>, an in-browser PHP read-evaulate-print loop. Give it a try: <a
href="http://tinsology.net/scripts/apparatus/">http://tinsology.net/scripts/apparatus/</a>.
Note that this is currently a beta version. Any help with identifying bugs will be greatly appreciated.
P.S. Happy New Year! <a
href="http://tinsology.net/2010/01/apparatus-also-happy-new-year/">Continue reading <span
class="meta-nav">&#8594;</span></a>]]></description> <wfw:commentRss>http://tinsology.net/2010/01/apparatus-also-happy-new-year/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>PHP Iterators</title><link>http://tinsology.net/2009/12/php-iterators/</link> <comments>http://tinsology.net/2009/12/php-iterators/#comments</comments> <pubDate>Fri, 18 Dec 2009 22:09:51 +0000</pubDate> <dc:creator>Tinsley</dc:creator> <category><![CDATA[PHP]]></category> <category><![CDATA[interface]]></category> <category><![CDATA[iterator]]></category> <guid
isPermaLink="false">http://tinsology.net/?p=885</guid> <description><![CDATA[If you've spent any significant amount of time coding in PHP you're most likely familiar with PHP's foreach loop syntax. In simple terms, a foreach loop is an easy way to iterate over the elements of an array. Chances are if you're reading this you already know that. What you may not know, however, is that it is possible to iterate objects with a foreach loop. Assuming you have some <a
href="http://tinsology.net/2009/12/php-iterators/">Continue reading <span
class="meta-nav">&#8594;</span></a>]]></description> <wfw:commentRss>http://tinsology.net/2009/12/php-iterators/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> </channel> </rss>
