History:
PHP succeeds an older product, named PHP/FI. PHP/FI was created by Rasmus Lerdorf in 1995, initially as a simple set of Perl scripts for tracking accesses to his online resume. He named this set of scripts ‘Personal Home Page Tools’. As more functionality was required, Rasmus wrote a much larger C implementation, which was able to communicate with databases, and enabled users to develop simple dynamic Web applications. Rasmus chose to » release the source code for PHP/FI for everybody to see, so that anybody can use it, as well as fix bugs in it and improve the code.
PHP/FI, which stood for Personal Home Page / Forms Interpreter, included some of the basic functionality of PHP as we know it today. It had Perl-like variables, automatic interpretation of form variables and HTML embedded syntax. The syntax itself was similar to that of Perl, albeit much more limited, simple, and somewhat inconsistent.
By 1997, PHP/FI 2.0, the second write-up of the C implementation, had a cult of several thousand users around the world (estimated), with approximately 50,000 domains reporting as having it installed, accounting for about 1% of the domains on the Internet. While there were several people contributing bits of code to this project, it was still at large a one-man project.
PHP/FI 2.0 was officially released only in November 1997, after spending most of its life in beta releases. It was shortly afterwards succeeded by the first alphas of PHP 3.0.
PHP History |
||
The History of PHPPHP is an “HTML-embedded scripting language” primarily used for dynamic Web applications. The first part of this definition means that PHP code can be interspersed with HTML, making it simple to generate dynamic pieces of Web pages on the fly. As a scripting language, PHP code requires the presence of the PHP processor. PHP code is normally run in plain-text scripts that will only run on PHP-enabled computers (conversely programming languages can create standalone binary executable files, a.k.a. programs). PHP takes most of its syntax from C, Java, and Perl. It is an open source technology and runs on most operating systems and with most Web servers. PHP was written in the C programming language by Rasmus Lerdorf in 1994 for use in monitoring his online resume and related personal information. For this reason, PHP originally stood for “Personal Home Page”. Lerdorf combined PHP with his own Form Interpreter, releasing the combination publicly as PHP/FI (generally referred to as PHP 2.0) on June 8, 1995. Two programmers, Zeev Suraski and Andi Gutmans, rebuilt PHP’s core, releasing the updated result as PHP/FI 2 in 1997. The acronym was formally changed to PHP: HyperText Preprocessor, at this time. (This is an example of a recursive acronym: where the acronym itself is in its own definition.) In 1998, PHP 3 was released, which was the first widely used version. PHP 4 was released in May 2000, with a new core, known as the Zend Engine 1.0. PHP 4 featured improved speed and reliability over PHP 3. In terms of features, PHP 4 added references, the Boolean type, COM support on Windows, output buffering, many new array functions, expanded object-oriented programming, inclusion of the PCRE library, and more. Maintenance releases of PHP 4 are still available, primarily for security updates.
and much, much more.
|
||
The need for PHP code refactoring
Refactoring is changing of complex and complicated programming codes into simple and confusion-less ones, thereby restructuring the complete set of codes into easily readable formats, without any change in the output or functionality. Refactoring does not include fixing of glitches or including of new functionalities or practices to the existing set of codes. It only assists in reducing the complex form of coding into easily understandable and less time consuming forms that is universally accepted by all.
PHP Can DO:
- Web Graphic Design
- Web Databases
- Web Marketing
- Web Programming
- Web development – Outsourcing
- Web Development – Best Practices
- Web Site Design
- Website development
- Web Technology and trends
- Web development – Customer relationship management (0)
- Java Development
There seem to be lots and lots of PHP folks out there looking to hire good PHP developers. Finding the right developer can be a challenge, as can finding the right job.
I’ve been looking for a couple weeks now, and I wanted to put together a short blurb on why you should consider hiring me to be on your PHP development team.
I’m a self-taught PHP developer with five years of experience. That means two things: first, I’m curious by nature. Second, I’ve worked hard to get where I am. I’ve seen just about everything you can encounter, from basic database applications to complex web applications. I’m proficient in object-oriented programming, I’ve toyed with things like Phing, Propel, Zend Framework, Drupal, WordPress, Symfony and others.
As a freelancer I’ve gained valuable time management and team management skills – I managed a small team of two developers on two freelance projects that were large enough to require additional teams. I’ve also learned a good deal about business – a skill that you sometimes might want married with a PHP developer.
But beyond my resume there are some soft skills you should consider: I’m motivated to learn more. I taught myself PHP which means I’m capable of teaching myself other languages. I’m a well-known writer on PHP topics (15,000 unique visitors to this blog this month) who will be published in the near future. I’m extremely active in the PHP community, serving as a leader of the local DC PHP developer’s group. I’m well connected to those who are developing the tools we use, and I’m focused on making the open source world a better place to be.
General PHP Coding:
Programming using PHP becomes very effective and powerful, when code-refactoring techniques are included while coding. It is possible that for a same task to be performed, various methods can be utilized in order to attain the final result. But the best among all the methods, with simple coding style, easy execution and less time consumption, is achieved through refactoring. This brings the code to a format that is acceptable and understandable by any programmer, from any part of the globe.
To the best of our knowledge, the first article about PHP in a hard-copy magazine was published in the Czech mutation of Computerworld in the spring of 1998, and covered PHP 3.0. As with books, this was the first in a series of many articles published about PHP in various prominent magazines.
Articles about PHP appeared in Dr. Dobbs, Linux Enterprise, Linux Magazine and many more. Articles about migrating ASP-based applications to PHP under Windows even appear on Microsoft‘s very own MSDN!
PHP Smarty Functions
Smarty supports its own functions, called smarty template functions.
Using Smarty PHP Functions
To call a Smarty function, place the function name within the Smarty tags:
{function_name}
Smarty has both built-in and custom functions. Many of the built-in functions provide logical structures, like conditionals and loops
.
Function Attributes
To pass values to the function when calling it, follow the function name with name=”value” pairs:
{function_name name1="some value" name2="some other value"}
If the value of an attribute should be a variable, do not quote it:
{function_name name1=$var name2="some other value"}
As with PHP, variables can be put within double quotation marks:
{include file="$filename.tpl"}
Single quotes in that example would not work.
Including Other Files
Smarty supports the ability to include templates within templates. Most commonly this would be used when a site has standard header, footer, navigation, and other elements. The “include” function can include another template within the current template. It’s first argument is the name of the file to be included:
{include file='filename.tpl'}
By passing the include function an attribute matching a variable within the included template, you can pass variables:
{include file='filename.tpl' var_name='some value'}
{* filename.tpl *}
Something: $var_name
Similar to “include” is “insert”, which creates a non-cached section of a template. This is discussed on the Smarty Caching page.
