Update April 4th, 2019 Seems at some point between May of 2015 and now, the code in this post went terribly stale. It wasn’t working in either Firefox or Chrome and I’ve since updated the code with a working example.…
I’ve never actually used this function, but could definitely see using it to help profile a system and/or to help identify defined but unused variables. To obtain an array of all of the defined variables you would: $defined = get_defined_vars();…
Starting on May 1st, 2015, I am setting out to learn Lisp because I feel like I’m missing out by not knowing it. I see it come up pretty regularly, it’s stood the test of time and there are a…
JSON is one of my favorite human readable formats. It’s widely used and has great support in PHP as well as other languages. PHP allows you to easily convert variables into JSON and JSON into objects or arrays. First, let’s…
I’m starting to feel behind the curve. I started receiving feedback that some clickable elements on my social networks were not working on touch devices. Without much thought, I went ahead and added touchstart along side of click to bind…
We previously discussed how to calculate the length of a string in PHP and I made mention that using that function is how you would go about truncating a string if it’s over a specific length. I also said that…
I’m having one of those weeks where I zero motivation to sit down and write a blog post. Spent part of the week in Austin with the work fam. Haven’t even unpacked yet. Still getting back into the swing of…
All the good things about Easter aside, it’s one of those holidays that’s a pain to get the date for. This is because the date of Easter is based on the lunar cycle and Spring Equinox (March 21st). The date…
Going to make this brief since it’s Easter and I forgot to blog ahead of time this week. So I’ve recently been hanging out on a few Slack teams. One with the work crew, one with my small group of…
Serialization in PHP is the act of converting a variable into a storable value. When I say storable, I mean being able to store the result in say, a database or a flat file. This is commonly applied to arrays…