. .

POSIX PHP

» PHP 5 » POSIX PHP

, - . : is.

, is , . :

Love is
List
Is worth nothing

POSIX ereg() eregi() - 15.1.

15.1. POSIX .

‹html›
‹head›
‹title› POSIX ‹/title›
‹/head›
‹body›
‹?php
if ( ereg ("is", "Love is") )
{
  echo " ";
}
else
{
  echo " ";
}
?›
‹/body›
‹/html›

, TRUE, - FALSE. , Love is is.

ereg() ( 7). ( 15.2).

15.2. POSIX .

‹html›
‹head›
‹title› POSIX ‹/title›
‹/head›
‹body›
‹?php
if ( ereg("is", "List", $regs) )
{
  echo " ";
}
else
{
  echo " ";
}
echo "‹br›";
print_r ($regs);
?›
‹/body›
‹/html›

0 is. , , . .

, , ( 15.3).

15.3. .

‹html›
‹head›
‹title› ‹/title›
‹/head›
‹body›
‹?php
if ( ereg("is", "Is worth nothing") )
{
  echo " ";
}
else
{
  echo " ";
}
?›
‹/body›
‹/html›

Is worth nothing . , eregi() - 15.4.

15.4. POSIX .

‹html›
‹head›
‹title› P0SIX ‹/title›
‹/head›
‹body›
‹?php
if ( eregi("is", "Is worth nothing") )
{
  echo " ";
}
else
{
  echo " ";
}
?›
‹/body›
‹/html›

!