ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

COMPETITION - Who can create the most pointless functionality?

September 13, 2010 10:01am

Subscribe [15]
  • #16 / Oct 06, 2010 2:44pm

    Rolly1971

    144 posts

    class MyClass
    {
    
        function __construct()
        {
            if ($this)
            {
                exit;
            }
        }
    
    }
  • #17 / Oct 09, 2010 11:57am

    MsFriendly

    1 posts

    function hoppity($string,$repeat){
    foreach (range(1, $repeat) as $i) {  
            if ($i % 3 == 0 && $i % 5 == 0) {  
                    echo $string.'
    ';  
            } elseif ($i % 3 == 0) {  
                    echo $string.'ity
    ';  
            } elseif ($i % 5 == 0) {  
                    echo $string.$string.'
    ';  
            }  
    }
    
    }

    Usage: hoppity(‘hop’,12);

    Maybe the real geeks will realise that this function wasn’t entirely useless… =)

  • #18 / Oct 09, 2010 8:57pm

    jmadsen

    438 posts

    function select($thing='') {
        $return = empty($thing) ? 'SELECT '.$thing : 'SELECT *';
        return $return;
    }
    
    function from($where) {
        return 'FROM `'.$where.'`';
    }
    function where($condition) {
        return 'WHERE '.$condition;
    }
    
    $query = select('crap').from('crappytable').where('crap="crap"');
    mysql_query($query);

    Hey wait a minute…that’s Active Record!

  • #19 / Oct 10, 2010 5:19am

    Sbioko

    382 posts

    Why invent something? Look at the built-in is_null function 😊

  • #20 / Oct 28, 2010 7:21am

    dbashyal

    117 posts

    @vheissu Magento is built on top of zend, but incorporates a load of crap on the top of it to boot 😛

    Thats the reason i hate magento and still have to work on it coz its selected software for all e-commerce websites at my workplace.

  • #21 / Oct 29, 2010 4:53am

    Dennis Rasmussen

    601 posts

    class Vomit extends Exception { }
    $up = new Vomit('oh noes!');
    
    if ($sick):
      throw $up;
    endif;

    Haha I made myself laugh because of what I wrote… sigh

  • #22 / Oct 30, 2010 3:44pm

    phpserver

    149 posts

    <?php
    $string = "bomb!";
    $jerry_hagards_hypothesis = explode( "'" , $string );
    ?>
  • #23 / Nov 08, 2010 5:59pm

    Danjurou

    3 posts

    function loremipsumdolorsitamet($string){return implode(' ',array_map('strrev',explode(' ',$string)));}echo loremipsumdolorsitamet('?noitcnufsihttsetuoyyhw');
  • #24 / Nov 17, 2010 7:22am

    Yettie

    3 posts

    <?php
    echo "Hello World";
    ?>
  • #25 / Nov 19, 2010 5:35am

    Circuitbomb

    20 posts

    <?php
    if(php_uname('s') == 'Windows NT') {
    
     die;
    
    } else {
    
     return TRUE; //to da game
    
    }
    ?>
.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases