News Feed
Sections




News Archive
feed this:

Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

SitePoint PHP Blog:
Using PHP Streams Effectively
November 21, 2013 @ 11:54:02

Vito Tardia has a new tutorial posted to the SitePoint PHP blog today showing you how to use PHP streams effectively, a continuation of his streams series started here.

n my previous article we've discovered the basics of PHP Streams and how powerful they were. In this tutorial we are going to use this power in the real world. First I'll show you how to build your custom filters and attach them to a stream, then we'll package our filters inside a document parser application.

He starts out by introducing the concept of filters in streams - bits of code that can be attached to the stream to perform operations on the data traveling through it. He includes a simple base64 encoding example with a fopen call to illustrate. He gets into more complex filtering by creating a Markdown filter capable of translating the incoming Markdown-formatted data into a document using the MarkdownExtra library. He also includes an example of another filter added on post-Markdown conversion, a Template filter using the RainTPL templating library.

0 comments voice your opinion now!
using streams filter markdown template tutorial

Link: http://www.sitepoint.com/using-php-streams-effectively/

Gonzalo Ayuso:
Releasing unmanaged resources (a PHP port from C#'s "using" statement)
September 10, 2013 @ 10:55:44

In a new post to his site Gonzalo Ayuso has put together an example of releasing unmanaged resources similar to something C# does with its "using" functionality.

Sometimes we work with instances that needs to released even when exceptions happens. Something typical when we work with resources (Files, Database connections, ) [...] Sometimes I need collaborate with C# projects. C# is a great language. I really like it. It has a really cool feature to solve this problem: the "using" statement. Because of that we are going to build today one small library to implement something similar in PHP.

He provides a basic code example, showing how to use a "Disposable" interface with a "dispose" method that can be implemented based on the resource type you need to use. In his example, it's a "File" class that implements the interface and and global "using" function is defined to clean up the object after use. The code for the sample is also available on Github.

0 comments voice your opinion now!
release unmanaged resource csharp using tutorial

Link: http://gonzalo123.com/2013/09/09/releasing-unmanaged-resources-a-php-port-from-cs-using-statement/

Tim Koschuetzki's Blog:
New Poll (Using CakePHP)
November 01, 2007 @ 08:00:35

Tim Koschuetzki has started up a new poll on his site asking its visitors questions involving CakePHP:

The new poll asks you if you are using the CakePHP Framework already or if you plan on using it. For those of you who don't know it yet - it's in my opinion th framework to go these days. The easy and intuitive MVC architecture and the components in it make php development really easy and fun.

So far there haven't been any votes (it's still pretty new) so get on over and voice your opinion now.

CakePHP is one of the more popular and powerful PHP frameworks out there and it has a loyal following of dedicated users and developers on its team. It's definitely worth checking out if you're still perusing the market for a framework to go with.

0 comments voice your opinion now!
cakephp framework poll using plan cakephp framework poll using plan


Ilia Alshanetsky's Blog:
Why are you not using PHP 5?
December 11, 2006 @ 13:34:00

In a new post on his blog today Ilia Alshanetsky asks the community the all-important question on everyone's lips - "why are you not using PHP 5?"

It would seem that despite a 300% growth (from <4% to >12%) in PHP 5.X usage in 2006, it still only commands about 12% of the entire PHP user base. [...] As a 5.X release master, I am very interested in hearing what's holding back 5.X adoption and what can we, as the developers do in 2007 to help speed of 5.X adoption.

He notes that a lot of the concerns (speed issues, stability problems, etc) have already been addressed and are working like a champ in the latest PHP5 versions releases.

So, do you have a reason why you're still using PHP 4? If you're not using it, you know someone who is. Take this as an opportunity to give them a friendly shove in the PHP 5 direction.

You can also check out this response and opinion on the topic on cyberlot's blog as well as this post on the PHPWomen blog.

0 comments voice your opinion now!
php5 using statistics php4 speed complaint stable php5 using statistics php4 speed complaint stable


NewsForge.com:
Using phpMyAdmin
August 18, 2006 @ 07:11:33

On NewsForge, an article with a look at phpMyAdmin has been posted, a "getting started" guide for those not familiar with the software.

So many open source projects depend on MySQL that it's almost impossible for administrators and other open source enthusiasts to avoid working with at least one MySQL database. MySQL's command line interface is easy enough to use, but if you don't feel like reaching for a five-pound MySQL reference book or Googling for proper SQL syntax, phpMyAdmin is a great alternative to learning MySQL commands by heart.

They take a brief look at how it's set up, though it's not an installation tutorial, more about configuration. They guide you through some of the interface before getting to the real functionality - inserts, selects, dumping/restoring data, working with users, and checking/repairing tables when things go awry.

0 comments voice your opinion now!
using phpmyadmin guide introduction configure insert users data repair using phpmyadmin guide introduction configure insert users data repair


php|architect:
Using Zend framework Components In CakePHP
August 08, 2006 @ 06:36:41

php|architect has posted a new article on its A/R/T article repository today, a tutorial spotlighting the use of Zend Framework components inside of the CakePHP framework.

In this article I describe how to use Zend framework components in a CakePHP application by means of building a very simple CakePHP application using Zend_Service_Flickr, a component for accessing the Flickr web services.

The author, Daniel Hofstetter, leads the reader through the creation of the sample Flickr application in CakePHP. Using the vendor() functionality, they integrate the Zend_Service functionality with the Flickr abilities built-in. A few simple lines later and you'll be pulling images up quickly.

With that working, he moves on to a third iteration of things, making a more flexible solution to allow for the inclusion of more than just the one script inside a helper automatically.

0 comments voice your opinion now!
zend framework cakephp using components zend framework cakephp using components


Jacob Santos' Blog:
Global Functions and How to Not Use Them
August 08, 2006 @ 06:26:32

In his latest post, Jacob Santos talks about global functions and some of the dangers behind using them in your code (as per his own experience debugging with them in place).

When I develop in PHP and code functions, I always either place them in a file or place them at the top of the script. Well, this is more about C++ and how I totally freaked out my teacher, by breaking his paradigm of thought. You see, you can have a definition of a function at the top of the page and then code the body of the function later.

He soon discovered his problem in debugging the script - he was too used to having the global functions at the top (as in C++) and not mixed in with the code - or at the bottom of the script.

If there is something at least somewhat common about popular scripts that people use and extend, is that the functions are placed in organized manner. Reforming otherwise is a bitch and I remember rewriting the entire script anyway. You can't reform when you can't reuse anything.
0 comments voice your opinion now!
global functions using badly location debugging global functions using badly location debugging


PHP Magazine:
What Is Your Top Consideration for Choosing a CMS? (Poll)
July 13, 2006 @ 11:43:10

The International PHP Magazine has conducted a poll over on their website, asking visitors what their top considerations were for choosing and working with a CMS. They've posted the results of that poll today.

The options provided for the poll were:

  • How is it licensed?
  • What is the language/environment?
  • How long has it been around?
  • Is it actively developed?
  • Who is using it?
  • Is there support?

The results show an overpowering victory for the "actively developed" category, with the licensing and language requirements tying for second place. The option the least number of people cared about? Who was using it...

0 comments voice your opinion now!
poll top consideration using cms license language active support poll top consideration using cms license language active support


PHPit.net:
Using globals in PHP
June 27, 2006 @ 14:53:34

In this new tutorial from PHPit.net today, Dennis Pallett talks about using globals in PHP, desscribing what they are and how to use them.

Whenever you're developing a new large-scale PHP script, you're bound to use global variables, since some data needs to be used by multiple parts of your script. Good examples of global data are script settings, database connections, user credentials and more. There are many ways of making this data global, but the most commonly used way is to use the global keyword, which we will explore later on in this article.

It's good that he mentions right from the start that most global data is a bad idea, and can really start to clutter up an application. He does help the reader prevent this, though, through the use of a few handy techniques (and design patterns).

He looks first at the "global" keyword and its use, followed by three reasons that it's not all that favorable to use. He gives other options for the "just make it global" thinking, including passing the values in function calls, passing by reference, and using the Singleton and Registry patterns to contain things a bit more. He even includes a wrapper for the registry to handle the only other globals left - the superglobals - with the same registry functionality.

0 comments voice your opinion now!
globals using tutorial singleton registry reference argument globals using tutorial singleton registry reference argument


PHPBuilder.com:
Using XML, Part 5 - SOAP and WSDL
June 07, 2006 @ 13:00:32

PHPBuilder.com has posted the next part of their "Using XML" series - this time with a focus on SOAP and WSDL.

In the previous article in this series I demonstrated how XML is used to make remote procedure calls with XML-RPC in PHP. This article will focus on SOAP and WSDL (both of which use XML as their underlaying method of describing data) and demonstrate how a PHP script can act as a SOAP client and auto-magically discover detailed information about a web service.

They start with an overview of what SOAP is and how a simple SOAP message is structured. They also expand on that one step further with an example of a remote procedure call in a SOAP message.

Since the foundations are in place, they zip right along to the use of SOAP in your PHP 5 installation (one of the easiest methods). They help you create the SOAP client, generate the PHP code automatically from the remote WSDL, and utilize a proxy class to handle the connection.

With these scripts, they provide two examples of how to put them to work - one requests books on the topics of "php5" and "oop" from Amazon's web service and the other works with Google's API to "race" the results of certain search terms.

0 comments voice your opinion now!
using xml tutorial php5 soap wsdl amazon google using xml tutorial php5 soap wsdl amazon google



Community Events





Don't see your event here?
Let us know!


install api release opinion symfony list laravel interview update podcast framework package zendserver language community deployment introduction tips series library

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework