Debugging PHP Web Application using Zend Studio

Zend Studio makes things very simple when it comes to debugging web applications that were developed in PHP. The following code sample include two files.

The first presents a simple form to the user that allows him to enter the width and the height of a specific rectangle.

<form method="get" action="index.php">
width: <input type="text" name="width">
<br>
height: <input type="text" name="height">
<br>
<input type="submit">
</form>

When pressing submit a request is sent to the second PHP document that calculates the area and the perimeter.

<?php
$width = $_GET['width'];
$height = $_GET['height'];
//$width = 7;
//$height = 9;
$area = $width * $height;
$perimeter = 2 * ($width+$height);
echo "<br>area=$area";
echo "<br>perimeter=$perimeter";
?>

The bar shown on the bottom of the web browser allows us to debug both the first page and the second one. The following video clip shows how to use this intutitive debugger.

You can find more code samples and video clips for learning PHP and for learning how to use the Zend Studio in my free online courses at http://abelski.lifemichael.com.

Share:

The Visitor Design Pattern

The Visitor Design Pattern

The visitor design pattern allows us to add operations to objects that already exist without modifying their classes and without extending them.

What are Anti Patterns?

Anti Patterns

Unlike design patterns, anti patterns just seem to be a solution. However, they are not a solution and they cause additional costs.

Virtual Threads in Java Professional Seminar

Virtual Threads in Java

The use of virtual threads can assist us with improving the performance of our code. Learn how to use virtual threads effectively.

NoSQL Databases Courses, Seminars, Consulting, and Development

MongoDB Design Patterns Meetup

The use of MongoDB involves with various cases in which we can overcome performance issues by implementing specific design patterns.

image of woman and database

Record Classes in Java

Learn how to define record classes in Java, and when to use record classes in your code. Stay up to date with the new Java features.

Accessibility | Career | Conferences | Design Patterns | JavaScript | Meetups | PHP | Podcasts | Python | Self Learning

Teaching Methodologies | Fullstack | C++ | C# | CSS | Node.js | Angular | Java | Go | Android | Kotlin | Swift | Academy

Front End Development | Scala | Architectures | Cloud | Big Data | Internet of Things | Kids Learn Programming

The Beauty of Code

Coding is Art! Developing Code That Works is Simple. Develop Code with Style is a Challenge!

Skip to content Update cookies preferences