<?xml version="1.0"?>
<rss version="2.0">
  <channel>
    <title>PHPDeveloper.org</title>
    <link>http://www.phpdeveloper.org</link>
    <description>Up-to-the Minute PHP News, views and community</description>
    <language>en-us</language>
    <pubDate>Thu, 23 May 2013 09:41:51 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Script-Tutorials.com: How to Use APC Caching with PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/16860</guid>
      <link>http://www.phpdeveloper.org/news/16860</link>
      <description><![CDATA[<p>
On Script-Tutorials.com today there's a new article introducing you to <a href="http://www.script-tutorials.com/how-to-use-apc-caching-with-php/">using APC caching</a> in your PHP applications. Their simple example sets up a caching class that handles the dirty work for you.
</p>
<blockquote>
Today I have another interesting article for PHP. We will talking about caching, and practice of using caching in php. I will make review of APC caching and will show you how you can use APC in PHP. [...] Now people have learned to use the server memory for data storage. RAM much faster than hard disk, and the price of memory falls all the time, so let's use all these advantages of this.
</blockquote>
<p>
Included in the post is the code for a few different files - the caching class itself that implements the <a href="http://php.net/apc">APC</a> functions in PHP and some examples of it in use: saving objects, fetching data from the cache and removing things from the cache.
</p>]]></description>
      <pubDate>Thu, 15 Sep 2011 08:29:14 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Stefan Koopmanschap's Blog: Removing stylesheets in symfony 1]]></title>
      <guid>http://www.phpdeveloper.org/news/16256</guid>
      <link>http://www.phpdeveloper.org/news/16256</link>
      <description><![CDATA[<p>
<i>Stefan Koopmanschap</i> has a quick post to his blog with a handy, not immediately obvious tip for the <a href="http://symfony-project.com">Symfony</a> users out there - how to <a href="http://www.leftontheweb.com/message/Removing_stylesheets_in_symfony_1">remove site-wide stylesheets</a> in a Symfony application so it's not loaded automatically.
</p>
<blockquote>
Today I encountered a situation I've not encountered before: I have a project-wide stylesheet that should be used for everything, except one specific module that has different (brandable) stylesheets. I created a view.yml for this module with a different stylesheet, but of course the configuration files are merged so it doesn't actually overwrite the main stylesheet file. And this wasn't really what I needed here.
</blockquote>
<p>
His technique involves a change to the main view.yml configuration file with a special syntax to remove the CSS file with a negation. A snippet is included to illustrate. You can find out more about view configuration in <a href="http://www.symfony-project.org/book/1_0/07-Inside-the-View-Layer#chapter_07_view_configuration">this chapter</a> of the "Definitive Guide to Symfony".
</p>]]></description>
      <pubDate>Wed, 27 Apr 2011 08:58:49 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[DZone.com: How to remove getters and setters]]></title>
      <guid>http://www.phpdeveloper.org/news/15951</guid>
      <link>http://www.phpdeveloper.org/news/15951</link>
      <description><![CDATA[<p>
On DZone.com's Web Builder Zone <i>Giorgio Sironi</i> has posted a few methods you can use to help <a href="http://css.dzone.com/articles/how-remove-getters-and-setters">get rid of getters and setters</a> in your OOP PHP applications.
</p>
<blockquote>
Encapsulation is (not only, but also) about being capable of changing private fields. If you write getters and setters, you introduce a leaky abstraction over private fields, since the names and number of your public methods are influenced coupled to them. They aren't really private anymore: 
</blockquote>
<p>
To show his alternatives, he uses a sample "User" class with a whole list of private properties. There's initially a get/set for the nickname and password values, but he suggests a few replacements:
</p>
<ul>
<li>passing values in through the constructor
<li>using the "Information Architect" pattern to have the most responsible method handle the value setting
<li>the "Double Dispatch" method that uses dependency injection
<li>using the Command pattern and changesets of data
</ul>
<p>
He also briefly mentions the Command-Query Responsibility Segregation (CQRS) method, but doesn't have any code example to go with it.
</p>]]></description>
      <pubDate>Wed, 23 Feb 2011 12:02:17 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Johannes Schluter's Blog: Changes in PHP trunk: No more extension for sqlite version 2]]></title>
      <guid>http://www.phpdeveloper.org/news/15471</guid>
      <link>http://www.phpdeveloper.org/news/15471</link>
      <description><![CDATA[<p>
<i>Johannes Schluter</i> has a <a href="http://schlueters.de/blog/archives/147-Changes-in-PHP-trunk-No-more-extension-for-sqlite-version-2.html">quick new post</a> to his blog today talking about parts of the sqllite extension that will be dropped from the core - the current sqlite_* methods and the pdo_sqlite driver.
</p>
<blockquote>
The issue there is that this depends on the SQLite 2 library which isn't supported by upstream anymore for a few years. It was a logical step therefore to remove this extension from PHP trunk. The support for the <a href="http://php.net/sqlite3">sqlite3</a> extension and the <a href="http://php.net/manual/en/ref.pdo-sqlite.php">PDO_sqlite driver</a> (same link as above, read it carefully), which use version 3 of the library, are continued.
</blockquote>
<p>
The change probably won't be happening in any of the PHP 5.3.x releases but should becoming in PHP 5.4 so, as he advises, you might need to rebuild your database file and change your application to correct things for the changes.
</p>]]></description>
      <pubDate>Mon, 22 Nov 2010 13:49:05 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Web Builder Zone: What we don't need in object-oriented programming]]></title>
      <guid>http://www.phpdeveloper.org/news/15223</guid>
      <link>http://www.phpdeveloper.org/news/15223</link>
      <description><![CDATA[<p>
On the Web Builder Zone, <i>Giorgio Sironi</i> <a href="http://css.dzone.com/articles/what-we-dont-need-object">has a few suggestions</a> about things that aren't really needed in object-oriented development but seem to have found their way in none the less (most of them are in PHP too).
</p>
<blockquote>
It is in general true that you should strive for writing code as simple as possible (in length but in complexity too) to obtain an end result specified by a requirement or a user story. If there are two designs for a feature, almost always we would choose the simplest. This article takes a broader view on object-oriented programming, and ask the following question: What are the constructs we don't need in an object-oriented language? What we can take away without hampering our capabilities of building software?
</blockquote>
<p>
He has a whole list of things that he thinks could be removed - "extra features" that wouldn't cause heartache if dropped including:
</p>
<ul>
<li>instanceof
<li>break/continue
<li>protected subclassing scope
<li>if (conditional)
<li>switch (conditional chain)
<li>public (for fields)
</ul>]]></description>
      <pubDate>Mon, 04 Oct 2010 10:53:08 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[The Register: Exam board deletes C and PHP from CompSci A-levels]]></title>
      <guid>http://www.phpdeveloper.org/news/14525</guid>
      <link>http://www.phpdeveloper.org/news/14525</link>
      <description><![CDATA[<p>
According to <a href="http://www.theregister.co.uk/2010/05/12/aqa_c_php/">this new article</a> from The Register, the C and PHP languages will no longer be taught as a part of the A-Levels computer science course materials.
</p>
<blockquote>
A-level computer science students will no longer be taught C, C# or PHP from next year following a decision to withdraw the languages by the largest exam board. Schools teaching the Assessment and Qualifications Alliance's (AQA) COMP1 syllabus have been asked to use one of its other approved languages - Java, Pascal/Delphi, Python 2.6, Python 3.1, Visual Basic 6 and VB.Net 2008. The final resits allowing work in C, C# and PHP will be held in June 2011.
</blockquote>
<p>
According to <a href="http://web.aqa.org.uk/qual/gce/pdf/WITHDRAWAL_OF_COMP1.PDF">this document</a> and the AQA, the change is a response to the lack of momentum of some of the other approved languages. They say that the demand for teachers trained with the languages has made PHP and C fall by the wayside to be replaced with things like Delphi or Python.
</p>]]></description>
      <pubDate>Mon, 17 May 2010 17:17:10 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Content with Style: Getting phpunit to work with MAMP]]></title>
      <guid>http://www.phpdeveloper.org/news/12502</guid>
      <link>http://www.phpdeveloper.org/news/12502</link>
      <description><![CDATA[<p>
On the Content with Style blog today <i>Pascal Opitz</i> has made a (very) quick post about how to get PHPUnit up nd running in your <a href="http://www.mamp.info/en/index.html">MAMP</a> installation.
</p>
<blockquote>
In order to run my unit tests, I needed to get phpunit running with MAMP. Thanks to the <a href="http://mark-kirby.co.uk/2009/installing-phpunit-with-mamp/">helpful post of Mark Kirby</a> on this, I figured it out.
</blockquote>
<p>
The key is in changing the interpreter path in one file and removing a bit of code from another to point to the new PHP binary's path. You'll also need to update your PEAR include path to add in the new pear.conf location.
</p>]]></description>
      <pubDate>Wed, 13 May 2009 07:54:15 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Brian Moon's Blog: The history of PHP eating newlines after the closing tag]]></title>
      <guid>http://www.phpdeveloper.org/news/12065</guid>
      <link>http://www.phpdeveloper.org/news/12065</link>
      <description><![CDATA[<p>
<i>Brian Moon</i> <a href="http://brian.moonspot.net/php-history-newline-closing-tag">points out</a> a (sometimes annoying) habit of PHP when it comes to newlines - it drops them after the closing tag.
</p>
<blockquote>
Have you ever noticed that PHP eats the newlines after a closing PHP tag?  Not sure what I mean?  There is lots on <a href="http://www.google.com/search?q=php+newline+close+tag">Google about it</a>. [...] So, why does PHP do this?  Well, you have to <a href="http://marc.info/?t=90279165800002&r=1&w=2">go back 11 years</a>.  PHP 3 was emerging.  I was just starting to use it for <a href="http://www.phorum.org/">Phorum</a> at the time.  There were two reasons.
</blockquote>
<p>
The first reason was the it, at least in the minds of the developers of the language, "removed all traces of PHP" from the script without any training newlines to show for it. The second case was a bit more valid - because lots of editors at the time required newlines at the end of every line of code. This caused loads of trouble tracking down things like the infamous "Headers already sent" issues (pre-output buffering).
</p>]]></description>
      <pubDate>Wed, 04 Mar 2009 11:13:47 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Sameer Borate's Blog: Selecting all except some columns in MySQL]]></title>
      <guid>http://www.phpdeveloper.org/news/12045</guid>
      <link>http://www.phpdeveloper.org/news/12045</link>
      <description><![CDATA[<p>
<i>Sameer Borate</i> <a href="http://www.codediesel.com/mysql/selecting-all-except-some-columns-in-mysql/">shows how</a> to turn things around in your application's SQL statement and, instead of selecting the columns you need, showing how to remove the columns you don't need dynamically.
</p>
<blockquote>
The MySQL SELECT is a ubiquitous statement. You can select rows using the '˜*' operator or by listing the individual column names. But many times you may require using all the columns from a table except a couple of them. For example you may have a table containing twelve columns from which you require only eleven columns.
</blockquote>
<p>
Sometimes that extra column can contain larger content you might not need or want. He creates a get_column_names and create_statement functions that grab the column names and, based on an "exclude" array, takes out the unwanted records. The array is then looped through and appended back together as the new column list for the select.
</p>]]></description>
      <pubDate>Mon, 02 Mar 2009 11:13:08 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Johannes Schluter's Blog: Scream!]]></title>
      <guid>http://www.phpdeveloper.org/news/12037</guid>
      <link>http://www.phpdeveloper.org/news/12037</link>
      <description><![CDATA[<p>
After being tasked with some code that was filled with the suppression character (@) all over, <i>Johannes Schluter</i> decided to take matters into his own hands and write an extension to disable it.
</p>
<blockquote>
That's annoying. So I wrote a simple extension disabling this operator. That helped. I then proposed that extension to <A href="http://pecl.php.net/">pecl</a>, while doing that I found out that <a href="http://t3.dotgnu.info/blog/php/breaking-the-silence.html">Gopal has written a similar extension</a> before. After short discussions we added that extension, using the name <a href="http://pecl.php.net/scream">scream</a> to pecl and released the extension there.
</blockquote>
<p>
Documentation for the extension has <a href="http://php.net/scream">already been added</a> to the PHP manual for the "Break the Silence" operator. By enabling the setting (either in your php.ini or via an <a href="http://php.net/ini_set">ini_set</a>) turning on "scream_enabled", any use of the suppression operator (@) will be nulled out and all according error messages will be displayed. 
</p>]]></description>
      <pubDate>Fri, 27 Feb 2009 11:14:50 -0600</pubDate>
    </item>
  </channel>
</rss>
