الفصل السادس
$b=5;
$a =& $b; $c=9;
// $a and $b point to the same variable. function foo (&$var) {
}
$var++;
foo ($c);
// will make $c to be 10
echo "variable1 a = ".$a; echo "<BR>variable2 b = ".$b;
echo "<BR>variable3 c = ".$c;
?>
http://localhost/test/p7/new2 - Microso DX
File Edit View Favorites Tools Help
Back Forward Stop Refresh Home
Address
http://localhost/test/p7/new2 Go
Links
variable 1 a5 variable2b=5
variable 3 c = 10
1 Done
Local intranet
متنوعات
النتيجة
لتعريف الثوابت والحصول على ربط نص :
<?php
// Example Defining Constants
define ("CONSTANT", "Hello world."); echo CONSTANT; // outputs "Hello world." Echo "<BR> EVAL EXAMPLE <BR>";
// Example 1. Eval() example - simple text merge $string = 'cup';
$name = 'coffee';
$str = 'This is a $string with my $name in it.<br>'; echo $str;
۱۹۸
ص ١٩٨