cvs: phpdoc /cs/functions funchand.xml
| From: | Roman Neuhauser | Date: | Fri, 26 Jan 2001 11:27:41 +0000 |
| Subject: | cvs: phpdoc /cs/functions funchand.xml | ||
| Groups: | php.doc | ||
| Request: | Send a blank email to phpdoc+get-969333970@lists.php.net to get a copy of this message | ||
cynic Fri Jan 26 03:27:41 2001 EDT
Added files:
/phpdoc/cs/functions funchand.xml
Log:
translated
Index: phpdoc/cs/functions/funchand.xml +++ phpdoc/cs/functions/funchand.xml <reference id="ref.funchand"> <title>Funkce pro práci s funkcemi</title> <titleabbrev>Funkce</titleabbrev> <partintro> <para> V¹echny tyto funkce pokrývají rùzné aspekty práce s funkcemi. </para> </partintro> <refentry id="function.call-user-func"> <refnamediv> <refname>call_user_func</refname> <refpurpose>Zavolat u¾ivatelskou funkci urèenou prvním argumentem</refpurpose> </refnamediv> <refsect1> <title>Popis</title> <funcsynopsis> <funcprototype> <funcdef>mixed <function>call_user_func</function> </funcdef> <paramdef>string <parameter>function_name</parameter> </paramdef> <paramdef>mixed <parameter><optional>parameter</optional></parameter> </paramdef> <paramdef>mixed <parameter><optional>...</optional></parameter> </paramdef> </funcprototype> </funcsynopsis> <para> Zavolá u¾ivatelsky definouvanou funkci urèenou argumentem <parameter>function_name</parameter>. Zva¾te následující ukázku: <informalexample> <programlisting role="php"> function barber ($type) { print "You wanted a $type haircut, no problem"; } call_user_func ('barber', "mushroom"); call_user_func ('barber', "shave"); </programlisting> </informalexample> </para> </refsect1> </refentry> <refentry id="function.create-function"> <refnamediv> <refname>create_function</refname> <refpurpose>Vytvoøit anonymní (lambda-style) funkci</refpurpose> </refnamediv> <refsect1> <title>Popis</title> <funcsynopsis> <funcprototype> <funcdef>string <function>create_function</function></funcdef> <paramdef>string <parameter>args</parameter></paramdef> <paramdef>string <parameter>code</parameter></paramdef> </funcprototype> </funcsynopsis> <para> Z pøedaných argumentù vytvoøí anonymní funkci, a vrátí unikátní název této funkce. <parameter>args</parameter> se obvykle pøedává jako string v jednoduchých uvozovkách, a doporuèujeme to i pro <parameter>code</parameter>. Dùvodem pro jednoduché uvozovky je ochrana názvù promìnných pøed parsováním, pokud pou¾ijete dvojité uvozovky, budete muset oescapovat názvy promìnných, napø. <literal>\$avar</literal>. </para> <para> Tuto funkci mù¾ete (napøíklad) pou¾ít k vytvoøení funkce z dat shromá¾dìných za bìhu programu: <example> <title> Vytvoøení anonymní funkce pomocí <function>create_function</function> </title> <programlisting role="php"> $newfunc = create_function('$a,$b','return "ln($a) + ln($b) = ".log($a * $b);'); echo "New anonymous function: $newfunc\n"; echo $newfunc(2,M_E)."\n"; // výstup // New anonymous function: lambda_1 // ln(2) + ln(2.718281828459) = 1.6931471805599 </programlisting> </example> Nebo tøeba k vytvoøení obecného handleru, který na pøedané argumenty aplikuje sadu operací: <example> <title> Vytvoøení obecné zpracující funkce pomocí <function>create_function</function> </title> <programlisting role="php"> function process($var1, $var2, $farr) { for ($f=0; $f < count($farr); $f++) echo $farr[$f]($var1,$var2)."\n"; } // create a bunch of math functions $f1 = 'if ($a >=0) {return "b*a^2 = ".$b*sqrt($a);} else {return false;}'; $f2 = "return \"min(b^2+a, a^2,b) = \".min(\$a*\$a+\$b,\$b*\$b+\$a);"; $f3 = 'if ($a > 0 && $b != 0) {return "ln(a)/b = ".log($a)/$b;} else {return false;}'; $farr = array( create_function('$x,$y', 'return "some trig: ".(sin($x) + $x*cos($y));'), create_function('$x,$y', 'return "a hypotenuse: ".sqrt($x*$x + $y*$y);'), create_function('$a,$b', $f1), create_function('$a,$b', $f2), create_function('$a,$b', $f3) ); echo "\nUsing the first array of anonymous functions\n"; echo "parameters: 2.3445, M_PI\n"; process(2.3445, M_PI, $farr); // now make a bunch of string processing functions $garr = array( create_function('$b,$a','if (strncmp($a,$b,3) == 0) return "** \"$a\" '. 'and \"$b\"\n** Look the same to me! (looking at the first 3 chars)";'), create_function('$a,$b','; return "CRCs: ".crc32($a)." , ".crc32(b);'), create_function('$a,$b','; return "similar(a,b) = ".similar_text($a,$b,&$p)."($p%)";') ); echo "\nUsing the second array of anonymous functions\n"; process("Twas brilling and the slithy toves", "Twas the night", $garr); </programlisting> </example> kdy¾ spustíte vý¹euvedený kód, výstup bude: <informalexample> <programlisting> Using the first array of anonymous functions parameters: 2.3445, M_PI some trig: -1.6291725057799 a hypotenuse: 3.9199852871011 b*a^2 = 4.8103313314525 min(b^2+a, a^2,b) = 8.6382729035898 ln(a/b) = 0.27122299212594 Using the second array of anonymous functions ** "Twas the night" and "Twas brilling and the slithy toves" ** Look the same to me! (looking at the first 3 chars) CRCs: -725381282 , 1908338681 similar(a,b) = 11(45.833333333333%) </programlisting> </informalexample> Ale zøejmì nejbì¾nìj¹ím vyu¾itím lambda-style (anonymních) funkcí je tvorba callback funkcí, napø. pro pou¾ití v <function>array_walk</function> nebo <function>usort</function> <example> <title>Vyu¾ití anonymních funkcí jako callback funkcí</title> <programlisting role="php"> $av = array("the ","a ","that ","this "); array_walk($av, create_function('&$v,$k','$v = $v."mango";')); print_r($av); // for PHP 3 use var_dump() // outputs: // Array // ( // [0] => the mango // [1] => a mango // [2] => that mango // [3] => this mango // ) // an array of strings ordered from shorter to longer $sv = array("small","larger","a big string","it is a string thing"); print_r($sv); // outputs: // Array // ( // [0] => small // [1] => larger // [2] => a big string // [3] => it is a string thing // ) // sort it from longer to shorter usort($sv, create_function('$a,$b','return strlen($b) - strlen($a);')); print_r($sv); // outputs: // Array // ( // [0] => it is a string thing // [1] => a big string // [2] => larger // [3] => small // ) </programlisting> </example> </para> </refsect1> </refentry> <refentry id="function.func-get-arg"> <refnamediv> <refname>func_get_arg</refname> <refpurpose>Vrátit polo¾ku ze seznamu argumentù</refpurpose> </refnamediv> <refsect1> <title>Popis</title> <funcsynopsis> <funcprototype> <funcdef>mixed <function>func_get_arg</function></funcdef> <paramdef>int <parameter>arg_num</parameter></paramdef> </funcprototype> </funcsynopsis> <simpara> Vrací argument, který je na <parameter>arg_num</parameter>-té pozici v seznamu argumentù u¾iavtelsky definované funkce. Argumenty funkcí se poèítají od nuly. <function>func_get_arg</function> pøi volání mimo definici funkce generuje varování. </simpara> <simpara> Pokud je <parameter>arg_num</parameter> vìt¹í ne¾ poèet skuteènì pøedaných argumentù, vygeneruje varování a vrátí <literal>false</literal>. </simpara> <para> <informalexample> <programlisting role="php"> <?php function foo() { $numargs = func_num_args(); echo "Number of arguments: $numargs<br>\n"; if ($numargs >= 2) { echo "Second argument is: " . func_get_arg (1) . "<br>\n"; } } foo (1, 2, 3); ?> </programlisting> </informalexample> </para> <simpara> <function>func_get_arg</function> se dá pou¾ít ve spojení s <function>func_num_args</function> a <function>func_get_args</function> k tvorbì u¾ivatelsky definovaných funkcí, které pøijímají promìnný poèet argumentù. </simpara> <note> <simpara> Tato funkce byla pøidána v PHP 4. </simpara> </note> </refsect1> </refentry> <refentry id="function.func-get-args"> <refnamediv> <refname>func_get_args</refname> <refpurpose>Vrátit pole obsahující seznam argumentù funkce</refpurpose> </refnamediv> <refsect1> <title>Popis</title> <funcsynopsis> <funcprototype> <funcdef>array <function>func_get_args</function></funcdef> <paramdef>void <parameter></parameter></paramdef> </funcprototype> </funcsynopsis> <simpara> Vrací pole, jeho¾ ka¾dý prvek je odpovídající polo¾kou seznamu argumentù souèasné u¾ivatelsky definované funkce. <function>func_get_args</function> pøi volání mimo definici funkce generuje varování. </simpara> <para> <informalexample> <programlisting role="php"> <?php function foo() { $numargs = func_num_args(); echo "Number of arguments: $numargs<br>\n"; if ($numargs >= 2) { echo "Second argument is: " . func_get_arg (1) . "<br>\n"; } $arg_list = func_get_args(); for ($i = 0; $i < $numargs; $i++) { echo "Argument $i is: " . $arg_list[$i] . "<br>\n"; } } foo (1, 2, 3); ?> </programlisting> </informalexample> </para> <simpara> <function>func_get_args</function> se dá pou¾ít ve spojení s <function>func_num_args</function> a <function>func_get_arg</function> k tvorbì u¾ivatelsky definovaných funkcí, které pøijímají promìnny poèet argumentù. </simpara> <note> <simpara> Tato funkce byla pøidána v PHP 4. </simpara> </note> </refsect1> </refentry> <refentry id="function.func-num-args"> <refnamediv> <refname>func_num_args</refname> <refpurpose>Vrátit poèet argumentù pøedaných funkci</refpurpose> </refnamediv> <refsect1> <title>Popis</title> <funcsynopsis> <funcprototype> <funcdef>int <function>func_num_args</function></funcdef> <paramdef>void <parameter></parameter></paramdef> </funcprototype> </funcsynopsis> <simpara> Vrací poèet argumentù pøedaných souèasné u¾ivatelsky definované funkci. <function>Func_num_args</function> pri volání mimo definici funkce generuje warning. definition. </simpara> <para> <informalexample> <programlisting role="php"> <?php function foo() { $numargs = func_num_args(); echo "Number of arguments: $numargs\n"; } foo (1, 2, 3); // Prints 'Number of arguments: 3' ?> </programlisting> </informalexample> </para> <simpara> <function>func_num_args</function> se dá pou¾it ve spojení s <function>func_get_arg</function> a <function>func_get_args</function> k tvorbì u¾ivatelsky definovaných funkcí, které pøijímají promìnný poèet argumentù. </simpara> <note> <simpara> Tato funkce byla pøidána v PHP 4. </simpara> </note> </refsect1> </refentry> <refentry id="function.function-exists"> <refnamediv> <refname>function_exists</refname> <refpurpose>Vrátit true, pokud je daná funkce definována</refpurpose> </refnamediv> <refsect1> <title>Popis</title> <funcsynopsis> <funcprototype> <funcdef>bool <function>function_exists</function></funcdef> <paramdef>string <parameter>function_name</parameter></paramdef> </funcprototype> </funcsynopsis> <para> Ovìøí pøítomnost funkce <parameter>function_name</parameter> v seznamu definovaných funkcí. Pokud daná funkce existuje, vrací <literal>true</literal>, jinak <literal>false</literal>. <informalexample> <programlisting role="php"> if (function_exists('imap_open')) { echo "IMAP functions are available.<br>\n"; } else { echo "IMAP functions are not available.<br>\n"; } </programlisting> </informalexample> Pozn.: název funkce mù¾e existovat i v pøípadì, ¾e je samotná funkce nepou¾itelná kvùli konfiguraci nebo volbám zadaným pøi kompilaci. </para> <para> Viz také <function>method_exists</function>. </para> </refsect1> </refentry> <refentry id="function.register-shutdown-function"> <refnamediv> <refname>register_shutdown_function</refname> <refpurpose>Zaregistrovat funkci pro provedení pøi ukonèení bìhu</refpurpose> </refnamediv> <refsect1> <title>Popis</title> <funcsynopsis> <funcprototype> <funcdef>int <function>register_shutdown_function</function> </funcdef> <paramdef>string <parameter>func</parameter></paramdef> </funcprototype> </funcsynopsis> <simpara> Zaregistruje funkci udanou v <parameter>func</parameter> pro provedení po dokonèení bìhu skriptu. </simpara> <para> Bì¾né problémy: </para> <simpara> Jeliko¾ tato funkce nemù¾e poslat browseru ¾ádný výstup, nebudete ji moci debugovat pomocí pøíkazù jako <function>print</function> nebo <function>echo</function>. </simpara> </refsect1> </refentry> </reference> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t sgml-parent-document:nil sgml-default-dtd-file:"../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: -->
Index: phpdoc/cs/functions/funchand.xml +++ phpdoc/cs/functions/funchand.xml <reference id="ref.funchand"> <title>Funkce pro práci s funkcemi</title> <titleabbrev>Funkce</titleabbrev> <partintro> <para> V¹echny tyto funkce pokrývají rùzné aspekty práce s funkcemi. </para> </partintro> <refentry id="function.call-user-func"> <refnamediv> <refname>call_user_func</refname> <refpurpose>Zavolat u¾ivatelskou funkci urèenou prvním argumentem</refpurpose> </refnamediv> <refsect1> <title>Popis</title> <funcsynopsis> <funcprototype> <funcdef>mixed <function>call_user_func</function> </funcdef> <paramdef>string <parameter>function_name</parameter> </paramdef> <paramdef>mixed <parameter><optional>parameter</optional></parameter> </paramdef> <paramdef>mixed <parameter><optional>...</optional></parameter> </paramdef> </funcprototype> </funcsynopsis> <para> Zavolá u¾ivatelsky definouvanou funkci urèenou argumentem <parameter>function_name</parameter>. Zva¾te následující ukázku: <informalexample> <programlisting role="php"> function barber ($type) { print "You wanted a $type haircut, no problem"; } call_user_func ('barber', "mushroom"); call_user_func ('barber', "shave"); </programlisting> </informalexample> </para> </refsect1> </refentry> <refentry id="function.create-function"> <refnamediv> <refname>create_function</refname> <refpurpose>Vytvoøit anonymní (lambda-style) funkci</refpurpose> </refnamediv> <refsect1> <title>Popis</title> <funcsynopsis> <funcprototype> <funcdef>string <function>create_function</function></funcdef> <paramdef>string <parameter>args</parameter></paramdef> <paramdef>string <parameter>code</parameter></paramdef> </funcprototype> </funcsynopsis> <para> Z pøedaných argumentù vytvoøí anonymní funkci, a vrátí unikátní název této funkce. <parameter>args</parameter> se obvykle pøedává jako string v jednoduchých uvozovkách, a doporuèujeme to i pro <parameter>code</parameter>. Dùvodem pro jednoduché uvozovky je ochrana názvù promìnných pøed parsováním, pokud pou¾ijete dvojité uvozovky, budete muset oescapovat názvy promìnných, napø. <literal>\$avar</literal>. </para> <para> Tuto funkci mù¾ete (napøíklad) pou¾ít k vytvoøení funkce z dat shromá¾dìných za bìhu programu: <example> <title> Vytvoøení anonymní funkce pomocí <function>create_function</function> </title> <programlisting role="php"> $newfunc = create_function('$a,$b','return "ln($a) + ln($b) = ".log($a * $b);'); echo "New anonymous function: $newfunc\n"; echo $newfunc(2,M_E)."\n"; // výstup // New anonymous function: lambda_1 // ln(2) + ln(2.718281828459) = 1.6931471805599 </programlisting> </example> Nebo tøeba k vytvoøení obecného handleru, který na pøedané argumenty aplikuje sadu operací: <example> <title> Vytvoøení obecné zpracující funkce pomocí <function>create_function</function> </title> <programlisting role="php"> function process($var1, $var2, $farr) { for ($f=0; $f < count($farr); $f++) echo $farr[$f]($var1,$var2)."\n"; } // create a bunch of math functions $f1 = 'if ($a >=0) {return "b*a^2 = ".$b*sqrt($a);} else {return false;}'; $f2 = "return \"min(b^2+a, a^2,b) = \".min(\$a*\$a+\$b,\$b*\$b+\$a);"; $f3 = 'if ($a > 0 && $b != 0) {return "ln(a)/b = ".log($a)/$b;} else {return false;}'; $farr = array( create_function('$x,$y', 'return "some trig: ".(sin($x) + $x*cos($y));'), create_function('$x,$y', 'return "a hypotenuse: ".sqrt($x*$x + $y*$y);'), create_function('$a,$b', $f1), create_function('$a,$b', $f2), create_function('$a,$b', $f3) ); echo "\nUsing the first array of anonymous functions\n"; echo "parameters: 2.3445, M_PI\n"; process(2.3445, M_PI, $farr); // now make a bunch of string processing functions $garr = array( create_function('$b,$a','if (strncmp($a,$b,3) == 0) return "** \"$a\" '. 'and \"$b\"\n** Look the same to me! (looking at the first 3 chars)";'), create_function('$a,$b','; return "CRCs: ".crc32($a)." , ".crc32(b);'), create_function('$a,$b','; return "similar(a,b) = ".similar_text($a,$b,&$p)."($p%)";') ); echo "\nUsing the second array of anonymous functions\n"; process("Twas brilling and the slithy toves", "Twas the night", $garr); </programlisting> </example> kdy¾ spustíte vý¹euvedený kód, výstup bude: <informalexample> <programlisting> Using the first array of anonymous functions parameters: 2.3445, M_PI some trig: -1.6291725057799 a hypotenuse: 3.9199852871011 b*a^2 = 4.8103313314525 min(b^2+a, a^2,b) = 8.6382729035898 ln(a/b) = 0.27122299212594 Using the second array of anonymous functions ** "Twas the night" and "Twas brilling and the slithy toves" ** Look the same to me! (looking at the first 3 chars) CRCs: -725381282 , 1908338681 similar(a,b) = 11(45.833333333333%) </programlisting> </informalexample> Ale zøejmì nejbì¾nìj¹ím vyu¾itím lambda-style (anonymních) funkcí je tvorba callback funkcí, napø. pro pou¾ití v <function>array_walk</function> nebo <function>usort</function> <example> <title>Vyu¾ití anonymních funkcí jako callback funkcí</title> <programlisting role="php"> $av = array("the ","a ","that ","this "); array_walk($av, create_function('&$v,$k','$v = $v."mango";')); print_r($av); // for PHP 3 use var_dump() // outputs: // Array // ( // [0] => the mango // [1] => a mango // [2] => that mango // [3] => this mango // ) // an array of strings ordered from shorter to longer $sv = array("small","larger","a big string","it is a string thing"); print_r($sv); // outputs: // Array // ( // [0] => small // [1] => larger // [2] => a big string // [3] => it is a string thing // ) // sort it from longer to shorter usort($sv, create_function('$a,$b','return strlen($b) - strlen($a);')); print_r($sv); // outputs: // Array // ( // [0] => it is a string thing // [1] => a big string // [2] => larger // [3] => small // ) </programlisting> </example> </para> </refsect1> </refentry> <refentry id="function.func-get-arg"> <refnamediv> <refname>func_get_arg</refname> <refpurpose>Vrátit polo¾ku ze seznamu argumentù</refpurpose> </refnamediv> <refsect1> <title>Popis</title> <funcsynopsis> <funcprototype> <funcdef>mixed <function>func_get_arg</function></funcdef> <paramdef>int <parameter>arg_num</parameter></paramdef> </funcprototype> </funcsynopsis> <simpara> Vrací argument, který je na <parameter>arg_num</parameter>-té pozici v seznamu argumentù u¾iavtelsky definované funkce. Argumenty funkcí se poèítají od nuly. <function>func_get_arg</function> pøi volání mimo definici funkce generuje varování. </simpara> <simpara> Pokud je <parameter>arg_num</parameter> vìt¹í ne¾ poèet skuteènì pøedaných argumentù, vygeneruje varování a vrátí <literal>false</literal>. </simpara> <para> <informalexample> <programlisting role="php"> <?php function foo() { $numargs = func_num_args(); echo "Number of arguments: $numargs<br>\n"; if ($numargs >= 2) { echo "Second argument is: " . func_get_arg (1) . "<br>\n"; } } foo (1, 2, 3); ?> </programlisting> </informalexample> </para> <simpara> <function>func_get_arg</function> se dá pou¾ít ve spojení s <function>func_num_args</function> a <function>func_get_args</function> k tvorbì u¾ivatelsky definovaných funkcí, které pøijímají promìnný poèet argumentù. </simpara> <note> <simpara> Tato funkce byla pøidána v PHP 4. </simpara> </note> </refsect1> </refentry> <refentry id="function.func-get-args"> <refnamediv> <refname>func_get_args</refname> <refpurpose>Vrátit pole obsahující seznam argumentù funkce</refpurpose> </refnamediv> <refsect1> <title>Popis</title> <funcsynopsis> <funcprototype> <funcdef>array <function>func_get_args</function></funcdef> <paramdef>void <parameter></parameter></paramdef> </funcprototype> </funcsynopsis> <simpara> Vrací pole, jeho¾ ka¾dý prvek je odpovídající polo¾kou seznamu argumentù souèasné u¾ivatelsky definované funkce. <function>func_get_args</function> pøi volání mimo definici funkce generuje varování. </simpara> <para> <informalexample> <programlisting role="php"> <?php function foo() { $numargs = func_num_args(); echo "Number of arguments: $numargs<br>\n"; if ($numargs >= 2) { echo "Second argument is: " . func_get_arg (1) . "<br>\n"; } $arg_list = func_get_args(); for ($i = 0; $i < $numargs; $i++) { echo "Argument $i is: " . $arg_list[$i] . "<br>\n"; } } foo (1, 2, 3); ?> </programlisting> </informalexample> </para> <simpara> <function>func_get_args</function> se dá pou¾ít ve spojení s <function>func_num_args</function> a <function>func_get_arg</function> k tvorbì u¾ivatelsky definovaných funkcí, které pøijímají promìnny poèet argumentù. </simpara> <note> <simpara> Tato funkce byla pøidána v PHP 4. </simpara> </note> </refsect1> </refentry> <refentry id="function.func-num-args"> <refnamediv> <refname>func_num_args</refname> <refpurpose>Vrátit poèet argumentù pøedaných funkci</refpurpose> </refnamediv> <refsect1> <title>Popis</title> <funcsynopsis> <funcprototype> <funcdef>int <function>func_num_args</function></funcdef> <paramdef>void <parameter></parameter></paramdef> </funcprototype> </funcsynopsis> <simpara> Vrací poèet argumentù pøedaných souèasné u¾ivatelsky definované funkci. <function>Func_num_args</function> pri volání mimo definici funkce generuje warning. definition. </simpara> <para> <informalexample> <programlisting role="php"> <?php function foo() { $numargs = func_num_args(); echo "Number of arguments: $numargs\n"; } foo (1, 2, 3); // Prints 'Number of arguments: 3' ?> </programlisting> </informalexample> </para> <simpara> <function>func_num_args</function> se dá pou¾it ve spojení s <function>func_get_arg</function> a <function>func_get_args</function> k tvorbì u¾ivatelsky definovaných funkcí, které pøijímají promìnný poèet argumentù. </simpara> <note> <simpara> Tato funkce byla pøidána v PHP 4. </simpara> </note> </refsect1> </refentry> <refentry id="function.function-exists"> <refnamediv> <refname>function_exists</refname> <refpurpose>Vrátit true, pokud je daná funkce definována</refpurpose> </refnamediv> <refsect1> <title>Popis</title> <funcsynopsis> <funcprototype> <funcdef>bool <function>function_exists</function></funcdef> <paramdef>string <parameter>function_name</parameter></paramdef> </funcprototype> </funcsynopsis> <para> Ovìøí pøítomnost funkce <parameter>function_name</parameter> v seznamu definovaných funkcí. Pokud daná funkce existuje, vrací <literal>true</literal>, jinak <literal>false</literal>. <informalexample> <programlisting role="php"> if (function_exists('imap_open')) { echo "IMAP functions are available.<br>\n"; } else { echo "IMAP functions are not available.<br>\n"; } </programlisting> </informalexample> Pozn.: název funkce mù¾e existovat i v pøípadì, ¾e je samotná funkce nepou¾itelná kvùli konfiguraci nebo volbám zadaným pøi kompilaci. </para> <para> Viz také <function>method_exists</function>. </para> </refsect1> </refentry> <refentry id="function.register-shutdown-function"> <refnamediv> <refname>register_shutdown_function</refname> <refpurpose>Zaregistrovat funkci pro provedení pøi ukonèení bìhu</refpurpose> </refnamediv> <refsect1> <title>Popis</title> <funcsynopsis> <funcprototype> <funcdef>int <function>register_shutdown_function</function> </funcdef> <paramdef>string <parameter>func</parameter></paramdef> </funcprototype> </funcsynopsis> <simpara> Zaregistruje funkci udanou v <parameter>func</parameter> pro provedení po dokonèení bìhu skriptu. </simpara> <para> Bì¾né problémy: </para> <simpara> Jeliko¾ tato funkce nemù¾e poslat browseru ¾ádný výstup, nebudete ji moci debugovat pomocí pøíkazù jako <function>print</function> nebo <function>echo</function>. </simpara> </refsect1> </refentry> </reference> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t sgml-parent-document:nil sgml-default-dtd-file:"../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: -->