Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > PHP/MySQL > BOOK: Professional PHP6
Password Reminder
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Professional PHP6
This is the forum to discuss the Wrox book Professional PHP6 by Edward Lecky-Thompson, Steven Nowicki; ISBN: 9780470395097
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional PHP6 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Display Modes
  #1 (permalink)  
Old April 21st, 2012, 03:41 AM
Registered User
Points: 5, Level: 1
Points: 5, Level: 1 Points: 5, Level: 1 Points: 5, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: Apr 2012
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Some Code Errors and Advice

I am a student major Software Engineering in SCNU of China.
I have used PHP for nearly one year and I love it for its simpleness.
But it is the book <<Professional PHP6>> make me know more about PHP.
It is really an usefull book!

And here is some code errors I have found in the book(Chinese Version).

1. CH 8 PAGE: 191
//the code in the book
abstract class Event_Handler


//my code
//according the chart 8-2
abstract class Event_Handler extends Handled


2. CH 9 PAGE: 201
//the code in the book
$strLogLevel = $this->levelToString($logLevel);

//my code
//it's a static function
$strLogLevel = $Logger::levelToString($logLevel);

And here is some personal advice for the some code.

1. CH7 Page: 181

//the code in the book
private function GetAccessor($strMember){
if($this->blIsLoaded != true){
//the rest code....

//my code
private function GetAccessor($strMember){


//the rest code....

//Page 173
public function Load(){
//move the condition here, check whether loaded or not in Load(), to advoid repeat code when call this fun.

//the rest code....

2. CH 11 PAGE: 251
//the code in the book
$this->arRecipientCollection->addItem($objRecipient, $strIdentifier);

//my code
//should check the value is null or not to ensure it has been initialized, even though it will be created in child's __construct()
$this->arRecipientCollection->addItem($objRecipient, $strIdentifier);

3. CH 9 PAGE: 212
//the code in the book

$host = $urlData['host'];
$port = $urlData['port '];
$user = $urlData['user'];
$passwrod= $urlData['passwrod'];
$arPath= explode('/', $urlData['path']);

//my code
//because the urlData should be parsed in the __construct fun
$host = $this->urlData['host'];
$port = $this->urlData['port '];
$user = $this->urlData['user'];
$passwrod= $this->urlData['passwrod'];
$arPath= explode('/', $this->urlData['path']);

PS: I will find others code error at later chapter.

Last edited by chanzonghuang; April 21st, 2012 at 08:55 AM.

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Program Code Errors ed123 Beginning PHP 0 September 8th, 2007 03:53 AM
Need advice to clean up my date manipulation code jasoncompo Beginning VB 6 1 June 2nd, 2006 01:29 PM
Code for review advice, is there a hole? mat41 Classic ASP Professional 0 February 10th, 2006 07:16 AM

All times are GMT -4. The time now is 12:12 PM.

Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.