當前位置: 首頁>>代碼示例>>PHP>>正文


PHP test2函數代碼示例

本文整理匯總了PHP中test2函數的典型用法代碼示例。如果您正苦於以下問題:PHP test2函數的具體用法?PHP test2怎麽用?PHP test2使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了test2函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: content_5236ae0304b8c2_40162505

    function content_5236ae0304b8c2_40162505($_smarty_tpl)
    {
        ?>
<h1>自定義函數yu 以block 方式顯示</h1>
<?php 
        $_smarty_tpl->smarty->_tag_stack[] = array('yu2', array('times' => "5", 'size' => "5", 'color' => "blue"));
        $_block_repeat = true;
        echo test2(array('times' => "5", 'size' => "5", 'color' => "blue"), null, $_smarty_tpl, $_block_repeat);
        while ($_block_repeat) {
            ob_start();
            ?>
hello world<?php 
            $_block_content = ob_get_clean();
            $_block_repeat = false;
            echo test2(array('times' => "5", 'size' => "5", 'color' => "blue"), $_block_content, $_smarty_tpl, $_block_repeat);
        }
        array_pop($_smarty_tpl->smarty->_tag_stack);
        ?>

<h1>自定義函數yu 以function 方式顯示</h1>
<?php 
        echo test1(array('times' => "5", 'size' => "5", 'content' => "hello 栩堅", 'color' => "red"), $_smarty_tpl);
        ?>


<?php 
    }
開發者ID:yuxujian,項目名稱:YuNote,代碼行數:27,代碼來源:729987baba90315a0fe9ccb37578627448444efc.file.example7.tpl.php

示例2: run

 public function run()
 {
     $r = 0;
     for ($i = 0; $i < self::DEFAULT_ITERATIONS; $i++) {
         $r += test1() + test2(1, 2, 3) + self::test1() + self::test2(1, 2, 3);
     }
 }
開發者ID:bklein01,項目名稱:jphp,代碼行數:7,代碼來源:ConstantCallBenchmark.php

示例3: test2

function test2($i)
{
    echo $i, '<br/>';
    //3
    if ($i >= 0) {
        test2($i - 1);
        //test2(2)
        /*
        echo $i,'<br/>';//2
        		if($i>=0){
        			test2($i-1);//test2(1)
        				echo $i,'<br/>';//1
        				if($i>=0){
        					test2($i-1);//test2(0)
        						echo $i,'<br/>';//0
        						if($i>=0){
        							test2($i-1);//test2(-1)
        								echo $i,'<br/>';//-1
        								if($i>=0){
        									test2($i-1);
        								}
        								echo $i,'<br/>';//-1
        						}
        						echo $i,'<br/>';//0
        				}
        				echo $i,'<br/>';//1
        		}
        		echo $i,'<br/>';//2
        */
    }
    echo $i, '<br/>';
    //3
}
開發者ID:denson7,項目名稱:phpstudy,代碼行數:33,代碼來源:func6.php

示例4: test

function test()
{
    function test2()
    {
        echo "<p>Test 2 function </p>";
    }
    test2();
}
開發者ID:bilalAkhan,項目名稱:php,代碼行數:8,代碼來源:function.php

示例5: sumArray

<?php

function sumArray($intArray)
{
    $total = 0;
    foreach ($intArray as $value) {
        $total += $value;
    }
    return $total;
}
function test1(Form $form)
{
    return 1;
}
function test2(array $array)
{
    return sumArray($array);
}
$test1 = test1(null);
assert($test1, 1);
$testArray = array(1, 2, 3);
$test2 = test2($testArray);
assert($test2, 6);
testEnd();
開發者ID:microcosmx,項目名稱:experiments,代碼行數:24,代碼來源:TypeHinting.php

示例6: test

function test($a, $b)
{
    var_dump($a === $b);
    test2($a, $b);
}
開發者ID:badlamer,項目名稱:hhvm,代碼行數:5,代碼來源:010.php

示例7: test

function test(&$some_ref)
{
    $some_ref = 42;
}
test($some_ref = 1);
var_dump($some_ref);
$var = null;
test($var);
var_dump($var);
$var = null;
test($some_ref = $var);
var_dump($some_ref, $var);
$var = null;
test($some_ref =& $var);
var_dump($some_ref, $var);
function test2($some_ref)
{
    $some_ref = 42;
}
test2($some_ref = 1);
var_dump($some_ref);
$var = null;
test2($var);
var_dump($var);
$var = null;
test2($some_ref = $var);
var_dump($some_ref, $var);
$var = null;
test2($some_ref =& $var);
var_dump($some_ref, $var);
開發者ID:badlamer,項目名稱:hhvm,代碼行數:30,代碼來源:1091.php

示例8: test

 function test($B)
 {
     test2($B);
 }
開發者ID:hetao29,項目名稱:slightphp,代碼行數:4,代碼來源:error.page.php

示例9: test1

function test1()
{
    test2();
    print_r(debug_backtrace());
}
開發者ID:xiaobudongzhang,項目名稱:lib,代碼行數:5,代碼來源:stack.php

示例10: test1

<?php

function test1(...$args)
{
    var_dump($args);
}
test1();
test1(1);
test1(1, 2, 3);
function test2($arg1, $arg2, ...$args)
{
    var_dump($arg1, $arg2, $args);
}
test2(1, 2);
test2(1, 2, 3);
test2(1, 2, 3, 4, 5);
開發者ID:badlamer,項目名稱:hhvm,代碼行數:16,代碼來源:basic.php

示例11: test

<?php

function test()
{
    static $var = 1 + 2.5;
    return $var;
}
function test2(int $arg)
{
}
test2(test());
開發者ID:hslatman,項目名稱:phan,代碼行數:11,代碼來源:0019_static_var.php

示例12: test1

<?php

function test1(&$abc) : string
{
    return $abc;
}
function &test2(int $abc) : string
{
    return $abc;
}
function &test3(int &$abc) : string
{
    return $abc;
}
$a = 123;
var_dump(test1($a));
var_dump($a);
var_dump(test2($a));
var_dump($a);
var_dump(test3($a));
var_dump($a);
開發者ID:gleamingthecube,項目名稱:php,代碼行數:21,代碼來源:Zend_tests_return_types_return_reference_separation.php

示例13: innerFunc

 function innerFunc($val, $x, $y)
 {
     return test2($val, $x + $y);
 }
開發者ID:masa69,項目名稱:php-sample,代碼行數:4,代碼來源:function.php

示例14: test

<?php

class A
{
    public static $var;
}
function test(&$arg)
{
    $arg = 2;
}
function test2(&$arg2)
{
    $arg2 = "abc";
}
function test3(array $arg)
{
}
test(A::$var);
test2(A::$var);
test3(A::$var);
開發者ID:tmli3b3rm4n,項目名稱:phan,代碼行數:20,代碼來源:0039_static_property_ref.php

示例15: test5

// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
//
// ****************************************************************************
echo "<h4>Modules</h4><hr><span style=\"font-size:90%\">\n";
if (isLvl5("Anchoring") && skillLvl("Starbase Defense Management") != -1) {
    test5("Starbase Defense Management", "Pos Guns");
}
test("Cynosural Field Generator I", "Cyno Gen");
echo "<br>";
if (!test2("100MN Microwarpdrive II", "T2 MWDs")) {
    test("100MN Microwarpdrive I", "T1 MWDs");
}
test("Large Shield Extender II", "LSE II");
test("Invulnerability Field II", "Invuln II");
test("Energized Adaptive Nano Membrane II", "EANM II");
test("Damage Control II", "DCU II");
test("1600mm Reinforced Rolled Tungsten Plates I", "1600mm RT");
test("Sensor Booster II", "SB II");
test("Tracking Computer II", "TC II");
test("Tracking Enhancer II", "TE II");
test("Power Diagnostic System II", "PDU II");
test("Reactor Control Unit II", "RCU II");
test("Gyrostabilizer II", "T2 dmg mods");
if (!test2("Covert Ops Cloaking Device II", "CovOps Cloak")) {
    test("Prototype Cloaking Device I", "Proto Cloak");
}
test("Warp Disruptor II", "T2 Tackle");
test("Stasis Webifier II", "Webifier II");
test("Large Shield Booster II", "LSB II");
test("Large Armor Repairer II", "LAR II");
echo "</span>";
開發者ID:Covert-Inferno,項目名稱:eve-jackknife,代碼行數:31,代碼來源:t2mods.tab.php


注:本文中的test2函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。