MC Press Online
Welcome to the MC Press Online!
Need help withour eBooks?
Click here, to go to our main store

  MC Press Online eBookStore  

IBM i Programmer's Guide to PHP, The
preview of book IBM i Programmer's Guide to PHP, The
text of book IBM i Programmer's Guide to PHP, The

IBM i Programmer's Guide to PHP, The

Publisher: MC Press Online
Publication Date: May 2009
Subject: Computer: Programming & Software Engineering
Category: Programming
Number of Pages: 378

Free Preview    Email to Friend   Add to wish list
 Available as: (for format`s description click on its name)
Individual E-Version (PDF) Individual E-Version (PDF) ISBN: 9781583470831  
 Reg.: $
79.95 per N pages
 You Save: 
$18.78 (23%)
 Online  Open CopyPrint    
all time
Printed Edition   see MC Press Online    
About this title
This is the first book to comprehensively address PHP and how it canand shouldbe deployed on IBM i. With this IBM i-specific point of view, the authors examine how to transfer skills from a green-screen environment to the Web, become intimately familiar with PHP's commonly used features, and help start down the road of highly interactive Web-based application development.

For decades, the green screen has been the ubiquitous interface into an organization's data. But with the advent of HTML, the Internet, and the browser, combined with the end user's existing familiarity with the Web, green-screen developers are seeing much of the demand for their skills diminish in favor of more Web-enabled technologies. One of those technologies is the PHP programming language.

A flexible, forgiving programming style makes PHP easier to learn and is just one of the many reasons PHP tops the list when developers seek to improve their Web-related skills. While not limited to Web development, PHP is designed from the ground up to be the ideal environment to easily build simple or complex Web-based applications in the most effective manner possible, while still giving programmers the control they need.

With The IBM i Programmer's Guide to PHP, you will learn to:
  • Build basic PHP applications and how to structure them
  • Access local and remote resources, as well as external data sources
  • Manage persistence between requests and the life of an individual request from browser to server to browser
  • Tap System i DB2 database tables from PHP
  • Install and access MySQL databases on the System i
About authors
Jeff Olen
Jeff Olen is co-founder of Olen Business Consulting, a provider of custom System i software solutions. Jeff has more than 20 years of experience with IBM midrange systems, including all the incarnations of the System i. His company has developed PHP applications on the System i for a wide variety of companies and continues to assist companies in switching to PHP. Jeff has extensive development experience using a wide variety of programming languages.

Kevin Schroeder
Kevin Schroeder has a memory TTL of 10 years, and so he has been working with PHP for longer than he can remember. This is his third book on PHP, preceded by The IBM i Programmer's Guide to PHP (MC Press, 2009) and You Want to Do WHAT with PHP? (MC Press, 2010). Kevin is a member of the Zend Certification Advisory Board and is a Magento Certified Developer Plus. He has spoken at numerous conferences, including ZendCon, where he was twice the MC.

When his head isn't in code (if code is poetry, then it is Vogon poetry), Kevin is writing music, having been a guitarist since hair bands were cool (and having survived their welcomed demise). He has recorded two albums, Coronal Loop Safari and Loudness Wars.

Kevin's wisdom is dispensed to his loyal followers on Twitter as @kpschrade and on his blog at, where he speaks in the first person.


Chapter 1: Getting Started
Static vs. Dynamic Content
Client-side vs. Server-side
What You'll Need
Testing Your Zend Core Install
PHP Syntax
   Variable Names
   Data Types
   Single Quotes vs. Double Quotes
   Escape Sequences
   Odds and Ends
Your First PHP Script
About the Code Examples and Output
Exam and Exercise

Chapter 2: Language Basics
Language Elements and Syntax
Basic Language Components
   Assignment Operator
   Basic Math Operators
   Increment and Decrement Operators
   Concatenation Operator
   Comparison Operators
   Logical Operators
   Ternary Operator
   Operator Precedence
Variable Scope
Reference Operator
Including Source Files
Exam and Exercise

Chapter 3: Control Structures and Loops
Conditional Structures
   The if Statement
   The switch Statement
   The for Loop
   The while Loop
   The do-while Loop
   Modifying Loop Iteration
Exam and Exercise

Chapter 4: Arrays
Creating Arrays
   Appending Data to an Array
   Iterating Through Array Values
Associative Arrays
Multidimensional Arrays
Sorting Arrays
Other Array Functions
Merging Arrays
Exam and Exercise

Chapter 5: Functions
Internal Functions
User-Defined Functions
   Optional Parameters
   Passing by Reference
Variable Scope
Variable Functions
Function Functions
Exam and Exercise

Chapter 6: Files and Streams
Basic File Handling
The f Functions
The fi le Functions
Handling Directories
Common PHP Functions
The Underlying Wrappers
   Filesystem Wrapper
   HTTP/HTTPS Wrapper
   FTP/FTPS Wrapper
   Input/Output Stream Wrapper
   Compression Streams
   Data Wrapper
   SSH2 Wrapper
   Additional Wrappers
Exam and Exercise

Chapter 7: Classes
Introduction to OO
Moving On
Abstract Classes
The Three Ps
More Magic Methods
   __sleep() and __wakeup()
   __set(), __get(), __isset(),__unset(), and __call()
The OOP Callback
Exam and Exercise

Chapter 8: Database Access
Installation and Setup
   Installing MySQL
   Starting MySQL Server
   MySQL Setup
Accessing MySQL Tables
   Databases and Tables vs. Libraries and Files
   SQL Query Results (Recordsets)
   MySQL Functions
   Creating MySQL Databases and Tables
   Data Access Objects and Value Objects
IBM_DB2 File Access
   DB2 Functions
   Creating DB2 Databases and Tables
   Data Access Objects and Value Objects on the System i
PHP Data Objects
Exam and Exercise

Chapter 9: Sessions and Cookies
   Baking Cookies
   Cookie Security
   Session Save Handler Extensions
   Session Security
Exam and Exercise

Chapter 10: Zend Core for i5/OS
Program Calls from and to PHP
The Zend Toolkit Classes
RPG Programs for the Examples
   System i Program Call Example
   System i Service Program Function Call Example
   Values RETURNed from Procedures
   Using Program Call Markup Language (PCML)
Calling a PHP Script from RPG or CL
Record-Level File Access
   Sequential File Access
   Indexed File Access
   Accessing a File by Record Number
   Adding and Updating Records
Using System i Commands

Appendix A: Zend Studio for i5/OS
i5 Integration
Zend Framework Integration
Zend Debugger and Profi ler
Zend Platform Integration

Appendix B: Frameworks
Overview of the Frameworks
   Cake PHP
   Zend Framework
"At long last, here is the perfect book to recommend to anyone who is considering adopting PHP for IBM i development."
— Mike Pavlak, Solutions Consultant, Zend Technologies, Inc.

Related titles
Active Server Pages PrimerActive Server Pages Primer
Advanced Guide to PHP on IBM iAdvanced Guide to PHP on IBM i
Eclipse: Step by StepEclipse: Step by Step
Enterprise Web 2.0 with EGLEnterprise Web 2.0 with EGL
Flexible Input, Dazzling Output with IBM iFlexible Input, Dazzling Output with IBM i
Java for RPG ProgrammersJava for RPG Programmers
JavaScript for the Business DeveloperJavaScript for the Business Developer
Qshell for iSeriesQshell for iSeries
Remote System Explorer, TheRemote System Explorer, The
You Want to Do What with PHP?You Want to Do What with PHP?
  Special Offer Code  
Enter your Special Offer Code here:
  Search for  

  Our Products  
Browse all »»
From Idea to Print, Chapter 07: Staying Out of Trouble
DB2 10 for z/OS Database Administration (Exam 612), Chapter 04: Database Objects
Selling Information Governance to the Business

If download option is selected, Adobe Acrobat 5.0 or lateris requiredto read our e-books*

*Windows PC, Mac OS9/OSX, and Linux