当前位置: 首页>>代码示例>>PHP>>正文


PHP second函数代码示例

本文整理汇总了PHP中second函数的典型用法代码示例。如果您正苦于以下问题:PHP second函数的具体用法?PHP second怎么用?PHP second使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了second函数的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: third

function third()
{
    enter_function('third');
    second();
    first();
    exit_function();
}
开发者ID:JohnWSteill,项目名称:EdProjs,代码行数:7,代码来源:05_5.php

示例2: first

function first()
{
    var_dump(__FUNCTION__ . ' - ' . 1);
    yield from delay(1000);
    var_dump(__FUNCTION__ . ' - ' . 2);
    yield from delay(1000);
    yield from second();
    return 5;
}
开发者ID:jubianchi,项目名称:async-generator,代码行数:9,代码来源:yield-from.php

示例3: first

function first($arg1, $arg2)
{
    second(TRUE, FALSE);
}
开发者ID:jave007,项目名称:test,代码行数:4,代码来源:fatal-error.php

示例4: first

    echo "Hello World";
}
first();
?>
    <br />
    <br />
    <p>Function With Variable </p>
    <?php 
function second($var)
{
    echo "Hello {$var} <br>";
}
$t = "everybody";
// we pass the variable $t in to the function
second($t);
second("gg");
?>
    <br />
    <p>function with return </p>
    <?php 
function third($var)
{
    $hello = "Hello {$var} <br>";
    return $hello;
}
// the function dose't print any thing,
//  so we add the function in to variable and then print the variable
$new_var = third("everybody");
echo $new_var;
?>
    <br />
开发者ID:natanshalva,项目名称:php-course,代码行数:31,代码来源:function.php

示例5: mapcat

/**
 * Returns the result of applying concat to the result of mapping f over colls
 */
function mapcat()
{
    $args = func_get_args();
    return apply('v\\concat', map(first($args), second($args)));
}
开发者ID:blackwood,项目名称:vervel,代码行数:8,代码来源:lib.php

示例6: opendb

<?php

// install.php :: creates/populates database tables on a new installation.
include 'lib.php';
$link = opendb();
$start = getmicrotime();
if (isset($_GET["page"])) {
    $page = $_GET["page"];
    if ($page == 2) {
        second();
    } elseif ($page == 3) {
        third();
    } elseif ($page == 4) {
        fourth();
    } elseif ($page == 5) {
        fifth();
    } else {
        first();
    }
} else {
    first();
}
// Thanks to Predrag Supurovic from php.net for this function!
function dobatch($p_query)
{
    $query_split = preg_split("/[;]+/", $p_query);
    foreach ($query_split as $command_line) {
        $command_line = trim($command_line);
        if ($command_line != '') {
            $query_result = mysql_query($command_line);
            if ($query_result == 0) {
开发者ID:Choptec,项目名称:dragon-knight,代码行数:31,代码来源:install.php

示例7: generateStreamIDHash

 public static function generateStreamIDHash($url, $deterministic)
 {
     // For load balancing purposes, the hash should be spread as randomly
     // as possible.
     if ($deterministic) {
         // randomize deterministically:
         $randomize = self::createHash($url);
     } else {
         // randomize based on current time:
         $randomize(hour(now) & minute(now) & second(now));
     }
     $streamidhash = 0;
     srand();
     // generate random serial number between 0 and 15
     $streamidhash = rand(0, 15);
     //echo "DEBUG: Raw streamidhash is $streamidhash\n";
     $streamidhash = dechex($streamidhash);
     return $streamidhash;
 }
开发者ID:DBezemer,项目名称:server,代码行数:19,代码来源:kAkamaiRtspUrlTokenizer.php

示例8: first

<?php

function first($item)
{
    return $item;
}
function second($item, $item2)
{
    // global $name;
    // echo $name;
    echo $item, $item2;
}
$name = 'Sergey';
$secondName = 'Lunev';
second(first('Hello'), $secondName);
echo "<br>";
echo "<br>";
echo "<br>";
const NAME = "Sergey";
define('SURNAME', 'Lunev');
echo NAME;
echo "<br>";
echo "<br>";
echo "<br>";
echo SURNAME;
开发者ID:varvaraLed,项目名称:epic619-1,代码行数:25,代码来源:functions.php

示例9: format_Time

function format_Time($timeStr, $nType)
{
    $y = '';
    $m = '';
    $d = '';
    $h = '';
    $mi = '';
    $s = '';
    $format_Time = '';
    if (isDate($timeStr) == false) {
        return @$format_Time;
    }
    $y = cStr(year($timeStr));
    $m = cStr(month($timeStr));
    if (len($m) == 1) {
        $m = '0' . $m;
    }
    $d = cStr(day($timeStr));
    //在vb.net里要这样用  D = CStr(CDate(timeStr).Day)
    if (len($d) == 1) {
        $d = '0' . $d;
    }
    $h = cStr(hour($timeStr));
    if (len($h) == 1) {
        $h = '0' . $h;
    }
    $mi = cStr(minute($timeStr));
    if (len($mi) == 1) {
        $mi = '0' . $mi;
    }
    $s = cStr(second($timeStr));
    if (len($s) == 1) {
        $s = '0' . $s;
    }
    switch ($nType) {
        case 1:
            //yyyy-mm-dd hh:mm:ss
            $format_Time = $y . '-' . $m . '-' . $d . ' ' . $h . ':' . $mi . ':' . $s;
            break;
        case 2:
            //yyyy-mm-dd
            $format_Time = $y . '-' . $m . '-' . $d;
            break;
        case 3:
            //hh:mm:ss
            $format_Time = $h . ':' . $mi . ':' . $s;
            break;
        case 4:
            //yyyy年mm月dd日
            $format_Time = $y . '年' . $m . '月' . $d . '日';
            break;
        case 5:
            //yyyymmdd
            $format_Time = $y . $m . $d;
            break;
        case 6:
            //yyyymmddhhmmss
            $format_Time = $y . $m . $d . $h . $mi . $s;
            break;
        case 7:
            //mm-dd
            $format_Time = $m . '-' . $d;
            break;
        case 8:
            //yyyy年mm月dd日
            $format_Time = $y . '年' . $m . '月' . $d . '日' . ' ' . $h . ':' . $mi . ':' . $s;
            break;
        case 9:
            //yyyy年mm月dd日H时mi分S秒 早上
            $format_Time = $y . '年' . $m . '月' . $d . '日' . ' ' . $h . '时' . $mi . '分' . $s . '秒,' . getDayStatus($h, 1);
            break;
        case 10:
            //yyyy年mm月dd日H时
            $format_Time = $y . '年' . $m . '月' . $d . '日' . $h . '时';
            break;
        case 11:
            //yyyy年mm月dd日H时mi分S秒
            $format_Time = $y . '年' . $m . '月' . $d . '日' . ' ' . $h . '时' . $mi . '分' . $s . '秒';
            break;
        case 12:
            //yyyy年mm月dd日H时mi分
            $format_Time = $y . '年' . $m . '月' . $d . '日' . ' ' . $h . '时' . $mi . '分';
            break;
        case 13:
            //yyyy年mm月dd日H时mi分 早上
            $format_Time = $m . '月' . $d . '日' . ' ' . $h . ':' . $mi . ' ' . getDayStatus($h, 0);
            break;
        case 14:
            //yyyy年mm月dd日
            $format_Time = $y . '/' . $m . '/' . $d;
            break;
        case 15:
            //yyyy年mm月 第1周
            $format_Time = $y . '年' . $m . '月 第' . GetCountPage($d, 7) . '周';
    }
    return @$format_Time;
}
开发者ID:313801120,项目名称:AspPhpCms,代码行数:97,代码来源:Time.php


注:本文中的second函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。