当前位置: 首页>>代码示例>>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;未经允许,请勿转载。