andPHP.com

The faster way to learning PHP.

Orlando PHP User Group

Finally, there is a PHP User Group for Orlando. We will be meeting April 22nd for our first meeting. If you are in the Orlando area please be sure to visit. The first meeting will be dedicated to the different frameworks available to PHP. For more information, go to orlandophp.org.

Namespaces have been around for quite a while in Object Oriented programming with languages such Java. Basically, for those of you who have not used them, it means that you can create a context or package for a set of variables, functions and classes to prevent same named objects from different packages to conflict.

<?php
/* PHP Namespace sample */
namespace Project::Sample;

class Foo {
  function bar () {
    echo "Test namespace function";
  }
}

// since Project::Sample is the current namespace
$foo = new Foo();

// or using the full namespace
$foo = new Project::Sample::Foo();

// or using the use keyword
use Project::Sample as Sample

$foo = new Sample::Foo();

$foo->bar(); // Prints: Test namespace function
?>

Read the rest of this entry »

Joe Lencioni over at Shifting Pixel, has written a post about the easy to use image resizing script. It’s a really simple script that you use by specifying the parameters in the src part of the img tag.

The major advantage of this script is that it allows me to resize and crop any image on my website without touching the actual image or writing any code.

Try the script yourself, and if you can improve on it let him know by leaving him a comment.
A ridiculously easy-to-use PHP script for resizing images the smart way.

Hasin Hayder from Developer Tutorials wrote this neat post about using debug_backtrace. It could help you debug your code more efficiently and save you hours of dumping variables and testing functions, not to mention saving you from pulling your hair out. I myself used it a couple of times when writing class files and such, it helps you read the code a little better too. Go ahead and check out his post and leave a comment.

Debugging PHP code using debug_backtrace

What better way to connect and share with others about your experiences in web development, than a community event that includes:

  • Programming
  • Geeks
  • Robots
  • More Programming
  • Even More Robots
  • Podcasting
  • RSS Feeds
  • Photoshop
  • Whiskey (not free)
  • and More!

Well, for those of us that live in and near Orlando, FL this event is called BarCampOrlando.

BarCampOrlando

It will take place Downtown Orlando on April 5th - 6th at the Wall Street Plaza. Registration is FREE, but it is highly recommended that you give a demo, a session or help with one at the event. Both Jamal and myself will be attending both days and look forward to seeing more of you there.

http://www.barcamporlando.org/

The php|arhcitect C7Y Community is hosting a PHP contest. The task is to create a link scanner.

Given an arbitrary (but valid) HTML file, retrieve all the links that would be displayed as hyper links and display them sequentially, having removed any duplicates. You may use any built in function, the phpinfo() of the server used for testing will be attached. You just need to retrieve the links, you don’t need to worry about them being relative or absolute.

Head on to the contest topic at the c7y forums for more details.

Linux Only (sort of): I once was a fan of heavy development environments such as Eclipse or Zend Studio, but not anymore. Don’t get me wrong. They are very powerful, but in a way too powerful, or rather, too heavy. PHP is a scripting language, likewise, a PHP editor should be fast and easy to get on and start writing. With a few plugins and modifications you can get gedit to be both a powerful and beautiful editor for PHP, and other languages. This guide will help you to get gedit to resemble something like Textmate for Mac. (This will only work with gedit 2.20+)

Gedit as a PHP editor

Read the rest of this entry »

Every web developer, no matter what language you use should know the workings of a version control system. The one I most often use when working on projects is Subversion, aka SVN. SVN not only helps me keep my code organized, it also allows for others that are working with me to know of changes I have made to the source and vise versa. This allows multiple developers to work on the same source, fixing different bugs, simultaneously.

During my encounters with SVN I have tested many different uses and techniques to keep the development, staging, and stable environments separate but parallel to each other. I worked out my own ways of using SVN, which I will leave for another post. I can however say that Dan Previte’s post at null-logic [Using Subversion for Web Development] brings out some interesting points on how to use SVN for Web Development, and I agree with his method of using Subversion. One of the things I would like to enforce is the use of a testing checklist that needs to be executed on the staging environment, and hopefully the person doing this is not used to the source code. It is always good to have someone who is not necessarily involved in the development process doing the testing of the product.

You can also check out the SVN book which can be found here and is free.

The people over at Six Revisions have came up with a cool and practical list of 9 uses for Firefox’s Web Developer Extension. I myself use it almost everytime while working on a project, most of the things I use it for are on this list, and I found a few new things like the auto form populate.  Face it, no one likes to fill forms over and over again when testing them. Go ahead and check out their post here