PHP's array_shift Performance

< 1 minute readPHP’s array_shift is a relatively slow way to fetch the first item from an array; it’s much better to use reset. For example, array_shift() modifies the original array and can be pretty slow because it needs to completely reindex the array (remove first element then shuffle everything else forward by one “slot”), so unless you […]

Read More PHP's array_shift Performance

Which Way Do Your Slashes Face in PHP?

4 minute readWhen writing out filepaths and URLs, should you use forward slashes / or backslashes \? Windows expects one, whereas Unix-style operating systems (Linux and Mac OSs, primarily) expect another. PHP has two built-in solutions, but both have problems, especially if you’re working with WordPress. Backstory At work, I’ve recently had some trouble getting my linux […]

Read More Which Way Do Your Slashes Face in PHP?

My Takeaways from "Gutenberg for Plugin Owners" Crowdcast

2 minute readToday I watched “Gutenberg for Plugin Owners“, an online discussion between Brian Hogg, Kyle Maurer, and Daniel Bachhuber, where they discussed and answered questions about how WordPress plugin owners can better prepare for the new editor, Gutenberg. You can watch the replay, but here’s my notes. I was admittedly doing some somewhat noisy house-chores while […]

Read More My Takeaways from "Gutenberg for Plugin Owners" Crowdcast

Penpals Explanation of PHP/cURL/openSSL/TLS/SSL/PayPal Handshake Issues

5 minute readToday I spent a few hours wrapping my head around an issue where some websites weren’t able to connect properly to PayPal.com. I found it pretty tricky to understand because it involved quite a few technologies and programs: PHP: a programming language, and a program to interpret lines of code written in that programming language […]

Read More Penpals Explanation of PHP/cURL/openSSL/TLS/SSL/PayPal Handshake Issues