Compressing and uncompressing a string with PHP

By Josh Sherman
1 min read
development
php

Today I went on a mission to find a PHP function that I’ve never used before and knew nothing about. The mission was such a success that I have two functions to discuss and honestly, I’m pretty sure I’ll never use them. That being said, if the need ever arises […]

PHP's /e modifier is deprecated, use preg_replace_callback instead

By Josh Sherman
1 min read
development
php

I’ve discussed the use of preg_replace_callback in the past in regard to passing variables to anonymous functions but never touched on how to use preg_replace_callback or the fact that the /e modifier has been deprecated in PHP 5.5+. Even though /e still works in PHP 5.5 in the near future […]

Migrating from WP Engine to GitHub Pages

By Josh Sherman
6 min read
development
wpengine
wordpress
github
github pages
jekyll

After giving it nearly a full calendar year, I have decided to migrate my PHP blog (PHP Avenue) off of WordPress via WP Engine and on to GitHub Pages. The decision ultimately boiled down to WordPress having way more available functionality than I was actually using and me not seeing […]

Transactions with PHP Data Objects (PDO)

By Josh Sherman
1 min read
development
php
database

PHP Data Objects (PDO) is arguably the best database abstraction layer available in PHP. It provides a consistent interface across multiple datasources (MySQL, PostgreSQL, et cetera) and helps boost your site’s security by way of prepared statements. It even supports transactions which we’ll be taking a look at here. Database […]

The dirtiest thing you wear

By Josh Sherman
1 min read
health

Not only is it the dirtiest thing you wear, it’s quite possibly the dirtiest thing you own and it’s fucking disgusting. What is it, you ask? It’s your belt, your dirty disgusting belt. Why is your belt so disgusting? Because it’s something that you don’t launder. Not only do I […]