本文整理汇总了PHP中dummy函数的典型用法代码示例。如果您正苦于以下问题:PHP dummy函数的具体用法?PHP dummy怎么用?PHP dummy使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了dummy函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: foo
function foo($a)
{
try {
dummy("try");
return $a;
} catch (Exception $e) {
throw $e;
} finally {
dummy("finally");
return "finally";
}
return "end";
}
示例2: dummy
src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="
data-src="<?php
dummy("image/!author@32x,1:1");
?>
"
alt="Image description" />
<figcaption><?php
dummy("text@author");
?>
</figcaption>
</figure>
</div>
<div class="teaser-summary">
<a href="tpl-article.php"><p><?php
dummy("text@teaser");
?>
</p></a>
</div>
</div>
</article>
</li>
<?php
}
?>
</ul>
<div class="col-md-12">
<div class="deck-footer ">
<button class="btn btn-sm">Show more</button>
示例3: sut_Series
function sut_Series()
{
global $campi, $sep;
$ret = dummy(1);
return $ret;
}
示例4: dummy
?>
<figure>
<a href="tpl-article.php"><img class="b-lazy"
src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="
data-src="<?php
dummy("image@250x,2:1");
?>
"
data-src-phone="<?php
dummy("image@450x,2:1");
?>
"
alt="Image description" /></a>
</figure>
<?php
}
?>
<a class="header" href="tpl-article.php"><?php
dummy("text@headline");
?>
</a>
</li>
<?php
}
?>
</ul>
<div class="embed-footer">
<button class="btn btn-sm">See all</button>
<button class="btn btn-sm push-right">Follow theme</button>
</div>
</aside>
示例5: while
<? while (dumb_luck("5-10")): ?>
<? if (dumb_luck("50%")): ?>
<li><a href="#"><? dummy("text@headline") ?></a></li>
<? else: ?>
<li><? dummy("text@headline") ?></li>
<? endif ?>
<? endwhile ?>
</ul>
</pre>
</div>
<p>Though the exact number will change every time you reload the page, roughly half of the items in the following list will be wrapped in a link. It's a very basic example, but one that uses all the core features of Dummy.</p>
<div class="snippet text-snippet">
<ul><? while (dumb_luck("5-10")): ?><? if (dumb_luck("50%")): ?><li><a href="#"><? dummy("text@headline") ?></a></li><? else: ?><li><? dummy("text@headline") ?></li><? endif ?><? endwhile ?></ul>
</div>
<p>When used together, asset generation, probability, and loop range logic can create highly variable layouts with very little effort in code. This makes it possible to quickly test how the change of an item, attribute or parameter in one place propagates on a range of different scales. It can provide new insights on the performance or design efficacy of your work at the earliest stages of a project, and every time you reload the page.</p>
<div class="snippet code-snippet">
<pre class="brush: php">
<h1><? dummy("text@headline") ?></h1>
<? if (dumb_luck("25%")): ?>
<p class="intro"><? dummy("text@long-teaser") ?></p>
<? endif ?>
<p>By <? dummy("text@author") ?> | Published <? dummy("text@date") ?></p>
<? while (dumb_luck("3-8")): ?>
<p><? dummy("text@paragraph") ?></p>
<? endwhile ?>
示例6: dummy
.teaser-wide-xs <small>Remove gutter on mobile</small>
</h2>
<div class="demo">
<p>The <code>.teaser-wide-xs</code> class removes gutter on mobile devices so that content will touch edges of the screen</p>
</div>
<p><strong>Example:</strong></p>
<ul class="flex-row">
<li class="teaser font-5 mb-20 teaser-topstory teaser-wide-xs ">
<figure class="teaser-img">
<a href="tpl-article.php"><img class="b-lazy"
src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="
data-src="<?php
dummy("image@940x,2:1");
?>
"
alt="Image description" /></a>
</figure>
<div class="teaser-body ">
<div class="teaser-byline">
<span class="teaser-source"><a href="#">Politiko</a></span> <time datetime="2015-08-18 14:20">14:11</time>
</div>
<h1 class="header">
<a href="tpl-article.php">Facebook græd og jublede - Instagram eksploderede i raseri </a></h1>
<div class="teaser-summary">
<a href="tpl-article.php"><p>Norwegian sender ifølge check-in.dk 800 kabineansatte hjem fra onsdag morgen for at forberede sig på pilotstrejke.</p></a>
示例7: dummy_request_uri
function dummy_request_uri()
{
global $HTTP_GET_VARS;
if (@phpversion() < '4.1.0') {
$_GET = $HTTP_GET_VARS;
}
$count_vars = 0;
//INITIALIZE $dummy_request_uri
settype($dummy_request_uri, "string");
foreach ($_GET as $key => $value) {
if ($count_vars > 0) {
$dummy_request_uri .= "&";
}
$dummy_request_uri .= dummy(str_replace(array("--", "'", "<", ">", "\\/"), "", $key)) . "=" . dummy(str_replace(array("--", "'", "<", ">"), "", $value));
$count_vars++;
}
return DEFINED_SCRIPT_FILENAME . "?" . $dummy_request_uri;
}
示例8: dummy
}
?>
</ul>
<div class="deck-footer">
<button class="btn btn-sm">Show more</button>
</div>
</aside>
</li>
<li class="flex-item col-md-12 col-sm-6 col-xs-12 bl-sm">
<aside class="box ">
<h2 class="box-title box-border">
Berlingske barometer.
<small><?php
dummy("text@short-teaser");
?>
</small>
</h2>
TBA
</aside>
</li>
</ul>
</li>
</ul>
示例9: dummy
<?php
function dummy($msg)
{
var_dump($msg);
}
try {
try {
var_dump("try");
return;
} catch (Exception $e) {
dummy("catch");
throw $e;
} finally {
dummy("finally");
}
} catch (Exception $e) {
dummy("catch2");
} finally {
dummy("finally2");
}
var_dump("end");
示例10: dummy
function dummy($client)
{
$results = $client->FEDummy();
printf("appserver status: %s\ndbserver status: %s\nauthserver status: %s\n", $results->FEDummyResult->appserver, $results->FEDummyResult->dbserver, $results->FEDummyResult->authserver);
if (is_soap_fault($results)) {
printf("Fault: %s\nFaultString: %s\n", $results->faultcode, $results->faultstring);
exit(1);
}
return;
}
#==============================================================================
if (!file_exists(WSDL)) {
exit("Failed to open " . WSDL . "\n");
}
if (!file_exists(TA)) {
exit("Failed to open " . TA . "\n");
}
$client = new SoapClient(WSDL, array('soap_version' => SOAP_1_2, 'location' => WSFEURL, 'exceptions' => 0, 'trace' => 1));
# needed by getLastRequestHeaders and others
$TA = simplexml_load_file(TA);
$token = $TA->credentials->token;
$sign = $TA->credentials->sign;
dummy($client);
$QTY = RecuperaQTY($client, $token, $sign, CUIT);
printf("QTY: %s\n", $QTY);
$LastID = UltNro($client, $token, $sign, CUIT);
printf("LastID: %s\n", $LastID);
$LastCBTE = RecuperaLastCMP($client, $token, $sign, CUIT, 1, 1);
printf("LastCBTE: %s\n", $LastCBTE);
$CAE = Aut($client, $token, $sign, CUIT, $LastID + 1, $LastCBTE + 1);
printf("CAE: %s\n", $CAE);
示例11: dummy
<div class="col-md-12 col-sm-8 col-xs-6">
<img class="b-lazy"
src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="
data-src="<?php
dummy("image@940x,1:1");
?>
"
data-src-small="<?php
dummy("image@300x,1:1");
?>
"
data-src-medium="<?php
dummy("image@400x,2:1");
?>
"
alt="Image description" />
</div>
</div>
</div>
示例12: dummy
<?php
$a = 1;
$b = 1;
$c = 1;
function dummy($param)
{
return $param + 1;
}
$foo = dummy($a, dummy($b), dummy($c));
$foo = dummy($foo);
$foo = $foo;
$p = put_string($foo, $a, $b, $c, "\n");
$p = put_string("Jou\n");
示例13: dummy_image
}
dummy_image($path, $params, $internalcall ? 'FILE' : 'URI');
} else {
dummy_text($cmdraw, $params);
}
}
}
// Check for the presense of a direct call
// If that is the case, we call dummy() with the query part
if (basename(__FILE__) === basename($_SERVER['SCRIPT_FILENAME'])) {
$qs = $_SERVER['QUERY_STRING'];
if (getenv('DUMMYURL')) {
$qs = preg_replace('/^dummyurl=&/', '', $qs);
}
ob_start();
dummy($qs, true);
$content = ob_get_contents();
ob_end_clean();
// figure out the image type
$imgtype = exif_imagetype($content);
if (!$imgtype) {
echo "Could not open image {$content}";
exit;
}
$contenttype = image_type_to_mime_type($imgtype);
header("Content-type: " . $contenttype);
readfile($content);
exit;
}
// SO ENDS THE DUMMY CORE
// If Dummy had an expansion pack, this would be it.
示例14: dummy
dummy("text@number");
?>
</span>
</a>
</li>
<?php
}
?>
</ul>
</aside>
</div>
<div class="col-sm-6 col-md-12 col-xs-12">
<div class="banner">
<?php
dummy("ad@300x250-2");
?>
</div>
</div>
</div>
</li>
<!-- right col -->
</ul>
</div>
</div>
示例15: dummy
<?php
class ZException extends Exception
{
}
function dummy($query)
{
try {
switch ($query) {
case 1:
break;
case 2:
break;
default:
throw new Exception('exception');
}
} catch (ZException $e) {
return NULL;
}
}
try {
dummy(0);
} catch (Exception $e) {
echo $e->getMessage();
}