Who is an Ideal PHP Developer?

 The frequent changes in the choices and demands of users have made web application development process both complex and complicated. Most companies, nowadays, look for innovative ways to design websites that can attract, impress and captivate the visitors. As a server side scripting language, PHP is hugely popular among developers to provide a distinct look and feel to a variety of websites.
php development company planning to hire a PHP web developer can easily receive CVs from a large number of jobseekers. But each organization finds it a daunting challenge to find an ideal PHP developer. When you are looking for a professional PHP developer, the applicant is surely expected to be theoretically and practically sound in PHP development. Also, he must understand the key features of different versions of PHP, and be able to differentiate between PHP 4 and PHP 5.
However, most of the websites, nowadays, are being designed using multiple languages. So a professional, who has minimum knowledge on other languages, can easily integrate the codes in PHP. For instance, if the PHP developer knows HTML, CSS and Flash, he can optimize the look and feel of all web applications. At the same time, he must possess some additional qualities that make the PHP developer ideal and more efficient.
5 Important Qualities of an Ideal PHP Web Developer
  • Good Understanding of Object Oriented Programming: A developer with good understanding of Object Oriented Programming (OOP) can learn and use other programming languages without putting any extra time and effort. So you must ask certain OOP-related questions to the applicant to test his understanding. For instance, you can ask several questions to the applicant to check his knowledge on important concepts like inheritance, polymorphism, constructors and interfaces. Also, he must be able to clearly differentiate between private, public, protected and static methods and functions.
  • Knowledge of Major Databases: A successful web application must be effective in gathering and synchronizing information from several data sources. Also, the choice of databases varies from one organization to another based on the nature and volume of their data. So an ideal PHP developer must have knowledge regarding both SQL and non-SQL databases. Along with a clear understanding of primary and foreign keys, he also needs to know the database design patterns. It is also important for the developer to at least know one commonly used source control system, along with the importance of CVS.
  • Must Know Various Aspects of Web Application Testing: Most companies, nowadays, opt for test driven web application design to save time and resources. So you must hire a PHP developer who has a clear understanding of important web application testing concepts and techniques. The professional also need to know what unit testing is, why unit testing is important, how to unit test JavaScript, and how to use Selenium to check the compatibility of the application with major web browsers. You should also determine if he knows appendChild, removeChild, nextSibling, and other methods to manipulate DOM. The additional web application testing knowledge will further contribute towards controlling the overall project cost.
  • Interested in Learning Latest Technologies: Despite being a powerful language PHP cannot be used exclusively to build an entire website. Most web application interfaces are designed using HTML and CSS. Similarly, many web pages used client side scripting languages like DOM Programming and JavaScript to reduce the load on web server. Also, most web applications are designed using open source scripts and templates. Often the open source codes are integrated with PHP script to customize the websites. So an ideal PHP developer must know these languages and technologies, in addition to possessing good PHP programming skills.
  • Ability to Connect with Other Professionals: Often companies want to impress their customers by offering innovative and distinct features. So the PHP developer has to face constant challenges to boost the look and feel of various web applications. If the develop is good in communication with other developers, he can easily avail their assistance whenever the need arises. The good communication skill will further make it easier for you to handle clients and other stakeholders in the project. Also, the developer will work as part of a team consisting of other developers and project managers. If he can communicate with other professionals smoothly, it will optimize the overall productivity of your web application development team.

via web-development-services-blog.

Custom Pagination for CI

I have tried Codeigniter pagination for some grid but its bump. So I decide to write own pagination for Codeigniter you can also use it for Core PHP with some alteration. So here is the code:

* @param
* total = number of records
* diff = number of records per page to display
* base_url = url of the page where record is being display
* page = current page displaying
public function pagination($total, $diff, $base_url,$page) {
$output = '

$output .= '
Display ';
$output .= form_dropdown('diff', array(15, 30, 45, 60));
$output .= 'Replies';
$output .= '
$output .= '';
$output .= '
$output .= '

$output .= 'Previous
//generate pagination for specific page
$i = ($page>0 && $page<5)?0:$page-5;
$j = 0;
$total_page = ($page<$total && ($page5))?'...':'';
$page = ($page>0 && $page<5)?0:$page-5;
for (; $i <= $total; $i+=$diff) { $j++; $page++; if ($page >= $total/$diff){
if ($j < 10) { // generate pagination with sorting through field is on if ($this->CI->input->get('field') != "")
$total_page .= ' ' . $page . ' ';
//generate simple pagination link
$total_page .= ' ' . $page . ' ';
$total_page .= '...';
$output .= $total_page;
$output .= '


return $output;

Hope this will help, Happy coding.

The Soon to be PHP Boom

You can almost feel it in the air. You can almost sense that PHP hasn’t even come close to hitting it’s peak in the world. Jobs man, I’m talkin jobs. I remember 3 years ago getting my daily emails from monster.com on PHP positions open in my area and maybe I was lucky to see one every couple of weeks. Fast forward to today and there are no less than 5-10 per day! I mentioned this on the PHP podcast interview I did last with with Marcus and I noted how this quick explosion in PHP positions could be troublesome if trained coders aren’t there.

Yahoo, McAfee, Panasonic… all big time players looking for skilled PHP workers. All looking for on-site PHP workers. It’s really great to see PHP take off like this and if you caught the wave just right you’re doing quite well in this job market. However, I know from having to hire PHP developers that in most cases the skill levels just aren’t there yet. So for you up and coming PHP’ers here are some tips from someone who has interviewed quite a few PHP developers on what can set you apart from the pack. While these tips won’t automatically get you hired, they will definately help you rise above.

1. get your Zend Certification – becoming a ZCE gives you an immediate boost over non certified engineers, studying for it will bring your back to the nitty gritty bits of the language itself.

2. contribute to an open source PHP project or have a project – this shows you have a general interest in programming and you’re passionate about what you do. It also helps show you can work on team projects.

3. know what you’ve abstracted! – This is a biggie for us all. Almost everyone gives some sort of PHP test these days and alot of questions are basic questions that we’ve written wrapper functions for long ago. So if you’re interviewing for a postion make sure you know how you could work a database without an abstraction layer behind you, open files, all those little tasks you forgot the syntax for 🙂

4. get on google – If I search for your name and don’t find anything it makes me worried. Why a web programmer would be invisible on google? Having alot of hits relating to PHP with your name attached is a big big plus. Show’s your know how to get to the community, get answers, help give answers and a general good feel for the PHP world.

5. interviews, major php contributions, etc – Shows people value your opinion on PHP and so should I. Offer to write for some of the PHP magazines or PHP websites out there.

It may not be possible to do all of those things but any combo of those items will really help your resume stand out from the crowd.
good luck

From: Jim’s Programming Paradise

New Release PHP 5.4.0

New PHP Version 5.4.0 is planned to be released on February, 2 2012. It is a result of many months of development.

In the PHP Version 5.4.0 many features included. Some features are listed below.

  • Traits
  • Built-in Web server
  • Binary notation for integer values
  • Array short syntax
  • Annotations


PHP does not support multiple inheritance. This means that unlike languages such as C++, it is not possible to create one class by inheriting the behavior of multiple other classes.

However, PHP implements the support to have classes with multiple interfaces since version 5. This is a simple approach inspired in Java that avoids the ambiguity problems of C++ multiple inheritance implementation.

The problem of using either multiple inheritance or multiple interfaces is that it becomes easy for creating bloated classes that have much more inherited functions than they may really need in practice.

Traits provide a simpler alternative. You can define a trait practically the same way you define a class or an interface with whatever functions you need. Then you use them in a new class you want to have those functions.

Here is an example taken from the original proposal RFC document:


  trait ezcReflectionReturnInfo {
    function getReturnType() { /*1*/ }
    function getReturnDescription() { /*2*/ }

  class ezcReflectionMethod extends ReflectionMethod {
    use ezcReflectionReturnInfo;
    /* ... */

  class ezcReflectionFunction extends ReflectionFunction {
    use ezcReflectionReturnInfo;
    /* ... */


Built-in Web server

Although Apache has been losing popularity in the latest years for more efficient Web servers in use in production environments, it is still very popular among PHP developers that use it to test their applications in their development environments.

However, Apache is still too cumbersome and complicated to configure, especially when you just want to set it up for a simple development environment. Therefore, PHP 5.4 introduces a Web server that comes built in the PHP command line version.

This means that you only need to execute a simple PHP command and you have Web server running ready for you to test your applications without depending on setting Apache or any other external Web server.

Another interesting purpose of this built-in Web server is that you can develop browser based applications that run in the local machine and you only need the base PHP installation for that.

Here is an example command of how to run PHP to work as a Web server.

$ php -S localhost:8000

 Server is listening on localhost:8000... Press CTRL-C to quit.
 [Thu Mar  3 05:42:06 2011] ::1:56258: /
 [Thu Mar  3 05:42:06 2011] ::1:56259: /?=PHPE9568F34-A769-00AA02
 [Thu Mar  3 05:42:06 2011] ::1:56260: /?=PHPE9568F35-A769-00AA04

Binary notation for integer values

When you need to use literal values in your PHP code you can represent them in decimal, hexadecimal or octal. Now in PHP 5.4 you can also represent them in binary.

In octal you would need to prefix the value with a 0. For instance, 010 represents the number 8, not 10 as some may expect. In hexadecimal you would need to prefix the values with 0x, for instance 0x12 represents the number 18. In binary you need to prefix the number with 0b, for instance 0b101 represents the number 5.

Array short syntax

The popularity of JSON made it a common format for exchanging serialized data between code eventually written on different languages.

One basic difference between JSON and PHP literal value format is that arrays are represented by brackets instead the usual array() construct. Some people proposed to add support for a shorter syntax similar to JSON, but the proposal was not approved by PHP core developers.


Annotations are a form of adding metadata to your code. The metadata information can be used by those tools for instance to produce additional support code, so you do not have to write such code manually. One common use is to generate PHP code or SQL statements to map data between class objects and database tables.

There were several proposals to implement annotations in PHP, very similar to the way they work in other languages like Java and C#. Those proposals ended up not being accepted or fully implemented to make into PHP 5.4.

Still, there are alternative approaches that consist in separate annotation parser tools that extract annotation metadata from PHP comments.