About
This post contains a list PHP code snippets. In the code snippets, you can find PHP related topics with a quick explanation and a code example. I made this collection of code snippets so that if I ever forget something I can just come here to refresh my memory.
Hopefully, you’ll find it useful too.
Note
Here you won’t find a complete set of step by step tutorials but rather a list of quick tutorials with code examples.
PHP Code Snippets
- Installing Composer(dependency manager)
- Setting Up PHP Debugging With Xdebug
- Date
- Dirname Function
- String Sanitization
- Data Validation
- Workig With Strings
- Workig With Arrays
- Pass By Reference
- Reading And Writing Files
- Zipping Files
- Force File Downloads
- Sending Emails
- Recaptcha V3 Implementation
- Request Variables
- Working With JSON
- Making Requests With CURL
- Downloading Files With file_get_contents()
- Objects And OOP
- Slim Framework APIs
- Exceptions
- Global Exception Handler
- HTML Manipulation Using DomDocument
- Reading And Writing Excel Files
- Making PDFs
Why not put these snippets on the Codiga Hub with a cookbook? https://app.codiga.io/hub this will help us looking them up!
Hi.
I made these posts part of my blog where I document things I have done/learned. This can then serve me as a kind of portfolio. Additionally, I’m not a fan of centralized platforms, which is why I’m hosting my own site instead of using a blogging platform like Medium for example.