Tag Archives: Programming
PHP 5 Power Programming – Free Ebook

PHP 5 Power Programming – Free Ebook

Posted 12 January 2010 | By vinu | Categories: PHP | Comments

Here’s a free PHP Ebook from Bruce Perens’ Open Source Series. More about this book:

In this book, PHP 5’s co-creator and two leading PHP developers show you how to make the most of PHP 5’s industrial-strength enhancements in any project—no matter how large or complex. Their unique insights and realistic examples illuminate PHP 5’s new object model, powerful design patterns, improved XML Web services support, and much more. Whether you’re creating web applications, extensions, packages, or shell scripts—or migrating PHP 4 code—here are high-powered solutions you won’t find anywhere else.

Review PHP’s syntax and master its object-oriented capabilities—from properties and methods to polymorphism, interfaces, and reflection

  • Master the four most important design patterns for PHP development
  • Write powerful web applications: handle input, cookies, session extension, and more
  • Integrate with MySQL, SQLite, and other database engines
  • Provide efficient error handling that’s transparent to your users
  • Leverage PHP 5’s improved XML support—including parsing, XSLT conversions, and more
  • Build XML-based web services with XML-RPC and SOAP
  • Make the most of PEAR: work with the repository, use key packages, and create your own
  • Upgrade PHP 4 code to PHP 5—compatibility issues, techniques, and practical workarounds
  • Improve script performance: tips and tools for PHP optimization
  • Use PHP extensions to handle files/streams, regular expressions, dates/times, and graphics
  • Create original extensions and shell scripts

If you’re a software developer new to PHP, you’ll leap quickly into PHP and its new object-oriented capabilities. If you’re an experienced PHP programmer, you already recognize PHP’s convenience and simplicity. Now, discover all of its extraordinary power!

Free Ebook download: Download PHP 5 Power Programming (PDF)
If you like this book and would like to order the Print book, check out Amazon’s deals on PHP 5 Power Programming.

Practical PHP Testing – Free Ebook

Practical PHP Testing – Free Ebook

Posted 04 January 2010 | By vinu | Categories: PHP | Comments

If you’re new to testing in PHP, and were wondering how to create and run automated tests, here’s an ebook which will help you get the basics right.

Practical PHP Testing is an ebook which is a compilation of  articles from Giorgio Sironi’s blog on Practical PHP testing.

This book takes you though the basics of PHPUnit – how to install it and start writing simple tests using PHP Unit. Here are some of what this ebook covers:

  • bonus chapter on TDD theory;
  • a case study on testing a php function;
  • working code samples, some of whom were originally kept on pastebin.com;
  • sets of TDD exercises at the end of each chapter;
  • glossary that substitutes external links to wiki and other posts, to not interrupt your reading with terms lookup.

More information and download link is available here.

Reblog this post [with Zemanta]

Upcoming Zend Webinars in August

Posted 22 July 2008 | By vinu | Categories: PHP | Comments
PHP

Here are some interesting Zend Webinars coming up in August:

Aug 13th, 9am PST
What’s New in Zend Framework 1.6?
Come join the Zend Framework team for an hour long jaunt through the new features added in Zend Framework 1.6. If you currently develop using Zend Framework then you won’t want to miss this one.

Aug 20th, 9am PST
Continuous Integration with PHPUnderControl Part 1
PHP Under Control is a Continuous Integration system that hooks in with PHPUnit and SVN. In this first part PHP expert Jesse Lesperance will discuss its features and advantages of Continuous Integration.

Aug 27th, 9am PST
Continuous Integration with PHPUnderControl Part 2
PHP Under Control is a Continuous Integration system that hooks in with PHPUnit and SVN. In this part PHP expert Jesse Lesperance will be creating Unit Tests with Studio for Eclipse and then running them in PHPUnderControl.

Sep. 3rd, 9am PST
Zend Framework and Dojo Integration
This past spring, the Zend Framework team announced a partnership with Dojo toolkit to provide out-of-the-box support for Rich Internet Applications.

via: devzone.zend.com

Zemanta Pixie
mbstring Functions by default in PHP

mbstring Functions by default in PHP

Posted 18 July 2008 | By vinu | Categories: PHP | Comments
Complete set of printable ASCII characters. Th...Image via Wikipedia

When dealing with multiple languages and internalization in PHP, some of the default functions in PHP end up mangling up the unicode characters in PHP. This is evident when you have a lot of funny looking characters coming up on your web page instead of the actual characters. Apart from setting the UTF-8 headers in your HTML page, you should be careful on which functions you use to handle your strings. There is an extensions called mbstring which you can install in PHP which gives you a set of functions which are unicode ( actually multibyte ) ready.

ASCII characters store each character in one byte. Unicode characters like UTF-8 use multiple bytes to handle the wider range of character sets. Some of the built in functions in PHP assume each character is only one byte and ends up breaking multibyte characters due to this assumtion.

One way to ensure that your content doesn’t get mangled up is to substitue the regular php functions in your code with the mbstring variety. To get the entire list of mbstring functions, head over to: http://php.net/manual/en/ref.mbstring.php

A few examples of the function mapping are:

EMail Function : Instead of using mail, you could use the mbstring function mb_send_mail
String Functions: strtoupper becomes mb_strtoupper; strlen becomes mb_strlen, substr becomes mb_substr and so on…

Now instead of going in and changing all your code to become multibyte ready, PHP gives you an easy way to overload the default functions with the mbstring variety.

You can set a value to mbstring.func_overload in php.ini. The value set for this function decides which functionality is overloaded by default with the mbstring variety:

  • 1 – overloads the mail functions. So you don’t have to substitute mail with mb_send_mail in your code. The mail functuion it self will work like mb_send_mail if mbstring.func_overload is set to 1 in php.ini
  • 2 – enables string functions overloading
  • 4 – enables regular expression functions overloading
  • 7 – enables mail, strings and regular expressions overloading
Zemanta Pixie

Phalanger – PHP Compiler for .Net

Posted 16 June 2008 | By vinu | Categories: PHP | Comments

Phalanger is a new PHP implementation introducing the PHP language into the family of compiled .NET languages. It provides PHP applications an execution environment that is fast and extremely compatible with the vast array of existing PHP code. Phalanger gives web-application developers the ability to benefit from both the ease-of-use and effectiveness of the PHP language and the power and richness of the .NET platform taking profit from the best from both sides.

Phalanger maintains the way how PHP web applications are developed and deployed so that the you can leverage from .NET without having to learn complex ASP.NET style of web development, however Phalanger also allows you to use PHP as a language for writing ASP.NET applications, so you have the freedom to make a choice!

Due to the managed implementation of the PHP functions library, the migration from PHP interpreter to Phalanger is an easy and straightforward process, which includes only configuring the application in most of the situations. The compiled nature of Phalanger applications also leads to major performance boost.

To get an idea on how the interoperability of PHP and C# works, head over to one of the tutorials on their site: Using PHP library from C#

Links:
Download Phlanger
Phlanger Documentation
Tutorials

Zemanta Pixie