<?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>Mon, 21 May 2012 08:19:33 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[PHPMaster.com: Automatic CSS3 Prefixer and Compressor]]></title>
      <guid>http://www.phpdeveloper.org/news/17700</guid>
      <link>http://www.phpdeveloper.org/news/17700</link>
      <description><![CDATA[<p>
On PHPMaster.com today there's a new tutorial showing how to use a little PHP magic to <a href="http://phpmaster.com/automatic-css3-prefixer-and-compressor/">compress your CSS</a> automatically.
</p>
<blockquote>
There are many ways to compress CSS files or automatically generate browser-specific CSS3 prefixes, but usually extra tools are used which is very annoying. I'd like to show you how such tasks can be done using only PHP. 
</blockquote>
<p>
Complete code for this small script is included in <a href="http://phpmaster.com/automatic-css3-prefixer-and-compressor/">the article</a>. It uses some regular expressions to parse the CSS and does some replacement and removal of things from the CSS content to slim it down and format it all as one line. There are <a href="http://cdn.phpmaster.com/files/2012/03/css-regex1.png">some</a> <a href="http://cdn.phpmaster.com/files/2012/03/css-regex2.png">images</a> <a href="http://cdn.phpmaster.com/files/2012/03/css-regex3.png">illustrating</a> the <a href="http://cdn.phpmaster.com/files/2012/03/css-regex4.png">process</a> also included.
</p>]]></description>
      <pubDate>Tue, 20 Mar 2012 12:38:30 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Community News: phpDocumentor Merges with DocBlox for phpDocumentor 2!]]></title>
      <guid>http://www.phpdeveloper.org/news/17686</guid>
      <link>http://www.phpdeveloper.org/news/17686</link>
      <description><![CDATA[<p>
As is mentioned in <a href="http://www.docblox-project.org/2012/03/docblox-is-unmasked-it-is-really-phpdocumentor-2/">this new post</a> to the DocBlox blog, there's been a major development between it and the phpDocumentor documentation generation tool - phpDocumentor 2 will be released soon, merging DocBlock and phpDocumentor into one tool!
</p>
<blockquote>
Announcing phpDocumentor 2 - the merging of the old (phpDocumentor) and the new (DocBlox). With the first alpha release of phpDocumentor (2.0.0a1), the new "Responsive" default template sports a new page layout, along with the useful layout improvements that the original DocBlox templates provided (which remain available) over the old phpDocumentor templates (which will retire with old phpDocumentor). Explore this new template at <a href="http://demo.phpdoc.org/Responsive/index.html.">http://demo.phpdoc.org/Responsive/index.html</a>.
</blockquote>
<p>
Users of the current phpDocumentor software (version 1.x) will need to upgrade their documentation and installations. If you'd like more information about the transition or just keep up with the latest on this exciting advancement, check out #phpdocumentor on Freenode IRC or follow <a href="http://twitter.com/phpdocumentor">@phpdocumentor</a> on Twitter.
</p>]]></description>
      <pubDate>Fri, 16 Mar 2012 07:58:00 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Brian Swan's Blog: Automating PHPUnit Tests in Windows Azure]]></title>
      <guid>http://www.phpdeveloper.org/news/17351</guid>
      <link>http://www.phpdeveloper.org/news/17351</link>
      <description><![CDATA[<p>
<i>Brian Swan</i> has posted another tutorial in a series looking at testing applications on the Azure platform. In <a href="http://blogs.msdn.com/b/silverlining/archive/2012/01/03/automating-phpunit-tests-in-windows-azure.aspx">this latest post</a> he talks about how to automate your <a href="http://phpunit.de">PHPUnit</a> tests as a part of the start up of the instance.
</p>
<blockquote>
In this post, I'll show you how to deploy your PHPUnit tests with your application, have the tests run as a start up task, and have the results written to your storage account for analysis. Attached to this post is a .zip file that contains a skeleton project that you can use to automatically run PHPUnit tests when you deploy a PHP application to Azure. I'll walk you though how to use the skeleton project, then provide a bit more detail as to how it all works (so you can make modifications where necessary).
</blockquote>
<p>He has it broken up into a few easy-to-follow steps:</p>
<ul>
<li>Download <a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-components-postattachments/00-10-25-21-34/AzurePHPWebRole.zip">the AzurePHPWebRole</a> zip archive and unpack it
<li>Copy your application, tests and PHP installation into the resulting file structure
<li>Create a skeleton "ServiceConfiguration.cscfg" file with the "cspack" command and edit it to change the "osfamily" and "osversion" settings
<li>Use "cspack" to package up the application and <a href="http://azurephp.interoperabilitybridges.com/articles/deploying-your-first-php-application-to-windows-azure#new_deploy">deploy the application</a>
</ul>
<p>
He walks you through the "how it works" steps too - the things that happen for you automatically on the server side to do things like set up the file to log to, configure the PHP environment and execute the "runtests" Powershell file as included in the AzurePHPWebRole download.
</p>]]></description>
      <pubDate>Thu, 05 Jan 2012 11:58:46 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Kevin Schroeder's Blog: Setting up a connection to the Zend Developer Cloud on Linux]]></title>
      <guid>http://www.phpdeveloper.org/news/17204</guid>
      <link>http://www.phpdeveloper.org/news/17204</link>
      <description><![CDATA[<p>
<i>Kevin Schroeder</i> has a method in one of his latest posts for hooking your linux-based system <a href="http://www.eschrade.com/page/setting-up-a-connection-to-the-zend-developer-cloud-on-linux">into Zend's phpcloud</a> platform, complete with an automatic upload (so you're not constantly sftp-ing).
</p>
<blockquote>
Connecting with the Zend DevCloud in Linux is actually quite easy if you know how to use SFTP. [...] But, as I said in a previous post, I hate having to do command line stuff for each and every file or commit.  I like things to work seamlessly.  So what I did was write a PHP script that connects to the DevCloud (or any SSH-based endpoint for that matter) and then monitors all of the files and directories for changes, such as a creation, modification or deletion event. 
</blockquote>
<p>
His script (<a href="https://github.com/kschroeder/PHP-INotify-SFTP-script/blob/master/push-changes.php">available on github</a>) uses the  <a href="http://pecl.php.net/package/inotify">PECL inotify package</a> to work, but once its set up, you can have the PHP process running the script in the background, pointed at your web root, and have it upload automatically.
</p>]]></description>
      <pubDate>Fri, 02 Dec 2011 10:04:10 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Ulf Wendel's Blog: PECL/mysqlnd_ms compared to a classic]]></title>
      <guid>http://www.phpdeveloper.org/news/16918</guid>
      <link>http://www.phpdeveloper.org/news/16918</link>
      <description><![CDATA[<p>
<i>Ulf Wendel</i> has a new post that <a href="http://blog.ulf-wendel.de/?p=318">compares the performance</a> of a classic method for using the mysqlnd plugin in MySQL replication to <a href=http://de2.php.net/mysqlnd_ms">mysqlnd_ms</a>, the replication and load balancing plugin for the mysqlnd driver (that works with the mysql and mysqli functionality and is, as of <a href="http://phpdeveloper.org/news/16913">this beta</a> of PHP, the default driver for MySQL connections).
</p>
<blockquote>
Recently I was asked if <a href="http://de2.php.net/mysqlnd_ms">PECL/mysqlnd_ms</a> should be used to add MySQL replication support to a yet to be developed PHP application. The <a href="http://blog.ulf-wendel.de/php.net/mysqlnd">mysqlnd</a> plugin, which supports all PHP MySQL extensions (PDO, mysqli, mysql), stood up against a classical, simple, proven and fast approach: one connection for reads, one connection for writes. Let's compare. This is a bit of an unfair challenge, because PECL/mysqlnd_ms was designed as a drop-in for existing applications, not optimized for those starting from scratch, *yell*... The plugin stands up quite well, anyway!
</blockquote>
<p>
He starts with a look at the "classical pattern" of using a factory or singleton to make a database object instance that gives back different connections for reads versus writes (slave vs master). The mysqlnd_ms plugin allows you to define configuration settings to tell the queries to automatically go to certain places for different actions. For example, you could use "master_on_write" to tell it to use a master node if you're doing an INSERT or UPDATE versus a SELECT. He also shows a more complex example using a SQL hint and one issue that might come from the "human element" - not paying attention to database character sets.
</p>]]></description>
      <pubDate>Wed, 28 Sep 2011 08:43:57 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Sebastian Bergmann's Blog: PHP Project Wizard]]></title>
      <guid>http://www.phpdeveloper.org/news/15865</guid>
      <link>http://www.phpdeveloper.org/news/15865</link>
      <description><![CDATA[<p>
In <a href="http://sebastian-bergmann.de/archives/908-PHP-Project-Wizard.html">this new post</a> to his blog <i>Sebastian Bergmann</i> mentions yet another new tool he's released - the PHP Project Wizard, a tool that helps with the creation of configuration files for setting up project build automation.
</p>
<blockquote>
<a href="https://github.com/sebastianbergmann/php-project-wizard">The PHP Project Wizard (PPW)</a> is a commandline tool that can be used to generate the scripts and configuration files necessary for the build automation of a PHP project. Given the location of a project's directories with sourcecode and tests as well as the project's name, the PHP Project Wizard generates scripts and configuration files necessary for build automation using <a href="http://ant.apache.org/">Apache Ant</a>.
</blockquote>
<p>
An example of its use is included - a simple call to the shell script with information about the source, tests and project directories. It then generates the XML files for Ant and PHPUunit to run. The result can then be used in the <a href="http://jenkins-php.org/">Jenkins jobs for PHP</a> setup seamlessly.
</p>]]></description>
      <pubDate>Mon, 07 Feb 2011 10:35:06 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Till Klampaeckel's Blog: Zend Framework: Slow automatic view rendering]]></title>
      <guid>http://www.phpdeveloper.org/news/14271</guid>
      <link>http://www.phpdeveloper.org/news/14271</link>
      <description><![CDATA[<p>
In a new entry to his blog, <i>Till Klampaeckel</i> looks at <a href="http://till.klampaeckel.de/blog/archives/92-Zend-Framework-Slow-automatic-view-rendering.html">view rendering for Zend Framework</a> applications and how, as he assumed it would, making a change in the automatic rendering on the views could speed things up quite a bit.
</p>
<blockquote>
My thesis is that there's a gain in page rendering time when I disable automatic view rendering and use explicit render calls ($this->render('foo');) inside my controllers. And to cut to the chase, there is. On our  app, I measured a 12% improvement using Xdebug's profiler - simple before-after-style.
</blockquote>
<p>
He talks a bit about his setup for testing his theory complete with a customized loader as well as the platform (OS and web server) he ran the tests on. He used <a href="http://xdebug.org/docs/install">Xdebug</a> to run the testing. His conclusion is a pretty obvious one - what you gain in convenience you sacrifice in performance. 
</p>]]></description>
      <pubDate>Tue, 30 Mar 2010 14:50:16 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Nefarious Designs Blog: Website builds using Make]]></title>
      <guid>http://www.phpdeveloper.org/news/14096</guid>
      <link>http://www.phpdeveloper.org/news/14096</link>
      <description><![CDATA[<p>
New from the Nefarious Designs blog today is a comprehensive post on <a href="http://nefariousdesigns.co.uk/archive/2010/02/website-builds-using-make">using make to create automated website builds</a>. He looks specifically at how to manage and build the Javascript and CSS portions of a site (but parts of it could be applied to just about any files you might want to automate).
</p>
<blockquote>
In the interests of improving quality in production, of eliminating repetitive tasks, and of general development time saving, it's often a good idea to automate some of the website build process. What do I mean by "website build process"? Put simply, the task of preparation and publication to production (your live, open-to-the-internet environment), from a development environment. [...] I'm going to look at how you can automate the CSS and JavaScript part of the build process using Make, a handy little program that is installed with the standard build tools on most *nix based systems.
</blockquote>
<p>
He shows how to automate the compression of multiple Javascript/CSS files into a single one (to reduce the number of HTTP requests required) by figuring out what's needed for the page. He shows how to build the Makefile with a few simple rules that concatenate the files together, run a minification tool on them and clean up any onld versions that might be out there. The final step is automatically updating the HTML to include the newly created Javascript/CSS file without having to do each one manually.
</p>
<p>
Examples of what you'll need to have in your Makefile are all included as well as the commands to issue to get it all working.
</p>]]></description>
      <pubDate>Fri, 26 Feb 2010 10:09:05 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Richard Thomas' Blog: Solar Framework Shorts - Deleting Caches]]></title>
      <guid>http://www.phpdeveloper.org/news/13294</guid>
      <link>http://www.phpdeveloper.org/news/13294</link>
      <description><![CDATA[<p>
<i>Richard Thomas</i> has <a href="http://www.phpjack.com/content/solar-framework-shorts-deleting-caches">posted a new "short"</a> for users of the <a href="http://solarphp.com">Solar Framework</a> to delete cached data.
</p>
<blockquote>
This one is simple but sweet, In your Models directory you define your Models and the basic rules they follow but do you know you can also make changes at the record level. Solar is smart and if it sees a Test/Record.php when creating records for the Test model it will load that class, this allows you to do all kinds of magic.
</blockquote>
<p>
His example shows how the script can automatically check, on pre-save, to see if the data is different than that in the cache and remove it if so. This cached data is replaced the next time through with the latest information.
</p>]]></description>
      <pubDate>Mon, 28 Sep 2009 11:11:57 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Stoyan Stefanov's Blog: Blog-to-podcast with ffmpeg]]></title>
      <guid>http://www.phpdeveloper.org/news/11952</guid>
      <link>http://www.phpdeveloper.org/news/11952</link>
      <description><![CDATA[<p>
<i>Stoyan Stefanov</i> has an interesting way to "automatically" create podcasts based on your blog posts using PHP, <a href="http://ffmpeg.mplayerhq.hu/">ffmpeg</a> and the "say" command in OS X to create the mp3 result.
</p>
<blockquote>
<a href="http://ffmpeg.mplayerhq.hu/">ffmpeg</a> is such an amazing tool, looks like it's for video what <a href="http://imagemagick.org/">ImageMagick</a> is for images. An all-powerful all-formats wicked cool command-line tool. This blog post is an introduction to some of the MP3 capabilities of ffmpeg. I'll use ffmpeg to transform a blog post into a podcast-ready mp3 file.
</blockquote>
<p>
<a href="http://www.phpied.com/blog-to-podcast-with-ffmpeg/">The post</a> shows how to use PHP's DOM functions to grab the title and contents of your post (a simple example, at least) and push that information out to a text file. From there, the "say" command is run on it with the "output" file parameter and the result is sent to ffmpeg for compression into an mp3.
</p>]]></description>
      <pubDate>Mon, 16 Feb 2009 08:45:52 -0600</pubDate>
    </item>
  </channel>
</rss>

