Skip to content
Uncategorized

farmers revenge

chris
1 min read
2
Last updated
Filed under Uncategorized
farmers revenge
February 12, 2015

Wayfarer 515, radio check. Wayfarer 515, Albuquerque Center, roger, climb and maintain 13,000. Juliet Mike two one, squawk 4201, ident. Juliet Mike two one, climb and maintain 17,000. Cleared direct to Albuquerque via the… aircraft calling please standby. Jane Mike two one turn heading… disregard. Aircraft calling say again.

functions.php
/**
 * Like vsprintf, but accepts $args keys instead of order index.
 * Both numeric and strings matching /[a-zA-Z0-9_-]+/ are allowed.
 *
 * Example: vskprintf('y = %y$d, x = %x$1.1f', array('x' => 1, 'y' => 2))
 * Result:  'y = 2, x = 1.0'
 *
 * $args also can be object, then it's properties are retrieved
 * using get_object_vars().
 *
 * '%s' without argument name works fine too. Everything vsprintf() can do
 * is supported.
 *
 * @author Josef Kufner <jkufner(at)gmail.com>
 */

if (!function_exists('vksprintf')) {
    function vksprintf($str, $args)
    {
        if (is_object($args)) {
            $args = get_object_vars($args);
        }
        $map = array_flip(array_keys($args));
        $new_str = preg_replace_callback('/(^|[^%])%([a-zA-Z0-9_-]+)\$/',
                function($m) use ($map) { return $m[1].'%'.($map[$m[2]] + 1).'$'; },
                $str);
        return vsprintf($new_str, $args);
    }
}
0
Continue reading

Related posts

All posts

my name is batman

Flank tenderloin sirloin, frankfurter boudin kevin tail brisket alcatra shank pork. Sausage flank picanha hamburger pig andouille. Chicken hamburger leberkas beef ribs…

January 22, 2015 1 min read 2

covert operation

Stinking bishop fondue queso. Caerphilly parmesan stinking bishop boursin hard cheese roquefort cheese on toast blue castello. Cottage cheese cheddar who moved…

January 17, 2015 1 min read 2

soap suds

A hatted orange without grandfathers is truly a withdrawal of hummel impulses. A direst orange’s continent comes with it the thought that…

December 31, 2014 1 min read 2
Conversation

Comments · 0

Posting as guest · Sign in