男女疯狂一边摸一边做羞羞视频|啊好深好硬快点用力别停动态图|亚洲一区无码中文字幕|特级无码毛片免费视频播放▽|久久狠狠躁免费观看|国内精品久久久久久网站

print

(PHP 4, PHP 5, PHP 7, PHP 8)

print輸出字符串

說(shuō)明

print(string $arg): int

輸出 arg。

print 實(shí)際上不是函數(而是語(yǔ)言結構),所以可以不用圓括號包圍參數列表。

echo 最主要的區別: print 僅支持一個(gè)參數,并總是返回 1。

參數

arg

輸入數據。

返回值

總是返回 1。

范例

示例 #1 print 范例

<?php
print("Hello World");

print 
"print() also works without parentheses.";

print 
"This spans
multiple lines. The newlines will be
output as well"
;

print 
"This spans\nmultiple lines. The newlines will be\noutput as well.";

print 
"escaping characters is done \"Like this\".";

// 可以在打印語(yǔ)句中使用變量
$foo "foobar";
$bar "barbaz";

print 
"foo is $foo"// foo is foobar

// 也可以使用數組
$bar = array("value" => "foo");

print 
"this is {$bar['value']} !"// this is foo !

// 使用單引號將打印變量名,而不是變量的值
print 'foo is $foo'// foo is $foo

// 如果沒(méi)有使用任何其他字符,可以?xún)H打印變量
print $foo;          // foobar

print <<<END
This uses the "here document" syntax to output
multiple lines with 
$variable interpolation. Note
that the here document terminator must appear on a
line with just a semicolon no extra whitespace!
END;
?>

注釋

注意: 因為是一個(gè)語(yǔ)言構造器而不是一個(gè)函數,不能被 可變函數 調用。

參見(jiàn)

男女疯狂一边摸一边做羞羞视频|啊好深好硬快点用力别停动态图|亚洲一区无码中文字幕|特级无码毛片免费视频播放▽|久久狠狠躁免费观看|国内精品久久久久久网站