コード例 #1
0
ファイル: ReturnTest.php プロジェクト: pan289091315/learnphp
<?php

/**
 * Created by PhpStorm.
 * User: evans
 * Date: 2015/12/10
 * Time: 11:20
 * 测试php返回
 */
//如果省略了 return,则返回值为 NULL。
//返回数组
function returnArray()
{
    return array(0, 1, 2);
}
$ret = returnArray();
var_dump($ret);
//返回引用,函数名前加&
function &return_reference()
{
}
コード例 #2
0
//For Giftshop
$giftQuery = "SELECT v.product_name, count(1) as visit_count FROM\n\t\t(SELECT p.product_name, u.product_id\n\t\tFROM userlog u\n\t\tLEFT JOIN products p on p.product_id = u.product_id where p.vendor_id='little') v\n\t\tgroup by v.product_name order by visit_count desc limit 5";
$giftResult1 = runSelectQuery($giftQuery, $database);
$giftResult = returnArray($giftResult1);
//For GameOn
$gameQuery = "SELECT v.product_name, count(1) as visit_count FROM\n\t\t(SELECT p.product_name, u.product_id\n\t\tFROM userlog u\n\t\tLEFT JOIN products p on p.product_id = u.product_id where p.vendor_id='dextrous') v\n\t\tgroup by v.product_name order by visit_count desc limit 5";
$gameResult1 = runSelectQuery($gameQuery, $database);
$gameResult = returnArray($gameResult1);
//For Dhaba
$dhabaQuery = "SELECT v.product_name, count(1) as visit_count FROM\n\t\t(SELECT p.product_name, u.product_id\n\t\tFROM userlog u\n\t\tLEFT JOIN products p on p.product_id = u.product_id where p.vendor_id='dhabaonwhe') v\n\t\tgroup by v.product_name order by visit_count desc limit 5";
$dhabaResult1 = runSelectQuery($dhabaQuery, $database);
$dhabaResult = returnArray($dhabaResult1);
//For Maru Maru
$maruQuery = "SELECT v.product_name, count(1) as visit_count FROM\n\t\t(SELECT p.product_name, u.product_id\n\t\tFROM userlog u\n\t\tLEFT JOIN products p on p.product_id = u.product_id where p.vendor_id='maru') v\n\t\tgroup by v.product_name order by visit_count desc limit 5";
$maruResult1 = runSelectQuery($maruQuery, $database);
$maruResult = returnArray($maruResult1);
function runSelectQuery($query, $database)
{
    if (!($result = mysql_query($query, $database))) {
        die("Could not execute select query" . mysql_error());
    }
    return $result;
}
function returnArray($result)
{
    $arrayData = array();
    while ($row = mysql_fetch_assoc($result)) {
        array_push($arrayData, $row);
    }
    return $arrayData;
}
コード例 #3
0
ファイル: index.php プロジェクト: essamamdani/aslamClass
 * Time: 7:39 PM
 */
function calc($val, $val2)
{
    echo $val + $val2;
}
function subtract($val, $val2)
{
    echo $val - $val2;
}
function returnArray()
{
    return 2;
}
$var = subtract(1, 2);
$var2 = returnArray() + 3;
for ($i = 0; $i < $var2; $i++) {
    echo $i;
}
class Calc
{
    public $val = "";
    public $val2 = "";
    public function add()
    {
        echo $this->val + $this->val2;
    }
    public function subtract()
    {
        echo $this->val - $this->val2;
    }
コード例 #4
0
ファイル: gh148.php プロジェクト: bjork/php-compat-info
<?php

function returnArray()
{
    return ['one', 'two', 'three'];
}
$arrayValue1 = returnArray()[0];
コード例 #5
0
ファイル: test.php プロジェクト: aaronguo1996/MiniC
    //return $newResult;
    echo json_encode($newResult);
}
/**
 * 将当前节点插入到新的树形数组中
 * @param $newResult 树形数组地址
 * @param $arrTep 当前节点
 */
function updateArray(&$newResult, $arrTep)
{
    if (!empty($newResult)) {
        foreach ($newResult as $k => $v) {
            //查询当前节点的id是否与新的树形数组的id一致,如果是,那么将当前节点存放在树形数组的childrens字段中
            if ($v['id'] == $arrTep['pid']) {
                $newResult[$k]['childrens'][] = $arrTep;
                return true;
            } elseif (!empty($v['childrens'])) {
                //递归调用,查询树形数组的子节点与当前节点的关系
                if (true === updateArray($newResult[$k]['childrens'], $arrTep)) {
                    return true;
                }
            }
        }
    }
    return false;
}
//测试
$result = array(1 => array('id' => 1, 'pid' => 0, 'name' => "program"), 2 => array('id' => 2, 'pid' => 1, 'name' => "external_declaration_list"), 3 => array('id' => 3, 'pid' => 2, 'name' => "type_specifier"), 4 => array('id' => 4, 'pid' => 3, 'name' => "basic_type_specifier"), 5 => array('id' => 5, 'pid' => 4, 'name' => "integer"), 6 => array('id' => 6, 'pid' => 2, 'name' => "external_declaration"), 7 => array('id' => 7, 'pid' => 6, 'name' => "function_definition"), 8 => array('id' => 8, 'pid' => 7, 'name' => "statement_list"), 9 => array('id' => 9, 'pid' => 8, 'name' => "statement_list"), 10 => array('id' => 10, 'pid' => 9, 'name' => "statement_list"), 11 => array('id' => 11, 'pid' => 10, 'name' => "statement_list"), 12 => array('id' => 12, 'pid' => 11, 'name' => "statement_list"), 13 => array('id' => 13, 'pid' => 12, 'name' => "statement_list"), 14 => array('id' => 14, 'pid' => 13, 'name' => "statement_list"), 15 => array('id' => 15, 'pid' => 14, 'name' => "statement_list"), 16 => array('id' => 16, 'pid' => 15, 'name' => "statement"), 17 => array('id' => 17, 'pid' => 16, 'name' => "declaration_statement"), 18 => array('id' => 18, 'pid' => 17, 'name' => "type_specifier"), 19 => array('id' => 19, 'pid' => 18, 'name' => "class_type_specifier"), 20 => array('id' => 20, 'pid' => 19, 'name' => "m"), 21 => array('id' => 21, 'pid' => 17, 'name' => "rr"), 22 => array('id' => 22, 'pid' => 17, 'name' => ";"), 23 => array('id' => 23, 'pid' => 14, 'name' => "statement"), 24 => array('id' => 24, 'pid' => 23, 'name' => "expression"), 25 => array('id' => 25, 'pid' => 24, 'name' => "assignment_expression"), 26 => array('id' => 26, 'pid' => 25, 'name' => "primary_expression"), 27 => array('id' => 27, 'pid' => 26, 'name' => "primary_no_new_array"), 28 => array('id' => 28, 'pid' => 27, 'name' => "primary_expression"), 29 => array('id' => 29, 'pid' => 28, 'name' => "rr"), 30 => array('id' => 30, 'pid' => 27, 'name' => "."), 31 => array('id' => 31, 'pid' => 27, 'name' => "a"), 32 => array('id' => 32, 'pid' => 25, 'name' => "assignment_operator"), 33 => array('id' => 33, 'pid' => 32, 'name' => ":="), 34 => array('id' => 34, 'pid' => 25, 'name' => "assignment_expression"), 35 => array('id' => 35, 'pid' => 34, 'name' => "logical_or_expression"), 36 => array('id' => 36, 'pid' => 35, 'name' => "logical_and_expression"), 37 => array('id' => 37, 'pid' => 36, 'name' => "equality_expression"), 38 => array('id' => 38, 'pid' => 37, 'name' => "relation_expression"), 39 => array('id' => 39, 'pid' => 38, 'name' => "additive_expression"), 40 => array('id' => 40, 'pid' => 39, 'name' => "multiplicative_expression"), 41 => array('id' => 41, 'pid' => 40, 'name' => "unary_expression"), 42 => array('id' => 42, 'pid' => 41, 'name' => "postfix_expression"), 43 => array('id' => 43, 'pid' => 42, 'name' => "primary_expression"), 44 => array('id' => 44, 'pid' => 43, 'name' => "primary_no_new_expression"), 45 => array('id' => 45, 'pid' => 44, 'name' => "5"), 46 => array('id' => 46, 'pid' => 23, 'name' => ";"), 47 => array('id' => 47, 'pid' => 13, 'name' => "statement"), 48 => array('id' => 48, 'pid' => 47, 'name' => "declaration_statement"), 49 => array('id' => 49, 'pid' => 48, 'name' => "type_specifier"), 50 => array('id' => 50, 'pid' => 49, 'name' => "array_type_specifier"), 51 => array('id' => 51, 'pid' => 50, 'name' => "basic_type_specifier"), 52 => array('id' => 52, 'pid' => 51, 'name' => "integer"), 53 => array('id' => 53, 'pid' => 50, 'name' => "["), 54 => array('id' => 54, 'pid' => 50, 'name' => "]"), 55 => array('id' => 55, 'pid' => 48, 'name' => "a"), 56 => array('id' => 56, 'pid' => 48, 'name' => ";"), 57 => array('id' => 57, 'pid' => 12, 'name' => "statement"), 58 => array('id' => 58, 'pid' => 57, 'name' => "expression"), 59 => array('id' => 59, 'pid' => 58, 'name' => "assignment_expression"), 60 => array('id' => 60, 'pid' => 59, 'name' => "primary_expression"), 61 => array('id' => 61, 'pid' => 60, 'name' => "a"), 62 => array('id' => 62, 'pid' => 59, 'name' => "assignment_operator"), 63 => array('id' => 63, 'pid' => 62, 'name' => ":="), 64 => array('id' => 64, 'pid' => 59, 'name' => "assignment_expression"), 65 => array('id' => 65, 'pid' => 64, 'name' => "logical_or_expression"), 66 => array('id' => 66, 'pid' => 65, 'name' => "logical_and_expression"), 67 => array('id' => 67, 'pid' => 66, 'name' => "equality_expression"), 68 => array('id' => 68, 'pid' => 67, 'name' => "relation_expression"), 69 => array('id' => 69, 'pid' => 68, 'name' => "additive_expression"), 70 => array('id' => 70, 'pid' => 69, 'name' => "multiplicative_expression"), 71 => array('id' => 71, 'pid' => 70, 'name' => "unary_expression"), 72 => array('id' => 72, 'pid' => 71, 'name' => "postfix_expression"), 73 => array('id' => 73, 'pid' => 72, 'name' => "primary_expression"), 74 => array('id' => 74, 'pid' => 73, 'name' => "array_creation"), 75 => array('id' => 75, 'pid' => 74, 'name' => "new"), 76 => array('id' => 76, 'pid' => 74, 'name' => "basic_type_specifier"), 77 => array('id' => 77, 'pid' => 76, 'name' => "integer"), 78 => array('id' => 78, 'pid' => 74, 'name' => "dimension_expression_list"), 79 => array('id' => 79, 'pid' => 78, 'name' => "dimension_expression"), 80 => array('id' => 80, 'pid' => 79, 'name' => "["), 81 => array('id' => 81, 'pid' => 79, 'name' => "expression"), 82 => array('id' => 82, 'pid' => 81, 'name' => "assignment_expression"), 83 => array('id' => 83, 'pid' => 82, 'name' => "logical_or_expression"), 84 => array('id' => 84, 'pid' => 83, 'name' => "logical_and_expression"), 85 => array('id' => 85, 'pid' => 84, 'name' => "equality_expression"), 86 => array('id' => 86, 'pid' => 85, 'name' => "relation_expression"), 87 => array('id' => 87, 'pid' => 86, 'name' => "additive_expression"), 88 => array('id' => 88, 'pid' => 87, 'name' => "multiplicative_expression"), 89 => array('id' => 89, 'pid' => 88, 'name' => "unary_expression"), 90 => array('id' => 90, 'pid' => 89, 'name' => "postfix_expression"), 91 => array('id' => 91, 'pid' => 90, 'name' => "primary_expression"), 92 => array('id' => 92, 'pid' => 91, 'name' => "primary_no_new_expression"), 93 => array('id' => 93, 'pid' => 92, 'name' => "4"), 94 => array('id' => 94, 'pid' => 79, 'name' => "]"), 95 => array('id' => 95, 'pid' => 57, 'name' => ";"), 96 => array('id' => 96, 'pid' => 11, 'name' => "statement"), 97 => array('id' => 97, 'pid' => 96, 'name' => "expression"), 98 => array('id' => 98, 'pid' => 97, 'name' => "assignment_expression"), 99 => array('id' => 99, 'pid' => 98, 'name' => "primary_expression"), 100 => array('id' => 100, 'pid' => 99, 'name' => "a"), 101 => array('id' => 101, 'pid' => 98, 'name' => "assignment_operator"), 102 => array('id' => 102, 'pid' => 101, 'name' => ":="), 103 => array('id' => 103, 'pid' => 98, 'name' => "assignment_expression"), 104 => array('id' => 104, 'pid' => 103, 'name' => "logical_or_expression"), 105 => array('id' => 105, 'pid' => 104, 'name' => "logical_and_expression"), 106 => array('id' => 106, 'pid' => 105, 'name' => "equality_expression"), 107 => array('id' => 107, 'pid' => 106, 'name' => "relation_expression"), 108 => array('id' => 108, 'pid' => 107, 'name' => "additive_expression"), 109 => array('id' => 109, 'pid' => 108, 'name' => "multiplicative_expression"), 110 => array('id' => 110, 'pid' => 109, 'name' => "unary_expression"), 111 => array('id' => 111, 'pid' => 110, 'name' => "postfix_expression"), 112 => array('id' => 112, 'pid' => 111, 'name' => "primary_expression"), 113 => array('id' => 113, 'pid' => 112, 'name' => "primary_no_new_expression"), 114 => array('id' => 114, 'pid' => 113, 'name' => "array_literal"), 115 => array('id' => 115, 'pid' => 114, 'name' => "{"), 116 => array('id' => 116, 'pid' => 114, 'name' => "expression_list"), 117 => array('id' => 117, 'pid' => 116, 'name' => "expression_list"), 118 => array('id' => 118, 'pid' => 117, 'name' => "expression_list"), 119 => array('id' => 119, 'pid' => 118, 'name' => "expression_list"), 120 => array('id' => 120, 'pid' => 119, 'name' => "assignment_expression"), 121 => array('id' => 121, 'pid' => 120, 'name' => "logical_or_expression"), 122 => array('id' => 122, 'pid' => 121, 'name' => "logical_and_expression"), 123 => array('id' => 123, 'pid' => 122, 'name' => "equality_expression"), 124 => array('id' => 124, 'pid' => 123, 'name' => "relation_expression"), 125 => array('id' => 125, 'pid' => 124, 'name' => "additive_expression"), 126 => array('id' => 126, 'pid' => 125, 'name' => "multiplicative_expression"), 127 => array('id' => 127, 'pid' => 126, 'name' => "unary_expression"), 128 => array('id' => 128, 'pid' => 127, 'name' => "postfix_expression"), 129 => array('id' => 129, 'pid' => 128, 'name' => "primary_expression"), 130 => array('id' => 130, 'pid' => 129, 'name' => "primary_no_new_expression"), 131 => array('id' => 131, 'pid' => 130, 'name' => "1"), 132 => array('id' => 132, 'pid' => 118, 'name' => ","), 133 => array('id' => 133, 'pid' => 118, 'name' => "assignment_expression"), 134 => array('id' => 134, 'pid' => 133, 'name' => "logical_or_expression"), 135 => array('id' => 135, 'pid' => 134, 'name' => "logical_and_expression"), 136 => array('id' => 136, 'pid' => 135, 'name' => "equality_expression"), 137 => array('id' => 137, 'pid' => 136, 'name' => "relation_expression"), 138 => array('id' => 138, 'pid' => 137, 'name' => "additive_expression"), 139 => array('id' => 139, 'pid' => 138, 'name' => "multiplicative_expression"), 140 => array('id' => 140, 'pid' => 139, 'name' => "unary_expression"), 141 => array('id' => 141, 'pid' => 140, 'name' => "postfix_expression"), 142 => array('id' => 142, 'pid' => 141, 'name' => "primary_expression"), 143 => array('id' => 143, 'pid' => 142, 'name' => "primary_no_new_expression"), 144 => array('id' => 144, 'pid' => 143, 'name' => "2"), 145 => array('id' => 145, 'pid' => 117, 'name' => ","), 146 => array('id' => 146, 'pid' => 117, 'name' => "assignment_expression"), 147 => array('id' => 147, 'pid' => 146, 'name' => "logical_or_expression"), 148 => array('id' => 148, 'pid' => 147, 'name' => "logical_and_expression"), 149 => array('id' => 149, 'pid' => 148, 'name' => "equality_expression"), 150 => array('id' => 150, 'pid' => 149, 'name' => "relation_expression"), 151 => array('id' => 151, 'pid' => 150, 'name' => "additive_expression"), 152 => array('id' => 152, 'pid' => 151, 'name' => "multiplicative_expression"), 153 => array('id' => 153, 'pid' => 152, 'name' => "unary_expression"), 154 => array('id' => 154, 'pid' => 153, 'name' => "postfix_expression"), 155 => array('id' => 155, 'pid' => 154, 'name' => "primary_expression"), 156 => array('id' => 156, 'pid' => 155, 'name' => "primary_no_new_expression"), 157 => array('id' => 157, 'pid' => 156, 'name' => "3"), 158 => array('id' => 158, 'pid' => 116, 'name' => ","), 159 => array('id' => 159, 'pid' => 116, 'name' => "assignment_expression"), 160 => array('id' => 160, 'pid' => 159, 'name' => "logical_or_expression"), 161 => array('id' => 161, 'pid' => 160, 'name' => "logical_and_expression"), 162 => array('id' => 162, 'pid' => 161, 'name' => "equality_expression"), 163 => array('id' => 163, 'pid' => 162, 'name' => "relation_expression"), 164 => array('id' => 164, 'pid' => 163, 'name' => "additive_expression"), 165 => array('id' => 165, 'pid' => 164, 'name' => "multiplicative_expression"), 166 => array('id' => 166, 'pid' => 165, 'name' => "unary_expression"), 167 => array('id' => 167, 'pid' => 166, 'name' => "postfix_expression"), 168 => array('id' => 168, 'pid' => 167, 'name' => "primary_expression"), 169 => array('id' => 169, 'pid' => 168, 'name' => "primary_no_new_expression"), 170 => array('id' => 170, 'pid' => 169, 'name' => "4"), 171 => array('id' => 171, 'pid' => 114, 'name' => "}"), 172 => array('id' => 172, 'pid' => 96, 'name' => ";"), 173 => array('id' => 173, 'pid' => 10, 'name' => "statement"), 174 => array('id' => 174, 'pid' => 173, 'name' => "declaraton_statement"), 175 => array('id' => 175, 'pid' => 174, 'name' => "type_specifier"), 176 => array('id' => 176, 'pid' => 175, 'name' => "basic_type_specifier"), 177 => array('id' => 177, 'pid' => 176, 'name' => "integer"), 178 => array('id' => 178, 'pid' => 174, 'name' => "b"), 179 => array('id' => 179, 'pid' => 174, 'name' => ":="), 180 => array('id' => 180, 'pid' => 174, 'name' => "expression"), 181 => array('id' => 181, 'pid' => 180, 'name' => "assignment_expression"), 182 => array('id' => 182, 'pid' => 181, 'name' => "logical_or_expression"), 183 => array('id' => 183, 'pid' => 182, 'name' => "logical_and_expression"), 184 => array('id' => 184, 'pid' => 183, 'name' => "equality_expression"), 185 => array('id' => 185, 'pid' => 184, 'name' => "relation_expression"), 186 => array('id' => 186, 'pid' => 185, 'name' => "additive_expression"), 187 => array('id' => 187, 'pid' => 186, 'name' => "multiplicative_expression"), 188 => array('id' => 188, 'pid' => 187, 'name' => "unary_expression"), 189 => array('id' => 189, 'pid' => 188, 'name' => "postfix_expression"), 190 => array('id' => 190, 'pid' => 189, 'name' => "primary_expression"), 191 => array('id' => 191, 'pid' => 190, 'name' => "primary_no_new_expression"), 192 => array('id' => 192, 'pid' => 191, 'name' => "3"), 193 => array('id' => 193, 'pid' => 174, 'name' => ";"), 194 => array('id' => 194, 'pid' => 9, 'name' => "statement"), 195 => array('id' => 195, 'pid' => 194, 'name' => "if_statement"), 196 => array('id' => 196, 'pid' => 195, 'name' => "IF"), 197 => array('id' => 197, 'pid' => 195, 'name' => "("), 198 => array('id' => 198, 'pid' => 195, 'name' => "expression"), 199 => array('id' => 199, 'pid' => 198, 'name' => "assignment_expression"), 200 => array('id' => 200, 'pid' => 199, 'name' => "logical_or_expression"), 201 => array('id' => 201, 'pid' => 200, 'name' => "logical_and_expression"), 202 => array('id' => 202, 'pid' => 201, 'name' => "equality_expression"), 203 => array('id' => 203, 'pid' => 202, 'name' => "relation_expression"), 204 => array('id' => 204, 'pid' => 203, 'name' => "relation_expression"), 205 => array('id' => 205, 'pid' => 204, 'name' => "additive_expression"), 206 => array('id' => 206, 'pid' => 205, 'name' => "multiplicative_expression"), 207 => array('id' => 207, 'pid' => 206, 'name' => "unary_expression"), 208 => array('id' => 208, 'pid' => 207, 'name' => "postfix_expression"), 209 => array('id' => 209, 'pid' => 208, 'name' => "primary_expression"), 210 => array('id' => 210, 'pid' => 209, 'name' => "b"), 211 => array('id' => 211, 'pid' => 203, 'name' => ">="), 212 => array('id' => 212, 'pid' => 203, 'name' => "additive_expression"), 213 => array('id' => 213, 'pid' => 212, 'name' => "multiplicative_expression"), 214 => array('id' => 214, 'pid' => 213, 'name' => "unary_expression"), 215 => array('id' => 215, 'pid' => 214, 'name' => "postfix_expression"), 216 => array('id' => 216, 'pid' => 215, 'name' => "primary_expression"), 217 => array('id' => 217, 'pid' => 216, 'name' => "primary_no_new_expression"), 218 => array('id' => 218, 'pid' => 217, 'name' => "10"), 219 => array('id' => 219, 'pid' => 195, 'name' => ")"), 220 => array('id' => 220, 'pid' => 195, 'name' => "block"), 221 => array('id' => 221, 'pid' => 220, 'name' => "{"), 222 => array('id' => 222, 'pid' => 220, 'name' => "statement_list"), 223 => array('id' => 223, 'pid' => 222, 'name' => "statement"), 224 => array('id' => 224, 'pid' => 223, 'name' => "declaraton_statement"), 225 => array('id' => 225, 'pid' => 224, 'name' => "type_specifier"), 226 => array('id' => 226, 'pid' => 225, 'name' => "basic_type_specifier"), 227 => array('id' => 227, 'pid' => 226, 'name' => "integer"), 228 => array('id' => 228, 'pid' => 224, 'name' => "c"), 229 => array('id' => 229, 'pid' => 224, 'name' => ":="), 230 => array('id' => 230, 'pid' => 224, 'name' => "expression"), 231 => array('id' => 231, 'pid' => 230, 'name' => "assignment_expression"), 232 => array('id' => 232, 'pid' => 231, 'name' => "logical_or_expression"), 233 => array('id' => 233, 'pid' => 232, 'name' => "logical_and_expression"), 234 => array('id' => 234, 'pid' => 233, 'name' => "equality_expression"), 235 => array('id' => 235, 'pid' => 234, 'name' => "relation_expression"), 236 => array('id' => 236, 'pid' => 235, 'name' => "additive_expression"), 237 => array('id' => 237, 'pid' => 236, 'name' => "multiplicative_expression"), 238 => array('id' => 238, 'pid' => 237, 'name' => "unary_expression"), 239 => array('id' => 239, 'pid' => 238, 'name' => "postfix_expression"), 240 => array('id' => 240, 'pid' => 239, 'name' => "primary_expression"), 241 => array('id' => 241, 'pid' => 240, 'name' => "primary_no_new_expression"), 242 => array('id' => 242, 'pid' => 241, 'name' => "0"), 243 => array('id' => 243, 'pid' => 224, 'name' => ";"), 244 => array('id' => 244, 'pid' => 220, 'name' => "}"), 245 => array('id' => 245, 'pid' => 195, 'name' => "elseif_list"), 246 => array('id' => 246, 'pid' => 245, 'name' => "elseif"), 247 => array('id' => 247, 'pid' => 246, 'name' => "ELSEIF"), 248 => array('id' => 248, 'pid' => 246, 'name' => "("), 249 => array('id' => 249, 'pid' => 246, 'name' => "expression"), 250 => array('id' => 250, 'pid' => 249, 'name' => "assignment_expression"), 251 => array('id' => 251, 'pid' => 250, 'name' => "logical_or_expression"), 252 => array('id' => 252, 'pid' => 251, 'name' => "logical_and_expression"), 253 => array('id' => 253, 'pid' => 246, 'name' => ")"), 254 => array('id' => 254, 'pid' => 246, 'name' => "block"), 255 => array('id' => 255, 'pid' => 254, 'name' => "{"), 256 => array('id' => 256, 'pid' => 254, 'name' => "statement_list"), 257 => array('id' => 257, 'pid' => 256, 'name' => "statement"), 258 => array('id' => 258, 'pid' => 257, 'name' => "declaraton_statement"), 259 => array('id' => 259, 'pid' => 258, 'name' => "type_specifier"), 260 => array('id' => 260, 'pid' => 259, 'name' => "basic_type_specifier"), 261 => array('id' => 261, 'pid' => 260, 'name' => "integer"), 262 => array('id' => 262, 'pid' => 258, 'name' => "c"), 263 => array('id' => 263, 'pid' => 258, 'name' => ":="), 264 => array('id' => 264, 'pid' => 258, 'name' => "expression"), 265 => array('id' => 265, 'pid' => 264, 'name' => "assignment_expression"), 266 => array('id' => 266, 'pid' => 265, 'name' => "logical_or_expression"), 267 => array('id' => 267, 'pid' => 266, 'name' => "logical_and_expression"), 268 => array('id' => 268, 'pid' => 267, 'name' => "equality_expression"), 269 => array('id' => 269, 'pid' => 268, 'name' => "relation_expression"), 270 => array('id' => 270, 'pid' => 269, 'name' => "additive_expression"), 271 => array('id' => 271, 'pid' => 270, 'name' => "multiplicative_expression"), 272 => array('id' => 272, 'pid' => 271, 'name' => "unary_expression"), 273 => array('id' => 273, 'pid' => 272, 'name' => "postfix_expression"), 274 => array('id' => 274, 'pid' => 273, 'name' => "primary_expression"), 275 => array('id' => 275, 'pid' => 274, 'name' => "primary_no_new_expression"), 276 => array('id' => 276, 'pid' => 275, 'name' => "9"), 277 => array('id' => 277, 'pid' => 258, 'name' => ";"), 278 => array('id' => 278, 'pid' => 254, 'name' => "}"), 279 => array('id' => 279, 'pid' => 195, 'name' => "ELSE"), 280 => array('id' => 280, 'pid' => 195, 'name' => "block"), 281 => array('id' => 281, 'pid' => 280, 'name' => "{"), 282 => array('id' => 282, 'pid' => 280, 'name' => "statement_list"), 283 => array('id' => 283, 'pid' => 282, 'name' => "statement"), 284 => array('id' => 284, 'pid' => 283, 'name' => "declaraton_statement"), 285 => array('id' => 285, 'pid' => 284, 'name' => "type_specifier"), 286 => array('id' => 286, 'pid' => 285, 'name' => "basic_type_specifier"), 287 => array('id' => 287, 'pid' => 286, 'name' => "integer"), 288 => array('id' => 288, 'pid' => 284, 'name' => "d"), 289 => array('id' => 289, 'pid' => 284, 'name' => ":="), 290 => array('id' => 290, 'pid' => 284, 'name' => "expression"), 291 => array('id' => 291, 'pid' => 290, 'name' => "assignment_expression"), 292 => array('id' => 292, 'pid' => 291, 'name' => "logical_or_expression"), 293 => array('id' => 293, 'pid' => 292, 'name' => "logical_and_expression"), 294 => array('id' => 294, 'pid' => 293, 'name' => "equality_expression"), 295 => array('id' => 295, 'pid' => 294, 'name' => "relation_expression"), 296 => array('id' => 296, 'pid' => 295, 'name' => "additive_expression"), 297 => array('id' => 297, 'pid' => 296, 'name' => "multiplicative_expression"), 298 => array('id' => 298, 'pid' => 297, 'name' => "unary_expression"), 299 => array('id' => 299, 'pid' => 298, 'name' => "postfix_expression"), 300 => array('id' => 300, 'pid' => 299, 'name' => "primary_expression"), 301 => array('id' => 301, 'pid' => 300, 'name' => "primary_no_new_expression"), 302 => array('id' => 302, 'pid' => 301, 'name' => "12"), 303 => array('id' => 303, 'pid' => 284, 'name' => ";"), 304 => array('id' => 304, 'pid' => 280, 'name' => "}"), 305 => array('id' => 305, 'pid' => 8, 'name' => "statement"), 306 => array('id' => 306, 'pid' => 305, 'name' => "declaration_statement"), 307 => array('id' => 307, 'pid' => 306, 'name' => "type_specifier"), 308 => array('id' => 308, 'pid' => 307, 'name' => "basic_type_specifier"), 309 => array('id' => 309, 'pid' => 308, 'name' => "integer"), 310 => array('id' => 310, 'pid' => 306, 'name' => "i"), 311 => array('id' => 311, 'pid' => 306, 'name' => ";"), 312 => array('id' => 312, 'pid' => 7, 'name' => "test"), 313 => array('id' => 313, 'pid' => 7, 'name' => "("), 314 => array('id' => 314, 'pid' => 7, 'name' => ")"), 315 => array('id' => 315, 'pid' => 7, 'name' => "block"), 316 => array('id' => 316, 'pid' => 315, 'name' => "{"), 317 => array('id' => 317, 'pid' => 315, 'name' => "statement_list"), 318 => array('id' => 318, 'pid' => 317, 'name' => "statement_list"), 319 => array('id' => 319, 'pid' => 318, 'name' => "statement_list"), 320 => array('id' => 320, 'pid' => 319, 'name' => "statement_list"), 321 => array('id' => 321, 'pid' => 320, 'name' => "label_opt"), 322 => array('id' => 322, 'pid' => 321, 'name' => "#"), 323 => array('id' => 323, 'pid' => 320, 'name' => "statement"), 324 => array('id' => 324, 'pid' => 323, 'name' => "for_statement"), 325 => array('id' => 325, 'pid' => 324, 'name' => "expression_opt"), 326 => array('id' => 326, 'pid' => 325, 'name' => "expression"), 327 => array('id' => 327, 'pid' => 326, 'name' => "assignment_expression"), 328 => array('id' => 328, 'pid' => 327, 'name' => "logical_or_expression"), 329 => array('id' => 329, 'pid' => 328, 'name' => "logical_and_expression"), 330 => array('id' => 330, 'pid' => 329, 'name' => "equlity_expression"), 331 => array('id' => 331, 'pid' => 330, 'name' => "equality_expression"), 332 => array('id' => 332, 'pid' => 331, 'name' => "relation_expression"), 333 => array('id' => 333, 'pid' => 332, 'name' => "additive_expression"), 334 => array('id' => 334, 'pid' => 333, 'name' => "multiplicative_expression"), 335 => array('id' => 335, 'pid' => 334, 'name' => "unary_expression"), 336 => array('id' => 336, 'pid' => 335, 'name' => "postfix_expression"), 337 => array('id' => 337, 'pid' => 336, 'name' => "primary_expression"), 338 => array('id' => 338, 'pid' => 337, 'name' => "i"), 339 => array('id' => 339, 'pid' => 330, 'name' => "="), 340 => array('id' => 340, 'pid' => 330, 'name' => "relation_expression"), 341 => array('id' => 341, 'pid' => 340, 'name' => "additive_expression"), 342 => array('id' => 342, 'pid' => 341, 'name' => "multiplicative_expression"), 343 => array('id' => 343, 'pid' => 342, 'name' => "unary_expression"), 344 => array('id' => 344, 'pid' => 343, 'name' => "postfix_expression"), 345 => array('id' => 345, 'pid' => 344, 'name' => "primary_expression"), 346 => array('id' => 346, 'pid' => 345, 'name' => "primary_no_new_expression"), 347 => array('id' => 347, 'pid' => 346, 'name' => "0"), 348 => array('id' => 348, 'pid' => 324, 'name' => "for"), 349 => array('id' => 349, 'pid' => 324, 'name' => "("), 350 => array('id' => 350, 'pid' => 324, 'name' => ""), 351 => array('id' => 351, 'pid' => 324, 'name' => ";"), 352 => array('id' => 352, 'pid' => 324, 'name' => "expression_opt"), 353 => array('id' => 353, 'pid' => 352, 'name' => "expression"), 354 => array('id' => 354, 'pid' => 353, 'name' => "assignment_expression"), 355 => array('id' => 355, 'pid' => 354, 'name' => "logical_or_expression"), 356 => array('id' => 356, 'pid' => 355, 'name' => "logical_and_expression"), 357 => array('id' => 357, 'pid' => 356, 'name' => "equality_expression"), 358 => array('id' => 358, 'pid' => 357, 'name' => "relation_expression"), 359 => array('id' => 359, 'pid' => 358, 'name' => "relation_expression"), 360 => array('id' => 360, 'pid' => 359, 'name' => "additive_expression"), 361 => array('id' => 361, 'pid' => 360, 'name' => "multiplicative_expression"), 362 => array('id' => 362, 'pid' => 361, 'name' => "unary_expression"), 363 => array('id' => 363, 'pid' => 362, 'name' => "postfix_expression"), 364 => array('id' => 364, 'pid' => 363, 'name' => "primary_expression"), 365 => array('id' => 365, 'pid' => 364, 'name' => "i"), 366 => array('id' => 366, 'pid' => 358, 'name' => "<"), 367 => array('id' => 367, 'pid' => 358, 'name' => "additive_expression"), 368 => array('id' => 368, 'pid' => 367, 'name' => "multiplicative_expression"), 369 => array('id' => 369, 'pid' => 368, 'name' => "unary_expression"), 370 => array('id' => 370, 'pid' => 369, 'name' => "postfix_expression"), 371 => array('id' => 371, 'pid' => 370, 'name' => "primary_expression"), 372 => array('id' => 372, 'pid' => 371, 'name' => "primary_no_new_expression"), 373 => array('id' => 373, 'pid' => 372, 'name' => "9"), 374 => array('id' => 374, 'pid' => 324, 'name' => ";"), 375 => array('id' => 375, 'pid' => 324, 'name' => "expression_opt"), 376 => array('id' => 376, 'pid' => 375, 'name' => "expression"), 377 => array('id' => 377, 'pid' => 376, 'name' => "assignment_expression"), 378 => array('id' => 378, 'pid' => 377, 'name' => "logical_or_expression"), 379 => array('id' => 379, 'pid' => 378, 'name' => "logical_and_expression"), 380 => array('id' => 380, 'pid' => 379, 'name' => "equality_expression"), 381 => array('id' => 381, 'pid' => 380, 'name' => "relation_expression"), 382 => array('id' => 382, 'pid' => 381, 'name' => "additive_expression"), 383 => array('id' => 383, 'pid' => 382, 'name' => "multiplicative_expression"), 384 => array('id' => 384, 'pid' => 383, 'name' => "unary_expression"), 385 => array('id' => 385, 'pid' => 384, 'name' => "postfix_expression"), 386 => array('id' => 386, 'pid' => 385, 'name' => "primary_expression"), 387 => array('id' => 387, 'pid' => 386, 'name' => "i"), 388 => array('id' => 388, 'pid' => 385, 'name' => "++"), 389 => array('id' => 389, 'pid' => 324, 'name' => ")"), 390 => array('id' => 390, 'pid' => 324, 'name' => "block"), 391 => array('id' => 391, 'pid' => 390, 'name' => "{"), 392 => array('id' => 392, 'pid' => 390, 'name' => "statement_list"), 393 => array('id' => 393, 'pid' => 392, 'name' => "statement"), 394 => array('id' => 394, 'pid' => 393, 'name' => "expression"), 395 => array('id' => 395, 'pid' => 394, 'name' => "assignment_expression"), 396 => array('id' => 396, 'pid' => 395, 'name' => "logical_or_expression"), 397 => array('id' => 397, 'pid' => 396, 'name' => "logical_and_expression"), 398 => array('id' => 398, 'pid' => 397, 'name' => "equality_expression"), 399 => array('id' => 399, 'pid' => 398, 'name' => "relation_expression"), 400 => array('id' => 400, 'pid' => 399, 'name' => "additive_expression"), 401 => array('id' => 401, 'pid' => 400, 'name' => "multiplicative_expression"), 402 => array('id' => 402, 'pid' => 401, 'name' => "unary_expression"), 403 => array('id' => 403, 'pid' => 402, 'name' => "postfix_expression"), 404 => array('id' => 404, 'pid' => 403, 'name' => "primary_expression"), 405 => array('id' => 405, 'pid' => 404, 'name' => "b"), 406 => array('id' => 406, 'pid' => 403, 'name' => "--"), 407 => array('id' => 407, 'pid' => 393, 'name' => ";"), 408 => array('id' => 408, 'pid' => 390, 'name' => "}"), 409 => array('id' => 409, 'pid' => 319, 'name' => "statement"), 410 => array('id' => 410, 'pid' => 409, 'name' => "while_statement"), 411 => array('id' => 411, 'pid' => 410, 'name' => "label_opt"), 412 => array('id' => 412, 'pid' => 411, 'name' => "#"), 413 => array('id' => 413, 'pid' => 410, 'name' => "while"), 414 => array('id' => 414, 'pid' => 410, 'name' => "("), 415 => array('id' => 415, 'pid' => 410, 'name' => "expression"), 416 => array('id' => 416, 'pid' => 415, 'name' => "assignment_expression"), 417 => array('id' => 417, 'pid' => 416, 'name' => "logical_or_expression"), 418 => array('id' => 418, 'pid' => 417, 'name' => "logical_and_expression"), 419 => array('id' => 419, 'pid' => 418, 'name' => "equality_expression"), 420 => array('id' => 420, 'pid' => 419, 'name' => "relation_expression"), 421 => array('id' => 421, 'pid' => 420, 'name' => "relation_expression"), 422 => array('id' => 422, 'pid' => 421, 'name' => "additive_expression"), 423 => array('id' => 423, 'pid' => 422, 'name' => "multiplicative_expression"), 424 => array('id' => 424, 'pid' => 423, 'name' => "unary_expression"), 425 => array('id' => 425, 'pid' => 424, 'name' => "postfix_expression"), 426 => array('id' => 426, 'pid' => 425, 'name' => "primary_expression"), 427 => array('id' => 427, 'pid' => 426, 'name' => "b"), 428 => array('id' => 428, 'pid' => 420, 'name' => "<"), 429 => array('id' => 429, 'pid' => 420, 'name' => "additive_expression"), 430 => array('id' => 430, 'pid' => 429, 'name' => "multiplicative_expression"), 431 => array('id' => 431, 'pid' => 430, 'name' => "unary_expression"), 432 => array('id' => 432, 'pid' => 431, 'name' => "postfix_expression"), 433 => array('id' => 433, 'pid' => 432, 'name' => "primary_expression"), 434 => array('id' => 434, 'pid' => 433, 'name' => "primary_no_new_expression"), 435 => array('id' => 435, 'pid' => 434, 'name' => "0"), 436 => array('id' => 436, 'pid' => 410, 'name' => ")"), 437 => array('id' => 437, 'pid' => 410, 'name' => "block"), 438 => array('id' => 438, 'pid' => 437, 'name' => "{"), 439 => array('id' => 439, 'pid' => 437, 'name' => "statement_list"), 440 => array('id' => 440, 'pid' => 439, 'name' => "statement"), 441 => array('id' => 441, 'pid' => 440, 'name' => "expression"), 442 => array('id' => 442, 'pid' => 441, 'name' => "assignment_expression"), 443 => array('id' => 443, 'pid' => 442, 'name' => "logical_or_expression"), 444 => array('id' => 444, 'pid' => 443, 'name' => "logical_and_expression"), 445 => array('id' => 445, 'pid' => 444, 'name' => "equality_expression"), 446 => array('id' => 446, 'pid' => 445, 'name' => "relation_expression"), 447 => array('id' => 447, 'pid' => 446, 'name' => "additive_expression"), 448 => array('id' => 448, 'pid' => 447, 'name' => "multiplicative_expression"), 449 => array('id' => 449, 'pid' => 448, 'name' => "unary_expression"), 450 => array('id' => 450, 'pid' => 449, 'name' => "postfix_expression"), 451 => array('id' => 451, 'pid' => 450, 'name' => "primary_expression"), 452 => array('id' => 452, 'pid' => 451, 'name' => "b"), 453 => array('id' => 453, 'pid' => 450, 'name' => "++"), 454 => array('id' => 454, 'pid' => 440, 'name' => ";"), 455 => array('id' => 455, 'pid' => 437, 'name' => "}"), 456 => array('id' => 456, 'pid' => 318, 'name' => "statement"), 457 => array('id' => 457, 'pid' => 456, 'name' => "while_statement"), 458 => array('id' => 458, 'pid' => 457, 'name' => "label_opt"), 459 => array('id' => 459, 'pid' => 458, 'name' => "#"), 460 => array('id' => 460, 'pid' => 457, 'name' => "foreach"), 461 => array('id' => 461, 'pid' => 457, 'name' => "("), 462 => array('id' => 462, 'pid' => 457, 'name' => "a"), 463 => array('id' => 463, 'pid' => 457, 'name' => ":"), 464 => array('id' => 464, 'pid' => 457, 'name' => "expression"), 465 => array('id' => 465, 'pid' => 464, 'name' => "assignment_expression"), 466 => array('id' => 466, 'pid' => 465, 'name' => "logical_or_expression"), 467 => array('id' => 467, 'pid' => 466, 'name' => "logical_and_expression"), 468 => array('id' => 468, 'pid' => 467, 'name' => "equality_expression"), 469 => array('id' => 469, 'pid' => 468, 'name' => "relation_expression"), 470 => array('id' => 470, 'pid' => 469, 'name' => "additive_expression"), 471 => array('id' => 471, 'pid' => 470, 'name' => "multiplicative_expression"), 472 => array('id' => 472, 'pid' => 471, 'name' => "unary_expression"), 473 => array('id' => 473, 'pid' => 472, 'name' => "postfix_expression"), 474 => array('id' => 474, 'pid' => 473, 'name' => "primary_expression"), 475 => array('id' => 475, 'pid' => 474, 'name' => "i"), 476 => array('id' => 476, 'pid' => 457, 'name' => ")"), 477 => array('id' => 477, 'pid' => 457, 'name' => "block"), 478 => array('id' => 478, 'pid' => 477, 'name' => "{"), 479 => array('id' => 479, 'pid' => 477, 'name' => "statement_list"), 480 => array('id' => 480, 'pid' => 479, 'name' => "statement"), 481 => array('id' => 481, 'pid' => 480, 'name' => "expression"), 482 => array('id' => 482, 'pid' => 481, 'name' => "assignment_expression"), 483 => array('id' => 483, 'pid' => 482, 'name' => "logical_or_expression"), 484 => array('id' => 484, 'pid' => 483, 'name' => "logical_and_expression"), 485 => array('id' => 485, 'pid' => 484, 'name' => "equality_expression"), 486 => array('id' => 486, 'pid' => 485, 'name' => "relation_expression"), 487 => array('id' => 487, 'pid' => 486, 'name' => "additive_expression"), 488 => array('id' => 488, 'pid' => 487, 'name' => "multiplicative_expression"), 489 => array('id' => 489, 'pid' => 488, 'name' => "unary_expression"), 490 => array('id' => 490, 'pid' => 489, 'name' => "postfix_expression"), 491 => array('id' => 491, 'pid' => 490, 'name' => "primary_expression"), 492 => array('id' => 492, 'pid' => 491, 'name' => "i"), 493 => array('id' => 493, 'pid' => 480, 'name' => ";"), 494 => array('id' => 494, 'pid' => 477, 'name' => "}"), 495 => array('id' => 495, 'pid' => 317, 'name' => "statement"), 496 => array('id' => 496, 'pid' => 495, 'name' => "return_statement"), 497 => array('id' => 497, 'pid' => 496, 'name' => "return"), 498 => array('id' => 498, 'pid' => 496, 'name' => "expression_opt"), 499 => array('id' => 499, 'pid' => 498, 'name' => "expression"), 500 => array('id' => 500, 'pid' => 499, 'name' => "assignment_expression"), 501 => array('id' => 501, 'pid' => 500, 'name' => "logical_or_expression"), 502 => array('id' => 502, 'pid' => 501, 'name' => "logical_and_expression"), 503 => array('id' => 503, 'pid' => 502, 'name' => "equality_expression"), 504 => array('id' => 504, 'pid' => 503, 'name' => "relation_expression"), 505 => array('id' => 505, 'pid' => 504, 'name' => "additive_expression"), 506 => array('id' => 506, 'pid' => 505, 'name' => "multiplicative_expression"), 507 => array('id' => 507, 'pid' => 506, 'name' => "unary_expression"), 508 => array('id' => 508, 'pid' => 507, 'name' => "postfix_expression"), 509 => array('id' => 509, 'pid' => 508, 'name' => "primary_expression"), 510 => array('id' => 510, 'pid' => 509, 'name' => "b"), 511 => array('id' => 511, 'pid' => 496, 'name' => ";"), 512 => array('id' => 512, 'pid' => 315, 'name' => "}"));
if ('org_select' == $_POST['action']) {
    returnArray($result);
}