Skip to content

Darren Nolan

Computer Tech… and stuff

Self vs Static PHP 5.3+

- Author: - 0 Comment(s)

Just a personal note really. I always confuse the two. For the record, in most cases, you’d want to take advantage of late static bindings from PHP 5.3, use static:: over self::, unless you’re really sure you want the class it was actually written in, in which case, use self.

<?php
 
class A
{
    public static $name = 'a';
 
    public static function getSelfName()
    {
        return self::$name;
    }
 
    public static function getStaticName()
    {
        return static::$name;
    }
}
 
class B extends A
{
    public static $name = 'b';
}
 
var_dump ( A::getSelfName() );    // 'a'
var_dump ( A::getStaticName() );  // 'a'

var_dump ( B::getSelfName() );    // 'a'
var_dump ( B::getStaticName() );  // 'b'

Categories: Uncategorized

Slow Cooked Rosemary Garlic Lamb (Dazz Style)

- Author: - 7 Comment(s)

Being somewhat exhausted of people asking me about my lamb (I kid, I love the attention), here is how I do it.  Please don’t be shocked.  It takes about 10 minutes to prepare and requires zip skillz in the kitchen.  I cut many corners when making this, I have done it the “proper” way (using more ‘real’ ingredients etc.) but at the end of the day, it doesn’t make a huge difference to me.  So if you take this, and you’re a champion cooker – please replace the bachelor-dazz ingredients with the real stuff.

Having said that – the results speak for themselves.  This is stupidly tasty.  And you all know it.

2013-11-23 10.51.39You will need:

  • LAMB.  Typically a leg of lamb.  Whatever will fit in your slow cooker.
  • Garlic (paste)
  • Rosemary (paste) and Rosemary
  • 1 Cup Beef Stock (more depending on the size of your lamb)
  • Splash of Oil
  • Salt and Pepper

(more…)

Categories: Uncategorized