PHP 4

[ PHP ]

(!!! Teleportom!!!)
: fopen, msql_num_fields, socket_write ...


7.

PHP

PHP dollar . .

, PHP. , ( ) , . :

'[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*'

: - a-z, A-Z ASCII- 127 255 (0x7f-0xff).

$var = "Bob";
$Var = "Joe";
echo "$var, $Var";      //  "Bob, Joe"

$4site = 'not yet';     // ;   
$_4site = 'not yet';    // ;    /underscore
$täyte = 'mansikka';    // ; 'ä'  ASCII 228.

PHP 3 . , , . , , , . . .

PHP 4 : . , ( , " " " ") . , . , ; , . .

(&) ( ). , 'My name is Bob' :

<?php
$foo = 'Bob';              //  'Bob'  $foo
$bar = &$foo;              //   $foo  $bar
$bar = "My name is $bar";  //  $bar
echo $bar;
echo $foo;                 // $foo  
?>

, .

<?php
$foo = 25;
$bar = &$foo;      //  
$bar = &(24 * 7);  // ;    

function test()
{
   return 25;
}

$bar = &test();    // 
?>


: 3119 .

: - |  -