What Does the IE Menu Bar Look Like?

The other day one of my clients sent me a screenshot from one of their users and they asked me if I could figure out what version of IE they were using just by the screenshot. I realized I couldn’t. I knew IE 6 had the XP looking icons in the top but I really didn’t know what else was different between the version. My goal is to continue to update this post as new versions come out so feel free to bookmark it.

IE 6 on Windows XP


IE 7 on Windows XP


IE 8 on Windows XP


IE 8 on Windows 7

7 IE8

IE 9 on Windows 7

7 IE9

IE 10 on Windows 7

7 IE10

IE 11 on Windows 7

7 IE11

IE 10 Desktop on Windows 8

8 IE10 Desktop

IE 11 Desktop on Windows 8.1

8.1 IE11 Desktop

Overall, 9, 10 and 11 are all extremely similar and I’m guessing this will be the layout going forward.

Checking to see if PHP is Running at the Command Line

We’ve been working on writing unit testing for our code. One of the things I struggle with is that on our production server we’re logging a message to New Relic when we run into a condition that isn’t planned for (in the future we’ll have unit testing for this but it’s a large code base and it needs a lot of work).

The problem that I’ve been running into is that when we do this we want these messages displayed on the command line when we run the unit tests and not send to New Relic. The code below allows us to do this:

class Application_Model_Error{
    public static function log($message){
        if(php_sapi_name() === 'cli'){
            echo PHP_EOL, PHP_EOL;
            echo '*****************************', PHP_EOL;
            echo $message, PHP_EOL;
            echo '*****************************', PHP_EOL;
            echo PHP_EOL, PHP_EOL;
        } elseif (extension_loaded('newrelic')) {

The following determines if PHP is running at the command line:

if(php_sapi_name() === 'cli'){

Linting All Your PHP Files

The PHP CLI has a cool feature (-l) that allows you to check a file to see if it has any syntax errors:

scotts-air:~ scottkeckwarren$ php -l test.php 

Parse error: parse error, expecting `"function (T_FUNCTION)"' in test.php on line 5
Errors parsing test.php

The downside to this is that it doesn’t work on a whole directory. However with some command line magic we can have it run on all the php files in our application:

find -L application -name '*.php' -print0 | xargs -0 -n 1 -P 4 php -l

Link Post: Wal-Mart’s Answer To Apple Pay Has Already Been Hacked

It was only some emails but not a good start for a company that’s going to broker a trillion dollars a year…

Within the last 36 hours, we learned that unauthorized third parties obtained the e-mail addresses of some of our CurrentC pilot program participants and individuals who had expressed interest in the app. Many of these email addresses are dummy accounts used for testing purposes only. The CurrentC app itself was not affected.

We have notified our merchant partners about this incident and directly communicated with each of the individuals whose email addresses were involved. We take the security of our users’ information extremely seriously. MCX is continuing to investigate this situation and will provide updates as necessary.


Link Post: CurrentC Is The Big Retailers’ Clunky Attempt To Kill Apple Pay And Credit Card Fees

With a heavyweight like Walmart behind CurrentC (say it out loud it makes more sense then) I’m guessing this will never go away. It’s funny to me that very few people even knew this existed before Apple Pay went live. My guess is Apple Pay will be the default choice unless you must use CurrentC. Much like how I use my American Express first and then my Visa now.


How to Determine What Branches Have Been Merged in GIT

I use branches a lot but occasionally I forget to delete the branch after I merge it into master and then when I look at my list of branches I get a list of branches that I can’t remember:

user@server:/var/www$ git branch 
* master 

If you want a quick way to determine which branches have already been merged into the current branch (I usually run this at master because then I know they’re “finished” branches) you can run git branch --merged to get just the merged branches.

user@server:/var/www$ git branch --merged 
* master

Then you can git branch -d blah to your heart’s content.

You can also run git branch --no-merged to see the branches that haven’t been merged yet.