Java:
Java has multiple IDEs (Integrated Development Environment), including NetBeans, Eclipse, IntelliJ IDEA, BlueJ, DrJava, JDeveloper, to name a few, which can be used for editing and debugging. At the same time, the packaging is done with tools including Maven, Web Start, Editors and ANT, among others.
PHP:
The PHP Editors includes Atom, Visual Studio Code, Brackets, jEdit, Bluefish and Notepad++, among others. While debugging can be done with print statements, Xdebug, an extension, PHPDebugBar, a plugin, Kint, Whoops, and many more debugging tools. While for packaging, only files are involved, and no packaging concept exists.