예제 #1
0
function test()
{
    print "In test function\n";
    $example = new Example();
    $example->state = false;
    $example->setNumber(4);
    $refNum = 0;
    $example->setNumberToRef($refNum);
    print "Num: " . $refNum;
    if ($example instanceof Example) {
        print "\nInstance of Ext    ractAcademicsData\n";
    }
    $a = array(1, 2, 3, 4, 5);
    foreach ($a as $n) {
        print "\nfe> " . $n;
    }
    print "\n";
    for ($i = 0; $i < 5; $i++) {
        print "\nfc> " . $a[$i];
    }
    print "\n";
    $xA = array('one' => '1 num', 'two' => '2 num');
    foreach ($xA as $k => $v) {
        print "\nfe[" . $k . "]: " . $v;
    }
    print "\n";
}