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


PHP __var_dump函數代碼示例

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


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

示例1: __

function __()
{
    $GLOBALS['a'] = "bug\n";
    array_splice($GLOBALS, 0, count($GLOBALS));
    /* All global variables including $GLOBALS are removed */
    @__var_dump($GLOBALS['a']);
}
開發者ID:dw4dev,項目名稱:Phalanger,代碼行數:7,代碼來源:bug31158.php

示例2: f5

function f5()
{
    $c = extract(array("111" => 1), EXTR_PREFIX_ALL, "prefix");
    echo "Extracted:";
    __var_dump($c);
    __var_dump(get_defined_vars());
}
開發者ID:dw4dev,項目名稱:Phalanger,代碼行數:7,代碼來源:bug29038.php

示例3: dump

function dump($elems)
{
    foreach ($elems as $elem) {
        __var_dump($elem->nodeName);
        dump($elem->childNodes);
    }
}
開發者ID:dw4dev,項目名稱:Phalanger,代碼行數:7,代碼來源:dom002.php

示例4: test

function test($v)
{
    //echo var_export($v, true) . "\n";
    __var_dump($v);
    echo "{$v}\n";
    //print_r($v);
    echo "\n------\n";
}
開發者ID:dw4dev,項目名稱:Phalanger,代碼行數:8,代碼來源:bug24640.php

示例5: test

 function test($x = Foo::HUN)
 {
     static $arr2 = array(TEN => 'ten');
     static $arr = array(Foo::HUN => 'ten');
     __var_dump($arr);
     __var_dump($arr2);
     __var_dump($x);
 }
開發者ID:dw4dev,項目名稱:Phalanger,代碼行數:8,代碼來源:bug23384.php

示例6: g7

function g7()
{
    $a = 1;
    $b = 2;
    f($a = $a =& $b);
    u($a = $a =& $b);
    __var_dump($a, $b);
}
開發者ID:dw4dev,項目名稱:Phalanger,代碼行數:8,代碼來源:assign_in_call.php

示例7: does_not_work

function does_not_work()
{
    global $data;
    // Remove this line to make array_multisort() work
    $data = array('first', 'fifth', 'second', 'forth', 'third');
    $sort = array(1, 5, 2, 4, 3);
    array_multisort($sort, $data);
    __var_dump($data);
}
開發者ID:dw4dev,項目名稱:Phalanger,代碼行數:9,代碼來源:bug25359.php

示例8: __construct

 function __construct()
 {
     $this->name = 'init';
     $this->other = 'other';
     __var_dump($this);
     parent::__construct();
     echo __CLASS__ . "::" . __FUNCTION__ . "\n";
     $this->name = 'derived';
     __var_dump($this);
 }
開發者ID:dw4dev,項目名稱:Phalanger,代碼行數:10,代碼來源:ctor_dtor_inheritance.php

示例9: extract_test

function extract_test($array, $type, $prefix)
{
    ${"a d"} = "hello";
    ${0} = "hello";
    ${""} = "hello";
    $ad = null;
    ${"000g"} = "hello";
    $prefix_ad = "hello";
    __var_dump(extract($array, $type, $prefix));
    unset($array, $type, $prefix);
    $vars = get_defined_vars();
    ksort($vars, SORT_STRING);
    __var_dump($vars);
}
開發者ID:dw4dev,項目名稱:Phalanger,代碼行數:14,代碼來源:extract.php

示例10: t3

function t3()
{
    $a = array('foo' => 'aaa');
    // refcount($a) = 1
    // refcount($a['foo']) = 1
    $b =& $a;
    // refcount($a) = 2
    // is_ref($a) = true
    // refcount($a['foo']) = 1
    unset($b);
    // refcount($a) = 1
    // is_ref($a) = true
    // refcount($a['foo']) = 1
    __var_dump($a);
    extract($a, EXTR_REFS);
    $foo = 'noo';
    __var_dump($a);
}
開發者ID:dw4dev,項目名稱:Phalanger,代碼行數:18,代碼來源:bug29493.php

示例11: array

[expect php]
[file]
<?php 
require 'Phalanger.inc';
/* This works */
$f = array('7' => 0);
__var_dump($f);
__var_dump(array_key_exists(7, $f));
__var_dump(array_key_exists('7', $f));
print "----------\n";
/* This doesn't */
$f = array_flip(array('7'));
__var_dump($f);
__var_dump(array_key_exists(7, $f));
__var_dump(array_key_exists('7', $f));
開發者ID:dw4dev,項目名稱:Phalanger,代碼行數:15,代碼來源:bug24652.php

示例12: __var_dump

[expect php]
[file]
<?php 
require 'Phalanger.inc';
__var_dump(strripos("test test string", "test"));
__var_dump(strripos("test string sTring", "string"));
__var_dump(strripos("test strip string strand", "str"));
__var_dump(strripos("I am what I am and that's all what I am", "am", -3));
__var_dump(strripos("test string", "g"));
__var_dump(strripos("te" . chr(0) . "st", chr(0)));
__var_dump(strripos("tEst", "test"));
__var_dump(strripos("teSt", "test"));
__var_dump(@strripos("foo", "f", 1));
__var_dump(@strripos("", ""));
__var_dump(@strripos("a", ""));
__var_dump(@strripos("", "a"));
__var_dump(@strripos("\\\\a", "\\a"));
開發者ID:dw4dev,項目名稱:Phalanger,代碼行數:17,代碼來源:strripos.php

示例13: __var_dump

__var_dump(str_word_count($str, 123));
__var_dump(str_word_count($str, -1));
__var_dump(str_word_count($str, 99999999999999999));
// invalid input: __var_dump(str_word_count($str, array()));
// invalid input: __var_dump(str_word_count($str, $b));
__var_dump($str);
$str2 = "F0o B4r 1s bar foo";
__var_dump(str_word_count($str2, NULL, "04"));
__var_dump(str_word_count($str2, NULL, "01"));
__var_dump(str_word_count($str2, NULL, "014"));
// invalid input: __var_dump(str_word_count($str2, NULL, array()));
// invalid input: __var_dump(str_word_count($str2, NULL, new stdClass));
__var_dump(str_word_count($str2, NULL, ""));
__var_dump(str_word_count($str2, 1, "04"));
__var_dump(str_word_count($str2, 1, "01"));
__var_dump(str_word_count($str2, 1, "014"));
// invalid input: __var_dump(str_word_count($str2, 1, array()));
// invalid input: __var_dump(str_word_count($str2, 1, new stdClass));
__var_dump(str_word_count($str2, 1, ""));
__var_dump(str_word_count($str2, 2, "04"));
__var_dump(str_word_count($str2, 2, "01"));
__var_dump(str_word_count($str2, 2, "014"));
// invalid input: __var_dump(str_word_count($str2, 2, array()));
// invalid input: __var_dump(str_word_count($str2, 2, new stdClass));
__var_dump(str_word_count($str2, 2, ""));
__var_dump(str_word_count("foo'0 bar-0var", 2, "0"));
__var_dump(str_word_count("'foo'", 2));
__var_dump(str_word_count("'foo'", 2, "'"));
__var_dump(str_word_count("-foo-", 2));
__var_dump(str_word_count("-foo-", 2, "-"));
開發者ID:dw4dev,項目名稱:Phalanger,代碼行數:30,代碼來源:str_word_count.php

示例14: __var_dump

[expect php]
[file]
<?php 
include 'Phalanger.inc';
__var_dump(number_format(0.0001, 1));
__var_dump(number_format(0.0001, 0));
開發者ID:dw4dev,項目名稱:Phalanger,代碼行數:6,代碼來源:bug22187.php

示例15: array

[expect php]
[file]
<?php 
include 'Phalanger.inc';
$arrays = array(array(), array(0), array(1), array(-1), array(0, 2), array(1, 2, 3), array(1 => 0), array(2 => 1), array(3 => -1), array(1 => 0, 2 => 2), array(1 => 1, 2 => 2, 3 => 3), array(0 => 0, 3 => 2), array(1 => 1, 5 => 2, 8 => 3), array(1, 2), array(0, 1, 2), array(1, 2, 3), array(0, 1, 2, 3), array(1, 2, 3, 4), array(0, 1, 2, 3, 4), array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10), array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10), array("a" => 1), array("b" => 1, "c" => 2), array("p" => 1, "q" => 2, "r" => 3, "s" => 4, "u" => 5, "v" => 6), array("a" => "A"), array("p" => "A", "q" => "B", "r" => "C", "s" => "D", "u" => "E", "v" => "F"));
foreach ($arrays as $item) {
    echo "===========================================\n";
    __var_dump($item);
    echo "-------------------------------------------\n";
    for ($i = 0; $i < sizeof($item) + 1; $i++) {
        echo "[{$i}]\n";
        __var_dump(@array_chunk($item, $i));
        __var_dump(@array_chunk($item, $i, TRUE));
        __var_dump(@array_chunk($item, $i, FALSE));
        echo "\n";
    }
    echo "\n";
}
echo "end\n";
開發者ID:dw4dev,項目名稱:Phalanger,代碼行數:19,代碼來源:array_chunk.php


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