One of the great advantages of an IDE over a text editor is the ability to easily run a debugger. In this lesson you'll learn how to configure PhpStorm to use XDebug. We'll walk through getting XDebug set up, and then how to debug, including setting breakpoints.
Note: From the menu bar, PhpStorm > Preferences > PHP > Debug will apply settings to the current project as described in the video.
Additional resources
Please note that this series covers PhpStorm versions 6 and 7 only.
For the latest documentation (including up-to-date videos), see JetBrains documentation.
Once you have a debugger (like XDebug) set up on your system, you can use PhpStorm to run a web application and attach and detach the debugger at will. This tutorial will walk you through how to work with the debugger using the toolbar and bookmarklets.
Additional resources
Please note that this series covers PhpStorm versions 6 and 7 only.
For the latest documentation (including up-to-date videos), see JetBrains documentation.
PhpStorm also provides tools for debugging your JavaScript using a Chrome or Firefox extension with the IDE. This lesson shows how to set your breakpoints and walks you through the client-side debug process.
Additional resources
Please note that this series covers PhpStorm versions 6 and 7 only.
For the latest documentation (including up-to-date videos), see JetBrains documentation.
Profiling allows you to gather program execution statistics, like the number of functions, or how long a function takes to run. In this tutorial we walk through profiling with XDebug in PhpStorm.
Additional resources
Please note that this series covers PhpStorm versions 6 and 7 only.
For the latest documentation (including up-to-date videos), see JetBrains documentation.
Vagrant is a tool to create virtual machines that you can even share with others. In this tutorial you will learn how to create a new project that uses a Vagrant box and how mange it through PhpStorm. To learn more about Vagrant and how to set it up, watch the Introduction to Vagrant series.
Additional resources
Introduction to Vagrant series
Please note that this series covers PhpStorm versions 6 and 7 only.
For the latest documentation (including up-to-date videos), see JetBrains documentation.
When working with REST in your code, you can use PhpStorm's built-in REST Client to help you track and test your API code.
Additional resources
Please note that this series covers PhpStorm versions 6 and 7 only.
For the latest documentation (including up-to-date videos), see JetBrains documentation.
PhpStorm Plugins
FreeYou can extend PhpStorm's functionality with plugins. Adding plugins that enable vim integration, tools for working in NodeJS projects, or plugins that enable code completion and syntax highlighting for specific languages is as simple as searching for the package and clicking an install button. In this tutorial, you will review the plugins that already comes bundled with PhpStorm, as well as how to find and add new plugins for new features.
Additional resources
PhpStorm Plugin Library
Please note that this series covers PhpStorm versions 6 and 7 only.
For the latest documentation (including up-to-date videos), see JetBrains documentation.
In this PHP tutorial, you'll get the project files up and running and learn all about class constants in object-oriented PHP.
If you're serious about getting really good at this stuff, code along with me. To do that, download the source code from this page, unzip it, and move into the start directory. When you do that, you'll have the same code that I have here. Open up the README file and follow the instructions inside to get things setup.
When that's done, open your favorite terminal application, move into the directory, and — like we've done in the previous courses — start the built-in php web server by running:
php -S localhost:8000
This is a great server to use for development. Then, in our browser, we can go to http://localhost:8000. Here is our beautiful Battles app!
Additional resources
Introduction to Object-Oriented PHP (Drupalize.Me)
Object-Oriented PHP Part 2 (Drupalize.Me)
Object-Oriented PHP Part 3 (Drupalize.Me)
In this PHP tutorial, you'll be introduced to static methods, the self
keyword and how they are used.
Additional resources
Object-Oriented PHP (topic) (Drupalize.Me)
In this PHP tutorial, we'll continue learning about static methods and when to use static vs. non-static methods.
In this PHP tutorial, you'll learn about namespaces and the use
statement in PHP.
In this PHP tutorial, learn about what an autoloader is and how you can use it to replace require
statements in your PHP applications.
In this PHP tutorial, learn how the use
statement works with the autoloader to replace the require
statements that we removed in a previous lesson.
In this PHP tutorial we'll continue our look at namespaces and how they work in PHP applications.
In this tutorial, learn about how to set up your app to use Composer Autoloading.
In this PHP tutorial we'll introduce Exceptions in PHP.
In this PHP tutorial, you'll learn about the different exception classes that are available to you use in your PHP applications.
In this tutorial, learn about PHP's built-in magic methods: __toString()
, __get()
, and __set()
.
In this tutorial, learn how to use PHP's built-in interface ArrayAccess
and when you might want to use it.
Additional resources
In this tutorial, learn how to implement PHP's built-in interface IteratorAggregate
to loop over an object.