PHP Notes

I'm not thrilled that I have to create this cheatsheet, but such is life.

Embed HTML in php

echo "<p>Stuff</p>";


Setup Debugger with PHP w/ PHPStorm and XAMPP

Start out by installing phpstorm and xampp.

Follow the process in here:

For the above process, don't forget to install xdebug for the version of php in xampp, and not the OS version:

/Applications/XAMPP/bin/php -v

Make sure you do everything in here:

Be sure to validate that the debugger configuration is set up properly:

If you need to test with requests, you can do so by doing the following:

  1. Go to Run
  2. Edit Configurations
  3. Click +
  4. Select PHP HTTP Request
  5. Select your XAMPP server for the Server:
  6. Specify the URL for the page you want to test
  7. If you need to do a POST, specify the request method and put the post information in the Request body.
  8. Click OK