EPIC Phails

My friend Robb just IM’d me to tell me he’s released a new PHP framework.

The source code is impressive! Using just three lines of code, you are able to create a website with tagging.

   /**
    * Phails can do anything!
    * Here is an example on how to create tagging for your site.
    */
   require_once('Phails.php');
   $Phails = new Phails;
   $Phails->tags->add(array('web 2.0', 'scalable', 'ORM'));
 

I always appreciate a lightweight framework, that isn’t overwrought.

/**
 * Phails
 *
 * Open Source Framework for PHP on Rails
 */

class Phails {
    /**
     * Constructor for Phails
     */
    public function __construct() {
        $this->_fail();
    }

    public function __get($var) {
        $this->_fail();
        return $this->$var = new Phails;
    }

    public function __set($var, $value) {
        $this->_fail();
    }

    public function __call($method, $args) {
        $this->_fail();
    }

    private function _fail() {
        echo "FAIL n";
    }
}

Hmm, makes me jealous. I should be writing my own framework. I heard all the cool kids are doing it.

11 thoughts on “EPIC Phails

  1. *Sigh*. Still? It was years ago that I stumbled upon your writings, and now years later it’s all the same stuff. We get it. You don’t like Rails. You don’t like frameworks. You like to re-write code, and re-write it procedurally.

    Years later, what do you expect the result to be? I just feel like you have worn out this joke a long time ago. A one hit wonder that won’t let it go.

    All of that being said, I have enjoyed your writings – I think you are right in some aspects. I respect you. I’m just curious if this stuff will ever end.

  2. RE: kenrick
    For some sad reason, I have noticed that very heavily in the PHP community. Like the 20 year old freshman in high school still wanting people to laugh at the jokes he told ten years ago. “Hey everyone, look at me!”. In his mind they don’t get old.

    I guess you’re right.

  3. @Nate Klaiber: I missed the part where I was holding a gun to your head, forcing you to read this blog. 😉

    As many people have pointed out to you over the years, I have the same attitude to all frameworks, not just Ruby on Rails. If you don’t get the self-effacing humor of the Phails codebase, I’m not surprised—I see the same reaction from a zealot no matter what religion gets attacked.

    (The ranting will end when I feel that the prefab approach to frameworks is relegated to those areas frameworks work best in and isn’t advocated as a one-size-fits-all solution to spaces it clearly has no place in being.)

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.