本文整理汇总了PHP中D::f方法的典型用法代码示例。如果您正苦于以下问题:PHP D::f方法的具体用法?PHP D::f怎么用?PHP D::f使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类D
的用法示例。
在下文中一共展示了D::f方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: eval
[expect] hey!
[file]
<?php
eval('class InEval { function f() { echo "hey!"; } }');
class A extends InEval
{
}
class B extends A
{
}
class C extends B
{
}
class D extends C
{
function f()
{
return parent::f();
}
}
D::f();
示例2: f
var_dump($c2);
var_dump(isset($c2->prop));
echo "---------- unsetting \$this ------------\n";
class D
{
public function f()
{
echo "Inside " . __METHOD__ . "\n";
var_dump(isset($this));
unset($this);
var_dump(isset($this));
$this->g();
// use $this to call sibling instance method
}
private function g()
{
echo "Inside " . __METHOD__ . "\n";
var_dump(isset($this));
}
}
$d = new D();
$d->f();
echo "---------- unsetting array elements ------------\n";
$a = array(10, 20, "xx" => 30);
print_r($a);
unset($a[1]);
print_r($a);
unset($a[10]);
print_r($a);
unset($a["Xx"]);
print_r($a);
示例3: var_dump
//find user in table
//test if there is at least one such user
$row = Data::getRow("SELECT {$prfx}user.*, {$prfx}contest.settings\r\n FROM {$prfx}session\r\n INNER JOIN {$prfx}user\r\n ON {$prfx}session.user_id={$prfx}user.id\r\n INNER JOIN {$prfx}contest\r\n ON {$prfx}user.contest_id={$prfx}contest.id\r\n WHERE session_id='{$session_id}'");
//test if there is at least one user
var_dump($row);
die;
class D
{
private static $c = 42;
static function f()
{
return D::$c;
}
}
//var_dump(D::$c);
var_dump(D::f());
$s = false;
if ($s === false) {
die('false');
} else {
die('true');
}
die;
$a = array();
var_dump($a[1]);
var_dump(ZIPARCHIVE::ER_EXISTS);
var_dump(ZIPARCHIVE::ER_INCONS);
var_dump(ZIPARCHIVE::ER_INVAL);
var_dump(ZIPARCHIVE::ER_MEMORY);
var_dump(ZIPARCHIVE::ER_NOENT);
var_dump(ZIPARCHIVE::ER_NOZIP);