[ create a new paste ] login | about

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

PHP, pasted on Dec 17:
<?php 

class Model_Example
{

    const VALUE_1 = 1;
    const VALUE_2 = 2;
    const VALUE_3 = 3;

    public static $value_array = array(
        self::VALUE_1 => 'boing',
        self::VALUE_2 => 'boingboing',
        self::VALUE_3 => 'boingboingboing',
    );

    public function countit()
    {        
        echo  count(self::$value_array );        
    }
}

$model = new Model_Example(); 
$model->countit(); 

?>


Output:
1
3


Create a new paste based on this one


Comments: