Consolidating PHPAve.com

By Josh Sherman
1 min read
project update
php

Just wanted to give everybody the head’s up that I am consolidating PHPAve.com into this blog. I still plan to blog about PHP from time to time but I no longer see the need in maintaining it as a separate site. For those that are interested in the migration details, […]

Shark Tank killed the magic

By Josh Sherman
1 min read
parenting

Shark Tank, you fucked up, you fucked up bad. I was watching the latest episode of Shark Tank (Season 7, Episode 5) with my daughter when I had to abruptly stop the show and make up an excuse as to why we were no longer watching the show. The segment […]

Check if a string contains a character with PHP

By Josh Sherman
1 min read
development
php

Checking if a string contains a character could be accomplished easily with a regular expression or you can use the built-in PHP functions. To check if a string contains a character of a specific case you can use strpos. $haystack = 'This is my haystack that we shall check' $has_A […]

Transitioning from Google Wallet to Android Pay

By Josh Sherman
2 min read
google
android

I feel like I’m in the minority among my peers. I use Google Wallet and Android Pay pretty religiously. I choose to shop at establishments that allow me to use this technology as often as possible. I ask my peers that use Android devices how they like being able to […]

Generate random hex color with PHP

By Josh Sherman
1 min read
development
php
graphic design

There’s many ways to skin a cat, or generate a color. You could randomize a number between 0 and 16777215 then convert it to hex: $rand_color = '#' . dechex(mt_rant(0, 16777215)); Or you could do what I like to do, just md5 a random string and grab the first 6 […]