[ create a new paste ] login | about

Link: http://codepad.org/je3rr3PR    [ raw code | output | fork ]

PHP, pasted on Aug 10:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<?php 

class MagicClassOfMagicalMystery {
    function __construct (array $anythingInTheWorld) {
        foreach($anythingInTheWorld as $k=>$v) {
            $this->$k = $v;
        }
    }
}


$sparkle = new MagicClassOfMagicalMystery(array(
    'wonder'=>'what',
    'is'=>'this?'
));
echo $sparkle->wonder.' use is '.$sparkle->is;


?>


Output:
1
what use is this?


Create a new paste based on this one


Comments: