Book Image

PHPEclipse: A User Guide

Book Image

PHPEclipse: A User Guide

Overview of this book

The fusion of Eclipse, the leading open source development environment, and PHP is an exciting prospect for web developers. This book makes sure that you are up and running as quickly as possible, ready to take full advantage of PHPEclipse's tuned PHP development tools, without requiring any prior knowledge of Eclipse. You will begin with installing and configuring PHPEclipse, before moving onto a tour of the Eclipse environment, familiarizing you with its main components. As a plug-in to Eclipse, PHPEclipse is able to harness the platform to provide a rich and powerful development experience. For helping you improve the efficiency of your PHP coding, the book details the powerful editing features of PHPEclipse, and shows you how to use it to better organize your application code. You will see how PHPEclipse helps you throughout the development lifecycle, and learn how to use PHPEclipse's debugger to troubleshoot and step through your PHP code as it executes. The book rounds off with coverage of accessing databases and managing source code from within the. For the final step for your application, you will learn how to deploy your site to a production server."
Table of Contents (12 chapters)
11
Index

The Editor

We will be doing all of our code writing in the editor, so it will help to be familiar with how the editor works and the feedback it gives us.

On the surface, the Eclipse editor looks and acts like a standard text editor. Once we start coding, we will see many time-saving features. Among these are the visual clues Eclipse conveys. Eclipse relies on syntax coloring and icons to communicate information on our work. We can quickly process information on problems and navigate around source code.

The Editor

Editor Visual Aids

As you type, the Eclipse editor marks the syntax of your code with certain colors. When you save, Eclipse reviews your code, marks potential pitfalls, and alerts you via icons in the margin.

Editor Visual Aids

The screenshot above shows a typical editor with a few lines of sample code and some problems. Let’s first take a look at the left margin.

Editor Visual Aids

Line 5: Warning The keyword var is deprecated in PHP 5, but will not cause a runtime error. Syntax problems like this that will not cause...