cvs: phpdoc-es / translation.xml /docweb main.ent /reference/exec/functions exec.xml /reference/filesystem/functions parse-ini-file.xml
realpath.xml /reference/funchand/functions func-get-arg.xml func-get-args.xml func-num-args.xml /reference/info/functions ini-set.xml
/reference/math/functions decbin.xml dechex.xml decoct.xml /reference/outcontrol/functions ob-get-status.xml /reference/var/functions doubleval.xml
empty.xml gettype.xml intval.xml is-array.xml is-float.xml is-int.xml is-object.xml is-string.xml isset.xml settype.xml strval.xml unset.xml

From: Date: Mon, 08 Aug 2005 06:45:33 +0000
Subject: cvs: phpdoc-es / translation.xml /docweb main.ent /reference/exec/functions exec.xml /reference/filesystem/functions parse-ini-file.xml
realpath.xml /reference/funchand/functions func-get-arg.xml func-get-args.xml func-num-args.xml /reference/info/functions ini-set.xml
/reference/math/functions decbin.xml dechex.xml decoct.xml /reference/outcontrol/functions ob-get-status.xml /reference/var/functions doubleval.xml
empty.xml gettype.xml intval.xml is-array.xml is-float.xml is-int.xml is-object.xml is-string.xml isset.xml settype.xml strval.xml unset.xml
Groups: php.doc.es 
Request: Send a blank email to doc-es+get-1244@lists.php.net to get a copy of this message
lboshell Mon Aug 8 02:45:33 2005 EDT Modified files: /phpdoc-es translation.xml /phpdoc-es/docweb main.ent /phpdoc-es/reference/exec/functions exec.xml /phpdoc-es/reference/filesystem/functions parse-ini-file.xml realpath.xml /phpdoc-es/reference/funchand/functions func-get-arg.xml func-get-args.xml func-num-args.xml /phpdoc-es/reference/info/functions ini-set.xml /phpdoc-es/reference/math/functions decbin.xml dechex.xml decoct.xml /phpdoc-es/reference/outcontrol/functions ob-get-status.xml /phpdoc-es/reference/var/functions doubleval.xml empty.xml gettype.xml intval.xml is-array.xml is-float.xml is-int.xml is-object.xml is-string.xml isset.xml settype.xml strval.xml unset.xml Log: * Actualizaciones * Adopcion de documentos * Asignacion de nuevo trabajo

http://cvs.php.net/diff.php/phpdoc-es/translation.xml?r1=1.205&r2=1.206&ty=u Index: phpdoc-es/translation.xml diff -u phpdoc-es/translation.xml:1.205 phpdoc-es/translation.xml:1.206 --- phpdoc-es/translation.xml:1.205 Mon Aug 1 05:41:08 2005 +++ phpdoc-es/translation.xml Mon Aug 8 02:45:28 2005 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- $Revision: 1.205 $ --> +<!-- $Revision: 1.206 $ --> <!DOCTYPE translation SYSTEM "../dtds/translation.dtd"> <translation> @@ -92,32 +92,26 @@ <file name="reference/pcntl/functions/pcntl-wtermsig.xml" person="jtacon" type="translation" date="17.12.2004"/> - <file name="reference/var/functions/doubleval.xml" - person="lboshell" type="revision" date="01.08.2005"/> - <file name="reference/var/functions/empty.xml" - person="lboshell" type="revision" date="01.08.2005"/> - <file name="reference/var/functions/gettype.xml" - person="lboshell" type="revision" date="01.08.2005"/> - <file name="reference/var/functions/intval.xml" - person="lboshell" type="revision" date="01.08.2005"/> - <file name="reference/var/functions/is-array.xml" - person="lboshell" type="revision" date="01.08.2005"/> - <file name="reference/var/functions/is-float.xml" - person="lboshell" type="revision" date="01.08.2005"/> - <file name="reference/var/functions/is-int.xml" - person="lboshell" type="revision" date="01.08.2005"/> - <file name="reference/var/functions/is-object.xml" - person="lboshell" type="revision" date="01.08.2005"/> - <file name="reference/var/functions/is-string.xml" - person="lboshell" type="revision" date="01.08.2005"/> - <file name="reference/var/functions/isset.xml" - person="lboshell" type="revision" date="01.08.2005"/> - <file name="reference/var/functions/settype.xml" - person="lboshell" type="revision" date="01.08.2005"/> - <file name="reference/var/functions/strval.xml" - person="lboshell" type="revision" date="01.08.2005"/> - <file name="reference/var/functions/unset.xml" - person="lboshell" type="revision" date="01.08.2005"/> + <file name="appendices/extensions.xml" + person="lboshell" type="translation" date="08.08.2005"/> + <file name="reference/datetime/constants.xml" + person="lboshell" type="translation" date="08.08.2005"/> + <file name="reference/dba/configure.xml" + person="lboshell" type="translation" date="08.08.2005"/> + <file name="reference/dba/functions/dba-handlers.xml" + person="lboshell" type="translation" date="08.08.2005"/> + <file name="reference/dba/functions/dba-key-split.xml" + person="lboshell" type="translation" date="08.08.2005"/> + <file name="reference/dba/functions/dba-list.xml" + person="lboshell" type="translation" date="08.08.2005"/> + <file name="reference/domxml/functions/DomAttribute-set-value.xml" + person="lboshell" type="translation" date="08.08.2005"/> + <file name="reference/domxml/functions/domxml-xslt-version.xml" + person="lboshell" type="translation" date="08.08.2005"/> + <file name="reference/domxml/functions/xpath-register-ns-auto.xml" + person="lboshell" type="translation" date="08.08.2005"/> + <file name="reference/domxml/functions/xpath-register-ns.xml" + person="lboshell" type="translation" date="08.08.2005"/> </work-in-progress> </translation> http://cvs.php.net/diff.php/phpdoc-es/docweb/main.ent?r1=1.3&r2=1.4&ty=u Index: phpdoc-es/docweb/main.ent diff -u phpdoc-es/docweb/main.ent:1.3 phpdoc-es/docweb/main.ent:1.4 --- phpdoc-es/docweb/main.ent:1.3 Mon Aug 1 05:41:11 2005 +++ phpdoc-es/docweb/main.ent Mon Aug 8 02:45:31 2005 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.3 $ --> -<!-- EN-Revision: 1.24 Maintainer: lboshell Status: ready --> +<!-- $Revision: 1.4 $ --> +<!-- EN-Revision: 1.25 Maintainer: lboshell Status: ready --> <!-- common --> <!ENTITY docweb.common.title.default 'Herramientas de @@ -190,6 +190,7 @@ <!ENTITY docweb.users.wishlist 'Lista de deseos'> <!ENTITY docweb.users.photo 'Photo de Usuario'> <!ENTITY docweb.users.succes 'Su perfil ha sido actualizado'> +<!ENTITY docweb.users.delete-photo '&iquest;Eliminar su foto actual?'> <!ENTITY docweb.users.error.size 'Por favor mantenga su foto por debajo de 300kb'> <!ENTITY docweb.users.error.format 'Por favor aseg&uacute;rese de que su foto http://cvs.php.net/diff.php/phpdoc-es/reference/exec/functions/exec.xml?r1=1.2&r2=1.3&ty=u Index: phpdoc-es/reference/exec/functions/exec.xml diff -u phpdoc-es/reference/exec/functions/exec.xml:1.2 phpdoc-es/reference/exec/functions/exec.xml:1.3 --- phpdoc-es/reference/exec/functions/exec.xml:1.2 Sat Jun 25 09:27:57 2005 +++ phpdoc-es/reference/exec/functions/exec.xml Mon Aug 8 02:45:31 2005 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.2 $ --> -<!-- EN-Revision: 1.17 Maintainer: lboshell Status: ready --> +<!-- $Revision: 1.3 $ --> +<!-- EN-Revision: 1.18 Maintainer: lboshell Status: ready --> <!-- splitted from ./en/functions/exec.xml, last change in rev 1.2 --> <refentry id="function.exec"> <refnamediv> @@ -40,8 +40,8 @@ <para> Si el argumento <parameter>salida</parameter> est&aacute; presente, entonces la matriz especificada ser&aacute; llenada - con cada l&iacute;nea de la salida del comando. Los saltos de - l&iacute;nea, como <literal>\n</literal>, no son incluidos en + con cada l&iacute;nea de la salida del comando. El espacio en + blanco extra, como <literal>\n</literal>, no es incluido en esta matriz. Note que si la matriz ya contiene algunos elementos, <function>exec</function> anexar&aacute; sus resultados al final de la matriz. Si no desea que la http://cvs.php.net/diff.php/phpdoc-es/reference/filesystem/functions/parse-ini-file.xml?r1=1.4&r2=1.5&ty=u Index: phpdoc-es/reference/filesystem/functions/parse-ini-file.xml diff -u phpdoc-es/reference/filesystem/functions/parse-ini-file.xml:1.4 phpdoc-es/reference/filesystem/functions/parse-ini-file.xml:1.5 --- phpdoc-es/reference/filesystem/functions/parse-ini-file.xml:1.4 Thu Mar 24 11:16:26 2005 +++ phpdoc-es/reference/filesystem/functions/parse-ini-file.xml Mon Aug 8 02:45:31 2005 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.4 $ --> -<!-- EN-Revision: 1.19 Maintainer: lboshell Status: ready --> +<!-- $Revision: 1.5 $ --> +<!-- EN-Revision: 1.20 Maintainer: lboshell Status: ready --> <!-- splitted from ./en/functions/filesystem.xml, last change in rev 1.87 --> <refentry id="function.parse-ini-file"> <refnamediv> @@ -57,7 +57,9 @@ <simpara> Existen palabras reservadas que no deben ser usadas como claves en archivos ini. Entre estas se encuentran: null, yes, no, true, - y false. + y false. Los caracteres <literal>|&amp;~![()"</literal> no deben + ser usados en ninguna parte de la clave, y tienen un significado + especial en el valor. </simpara> </note> <para> http://cvs.php.net/diff.php/phpdoc-es/reference/filesystem/functions/realpath.xml?r1=1.3&r2=1.4&ty=u Index: phpdoc-es/reference/filesystem/functions/realpath.xml diff -u phpdoc-es/reference/filesystem/functions/realpath.xml:1.3 phpdoc-es/reference/filesystem/functions/realpath.xml:1.4 --- phpdoc-es/reference/filesystem/functions/realpath.xml:1.3 Tue May 18 22:12:19 2004 +++ phpdoc-es/reference/filesystem/functions/realpath.xml Mon Aug 8 02:45:32 2005 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.3 $ --> -<!-- EN-Revision: 1.7 Maintainer: lboshell Status: ready --> +<!-- $Revision: 1.4 $ --> +<!-- EN-Revision: 1.8 Maintainer: lboshell Status: ready --> <!-- splitted from ./en/functions/filesystem.xml, last change in rev 1.23 --> <refentry id="function.realpath"> <refnamediv> @@ -24,7 +24,11 @@ </para> <para> <function>realpath</function> devuelve &false; en caso de fallo, - p.ej. si el archivo no existe. + p.ej. si el archivo no existe. En sistemas BSD, + <function>realpath</function> no falla si &uacute;nicamente el + &uacute;ltimo componente de <parameter>ruta</parameter> no + existe, mientras que en otros sistemas se devolver&aacute; + &false;. </para> <para> <example> http://cvs.php.net/diff.php/phpdoc-es/reference/funchand/functions/func-get-arg.xml?r1=1.2&r2=1.3&ty=u Index: phpdoc-es/reference/funchand/functions/func-get-arg.xml diff -u phpdoc-es/reference/funchand/functions/func-get-arg.xml:1.2 phpdoc-es/reference/funchand/functions/func-get-arg.xml:1.3 --- phpdoc-es/reference/funchand/functions/func-get-arg.xml:1.2 Mon Jul 4 19:37:56 2005 +++ phpdoc-es/reference/funchand/functions/func-get-arg.xml Mon Aug 8 02:45:32 2005 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.2 $ --> -<!-- EN-Revision: 1.7 Maintainer: lboshell Status: ready --> +<!-- $Revision: 1.3 $ --> +<!-- EN-Revision: 1.8 Maintainer: lboshell Status: ready --> <!-- splitted from ./en/functions/funchand.xml, last change in rev 1.1 --> <refentry id="function.func-get-arg"> <refnamediv> @@ -32,6 +32,9 @@ una advertencia y <function>func_get_arg</function> devolver&aacute; &false;. </simpara> + + &note.funcnoparam; + <para> <informalexample> <programlisting role="php"> http://cvs.php.net/diff.php/phpdoc-es/reference/funchand/functions/func-get-args.xml?r1=1.2&r2=1.3&ty=u Index: phpdoc-es/reference/funchand/functions/func-get-args.xml diff -u phpdoc-es/reference/funchand/functions/func-get-args.xml:1.2 phpdoc-es/reference/funchand/functions/func-get-args.xml:1.3 --- phpdoc-es/reference/funchand/functions/func-get-args.xml:1.2 Mon Jul 4 19:37:56 2005 +++ phpdoc-es/reference/funchand/functions/func-get-args.xml Mon Aug 8 02:45:32 2005 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.2 $ --> -<!-- EN-Revision: 1.9 Maintainer: lboshell Status: ready --> +<!-- $Revision: 1.3 $ --> +<!-- EN-Revision: 1.10 Maintainer: lboshell Status: ready --> <!-- splitted from ./en/functions/funchand.xml, last change in rev 1.1 --> <refentry id="function.func-get-args"> <refnamediv> @@ -34,6 +34,9 @@ predeterminados (no pasados). </simpara> </note> + + &note.funcnoparam; + <para> <informalexample> <programlisting role="php"> http://cvs.php.net/diff.php/phpdoc-es/reference/funchand/functions/func-num-args.xml?r1=1.2&r2=1.3&ty=u Index: phpdoc-es/reference/funchand/functions/func-num-args.xml diff -u phpdoc-es/reference/funchand/functions/func-num-args.xml:1.2 phpdoc-es/reference/funchand/functions/func-num-args.xml:1.3 --- phpdoc-es/reference/funchand/functions/func-num-args.xml:1.2 Mon Jul 4 19:37:56 2005 +++ phpdoc-es/reference/funchand/functions/func-num-args.xml Mon Aug 8 02:45:32 2005 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.2 $ --> -<!-- EN-Revision: 1.6 Maintainer: lboshell Status: ready --> +<!-- $Revision: 1.3 $ --> +<!-- EN-Revision: 1.7 Maintainer: lboshell Status: ready --> <!-- splitted from ./en/functions/funchand.xml, last change in rev 1.1 --> <refentry id="function.func-num-args"> <refnamediv> @@ -26,6 +26,9 @@ lugar, su resultado puede ser asignado a una variable, la cual puede ser pasada entonces a la funci&oacute;n. </simpara> + + &note.funcnoparam; + <para> <informalexample> <programlisting role="php"> http://cvs.php.net/diff.php/phpdoc-es/reference/info/functions/ini-set.xml?r1=1.10&r2=1.11&ty=u Index: phpdoc-es/reference/info/functions/ini-set.xml diff -u phpdoc-es/reference/info/functions/ini-set.xml:1.10 phpdoc-es/reference/info/functions/ini-set.xml:1.11 --- phpdoc-es/reference/info/functions/ini-set.xml:1.10 Fri Feb 11 23:33:06 2005 +++ phpdoc-es/reference/info/functions/ini-set.xml Mon Aug 8 02:45:32 2005 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.10 $ --> -<!-- EN-Revision: 1.45 Maintainer: lboshell Status: ready --> +<!-- $Revision: 1.11 $ --> +<!-- EN-Revision: 1.46 Maintainer: lboshell Status: ready --> <!-- splitted from ./en/functions/info.xml, last change in rev 1.23 --> <refentry id="function.ini-set"> <refnamediv> @@ -30,9 +30,10 @@ </para> <para> Vea tambi&eacute;n: <function>get_cfg_var</function>, - <function>ini_get</function>, - <function>ini_get_all</function>, y - <function>ini_restore</function> + <function>ini_get</function>, <function>ini_get_all</function>, + <function>ini_restore</function> &listendand; <link + linkend="configuration.changes">C&oacute;mo modificar los + par&aacute;metros de configuraci&oacute;n</link> </para> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc-es/reference/math/functions/decbin.xml?r1=1.1&r2=1.2&ty=u Index: phpdoc-es/reference/math/functions/decbin.xml diff -u phpdoc-es/reference/math/functions/decbin.xml:1.1 phpdoc-es/reference/math/functions/decbin.xml:1.2 --- phpdoc-es/reference/math/functions/decbin.xml:1.1 Sun Apr 14 20:15:43 2002 +++ phpdoc-es/reference/math/functions/decbin.xml Mon Aug 8 02:45:32 2005 @@ -1,27 +1,49 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- splitted from ./es/functions/math.xml, last change in rev 1.1 --> -<!-- last change to 'decbin' in en/ tree in rev 1.2 --> +<!-- $Revision: 1.2 $ --> +<!-- EN-Revision: 1.8 Maintainer: lboshell Status: ready --> +<!-- splitted from ./en/functions/math.xml, last change in rev 1.2 --> <refentry id="function.decbin"> <refnamediv> - <refname>DecBin</refname> - <refpurpose>decimal a binario</refpurpose> + <refname>decbin</refname> + <refpurpose>Decimal a binario</refpurpose> </refnamediv> <refsect1> <title>Descripci&oacute;n</title> <methodsynopsis> - <type>string</type><methodname>decbin</methodname> - <methodparam><type>int</type><parameter>number</parameter></methodparam> + <type>string</type><methodname>decbin</methodname> + <methodparam><type>int</type><parameter>numero</parameter></methodparam> </methodsynopsis> <para> - Devuelve una cadena conteniendo la representaci&oacute;n en binario de - el n&uacute;mero dado en el argumento. El n&uacute;mero mayor que puede ser - convertido es 2147483647 en decimal que resulta una cadena de - 31 unos.</para> - + Devuelve una cadena que contiene una representaci&oacute;n + binaria del argumento <parameter>numero</parameter> dado. El + mayor n&uacute;mero que puede convertirse es 4294967295 en + decimal, que resulta en una cadena de 32 1's. + </para> <para> - Vea tambi&eacute;n la funci&oacute;n <function>bindec</function> - .</para> - + <example> + <title>Ejemplo de <function>decbin</function></title> + <programlisting role="php"> +<![CDATA[ +<?php +echo decbin(12) . "\n"; +echo decbin(26); +?> +]]> + </programlisting> + &example.outputs; + <screen> +<![CDATA[ +1100 +11010 +]]> + </screen> + </example> + </para> + <para> + Vea tambi&eacute;n <function>bindec</function>, + <function>decoct</function>, <function>dechex</function> y + <function>base_convert</function>. + </para> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc-es/reference/math/functions/dechex.xml?r1=1.1&r2=1.2&ty=u Index: phpdoc-es/reference/math/functions/dechex.xml diff -u phpdoc-es/reference/math/functions/dechex.xml:1.1 phpdoc-es/reference/math/functions/dechex.xml:1.2 --- phpdoc-es/reference/math/functions/dechex.xml:1.1 Sun Apr 14 20:15:48 2002 +++ phpdoc-es/reference/math/functions/dechex.xml Mon Aug 8 02:45:32 2005 @@ -1,26 +1,49 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- splitted from ./es/functions/math.xml, last change in rev 1.1 --> -<!-- last change to 'dechex' in en/ tree in rev 1.2 --> +<!-- $Revision: 1.2 $ --> +<!-- EN-Revision: 1.7 Maintainer: lboshell Status: ready --> +<!-- splitted from ./en/functions/math.xml, last change in rev 1.2 --> <refentry id="function.dechex"> <refnamediv> - <refname>DecHex</refname> - <refpurpose>decimal a hexadecimal</refpurpose> + <refname>dechex</refname> + <refpurpose>Decimal a hexadecimal</refpurpose> </refnamediv> <refsect1> <title>Descripci&oacute;n</title> <methodsynopsis> - <type>string</type><methodname>dechex</methodname> - <methodparam><type>int</type><parameter>number</parameter></methodparam> + <type>string</type><methodname>dechex</methodname> + <methodparam><type>int</type><parameter>numero</parameter></methodparam> </methodsynopsis> <para> - Devuelve una cadena conteniendo la representaci&oacute;n hexadecimal del - n&uacute;mero dado en el argumento. El mayor n&uacute;mero que puede ser - convertido es 2147483647 en decimal resultando "7fffffff".</para> - + Devuelve una cadena que contiene una representaci&oacute;n + hexadecimal del argumento <parameter>numero</parameter> dado. El + mayor n&uacute;mero que puede convertirse es 4294967295 en + decimal, que resulta en "ffffffff". + </para> <para> - Vea tambi&eacute;n la funci&oacute;n <function>hexdec</function> - .</para> - + <example> + <title>Ejemplo de <function>dechex</function></title> + <programlisting role="php"> +<![CDATA[ +<?php +echo dechex(10) . "\n"; +echo dechex(47); +?> +]]> + </programlisting> + &example.outputs; + <screen> +<![CDATA[ +a +2f +]]> + </screen> + </example> + </para> + <para> + Vea tambi&eacute;n <function>hexdec</function>, + <function>decbin</function>, <function>decoct</function> y + <function>base_convert</function>. + </para> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc-es/reference/math/functions/decoct.xml?r1=1.1&r2=1.2&ty=u Index: phpdoc-es/reference/math/functions/decoct.xml diff -u phpdoc-es/reference/math/functions/decoct.xml:1.1 phpdoc-es/reference/math/functions/decoct.xml:1.2 --- phpdoc-es/reference/math/functions/decoct.xml:1.1 Sun Apr 14 20:15:48 2002 +++ phpdoc-es/reference/math/functions/decoct.xml Mon Aug 8 02:45:32 2005 @@ -1,25 +1,49 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- splitted from ./es/functions/math.xml, last change in rev 1.1 --> -<!-- last change to 'decoct' in en/ tree in rev 1.8 --> +<!-- $Revision: 1.2 $ --> +<!-- EN-Revision: 1.7 Maintainer: lboshell Status: ready --> +<!-- splitted from ./en/functions/math.xml, last change in rev 1.8 --> <refentry id="function.decoct"> <refnamediv> - <refname>DecOct</refname> - <refpurpose>decimal a octal</refpurpose> + <refname>decoct</refname> + <refpurpose>Decimal a octal</refpurpose> </refnamediv> <refsect1> <title>Descripci&oacute;n</title> <methodsynopsis> - <type>string</type><methodname>decoct</methodname> - <methodparam><type>int</type><parameter>number</parameter></methodparam> + <type>string</type><methodname>decoct</methodname> + <methodparam><type>int</type><parameter>numero</parameter></methodparam> </methodsynopsis> <para> - Devuelve una cadena conteniendo la representaci&oacute;n octal del - n&uacute;mero dado en el argumento. - Returns a string containing an octal representation of the given - number argument. El mayor n&uacute;mero que puede ser - ocnvertido es 2147483647 en decimal resultando "17777777777". - Vea tambi&eacute;n <function>octdec</function>.</para> - + Devuelve una cadena que contiene una representaci&oacute;n octal + del argumento <parameter>numero</parameter> dado. El mayor + n&uacute;mero que puede convertirse es 4294967295 en decimal, que + resulta en "37777777777". + </para> + <para> + <example> + <title>Ejemplo de <function>decoct</function></title> + <programlisting role="php"> +<![CDATA[ +<?php +echo decoct(15) . "\n"; +echo decoct(264); +?> +]]> + </programlisting> + &example.outputs; + <screen> +<![CDATA[ +17 +410 +]]> + </screen> + </example> + </para> + <para> + Vea tambi&eacute;n <function>octdec</function>, + <function>decbin</function>, <function>dechex</function> y + <function>base_convert</function>. + </para> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc-es/reference/outcontrol/functions/ob-get-status.xml?r1=1.1&r2=1.2&ty=u Index: phpdoc-es/reference/outcontrol/functions/ob-get-status.xml diff -u phpdoc-es/reference/outcontrol/functions/ob-get-status.xml:1.1 phpdoc-es/reference/outcontrol/functions/ob-get-status.xml:1.2 --- phpdoc-es/reference/outcontrol/functions/ob-get-status.xml:1.1 Tue Dec 16 22:09:08 2003 +++ phpdoc-es/reference/outcontrol/functions/ob-get-status.xml Mon Aug 8 02:45:32 2005 @@ -1,9 +1,9 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.1 $ --> -<!-- EN-Revision: 1.1 Maintainer: lboshell Status: ready --> +<!-- $Revision: 1.2 $ --> +<!-- EN-Revision: 1.2 Maintainer: lboshell Status: ready --> <refentry id="function.ob-get-status"> <refnamediv> - <refname>ob_get_status</refname> + <refname>ob_get_status</refname> <refpurpose> Obtener el status de los b&uacute;feres de salida </refpurpose> @@ -16,11 +16,10 @@ status_completo</parameter> </methodparam> </methodsynopsis> - &warn.experimental.func; <para> -Esta funci&oacute;n devolver&aacute; el status actual de los -b&uacute;feres de salida. Devuelve una matriz que contiene el -est&aacute;tus de b&uacute;fer, o &false; en caso de fallo. + Esta funci&oacute;n devolver&aacute; el status actual de los + b&uacute;feres de salida. Devuelve una matriz que contiene el + est&aacute;tus de b&uacute;fer, o &false; en caso de fallo. </para> <para> Vea tambi&eacute;n <function>ob_get_level</function>. http://cvs.php.net/diff.php/phpdoc-es/reference/var/functions/doubleval.xml?r1=1.1&r2=1.2&ty=u Index: phpdoc-es/reference/var/functions/doubleval.xml diff -u phpdoc-es/reference/var/functions/doubleval.xml:1.1 phpdoc-es/reference/var/functions/doubleval.xml:1.2 --- phpdoc-es/reference/var/functions/doubleval.xml:1.1 Sun Apr 14 20:20:20 2002 +++ phpdoc-es/reference/var/functions/doubleval.xml Mon Aug 8 02:45:33 2005 @@ -1,32 +1,46 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- splitted from ./es/functions/var.xml, last change in rev 1.1 --> -<!-- last change to 'doubleval' in en/ tree in rev 1.2 --> - <refentry id="function.doubleval"> - <refnamediv> - <refname>doubleval</refname> - <refpurpose>Obtiene el valor double (decimal) de una variable.</refpurpose> - </refnamediv> - <refsect1> - <title>Descripci&oacute;n</title> - <methodsynopsis> - <type>double</type><methodname>doubleval</methodname> - <methodparam><type>mixed</type><parameter>var</parameter></methodparam> - </methodsynopsis> +<!-- $Revision: 1.2 $ --> +<!-- EN-Revision: 1.4 Maintainer: lboshell Status: ready --> +<refentry id="function.doubleval"> + <refnamediv> + <refname>doubleval</refname> + <refpurpose>&Alias; <function>floatval</function></refpurpose> + </refnamediv> - <simpara> - Devuelve el valor double (decimal en punto flotante) de <parameter>var</parameter>.</simpara> + <refsect1 role="description"> + &reftitle.description; + <simpara> + &info.function.alias; + <function>floatval</function>. + </simpara> + </refsect1> - <simpara> - <parameter>var</parameter> puede ser cualquier tipo escalar. No se puede usar - <function>doubleval</function> sobre arrays u objetos.</simpara> - - <simpara> - Ver tambi&eacute;n <function>intval</function>, - <function>strval</function>, - <function>settype</function> y <link linkend="language.types.type-juggling">Type juggling</link>.</simpara> - - </refsect1> - </refentry> + <refsect1 role="changelog"> + &reftitle.changelog; + <para> + <informaltable> + <tgroup cols="2"> + <thead> + <row> + <entry>&Version;</entry> + <entry>&Description;</entry> + </row> + </thead> + <tbody> + <row> + <entry>4.2.0</entry> + <entry> + <function>doubleval</function> se convirti&oacute; en un alias + de <function>floatval</function>. Anteriormente, s&oacute;lo + exist&iacute;a <function>doubleval</function>. + </entry> + </row> + </tbody> + </tgroup> + </informaltable> + </para> + </refsect1> +</refentry> <!-- Keep this comment at the end of the file Local variables: http://cvs.php.net/diff.php/phpdoc-es/reference/var/functions/empty.xml?r1=1.1&r2=1.2&ty=u Index: phpdoc-es/reference/var/functions/empty.xml diff -u phpdoc-es/reference/var/functions/empty.xml:1.1 phpdoc-es/reference/var/functions/empty.xml:1.2 --- phpdoc-es/reference/var/functions/empty.xml:1.1 Sun Apr 14 20:20:20 2002 +++ phpdoc-es/reference/var/functions/empty.xml Mon Aug 8 02:45:33 2005 @@ -1,27 +1,153 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- splitted from ./es/functions/var.xml, last change in rev 1.1 --> -<!-- last change to 'empty' in en/ tree in rev 1.2 --> - <refentry id="function.empty"> - <refnamediv> - <refname>empty</refname> - <refpurpose>Determina si una variable est&aacute; definida</refpurpose> - </refnamediv> - <refsect1> - <title>Descripci&oacute;n</title> - <methodsynopsis> - <type>int</type><methodname>empty</methodname> - <methodparam><type>mixed</type><parameter>var</parameter></methodparam> - </methodsynopsis> - - <simpara> - Devuelve &false; si <parameter>var</parameter> est&aacute; definida y tiene un valor - no-vac&iacute;o o distinto de cero; en otro caso devuelve &true;.</simpara> - - <simpara> - Ver tambi&eacute;n <function>isset</function> y <function>unset</function>.</simpara> +<!-- $Revision: 1.2 $ --> +<!-- EN-Revision: 1.12 Maintainer: lboshell Status: ready --> +<refentry id="function.empty"> + <refnamediv> + <refname>empty</refname> + <refpurpose>Determinar si una variable est&aacute; + vac&iacute;a</refpurpose> + </refnamediv> + <refsect1 role="description"> + &reftitle.description; + <methodsynopsis> + <type>bool</type><methodname>empty</methodname> + <methodparam><type>mixed</type><parameter>var</parameter></methodparam> + </methodsynopsis> + <para> + Determinar si una variable es considerada vac&iacute;a. + </para> + </refsect1> + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>var</parameter></term> + <listitem> + <para> + Variable a verificar + </para> + <note> + <para> + <function>empty</function> s&oacute;lo chequea variables ya + que cualquier otra cosa producir&aacute; un error de + int&eacute;rprete. En otras palabras, lo siguiente no + funcionar&aacute;: <command>empty(trim($name))</command>. + </para> + </note> + <para> + <function>empty</function> es el opuesto de <literal>(boolean) + <parameter>var</parameter></literal>, con la excepci&oacute;n + de que no se genera una advertencia cuando la variable no + est&aacute; definida. + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + Devuelve &false; si <parameter>var</parameter> tiene un valor no + vac&iacute;o y diferente de cero. + </para> + <para> + Las siguientes expresiones son consideradas como vac&iacute;as: + <simplelist> + <member><literal>"" (una cadena vac&iacute;a)</literal></member> + <member><literal>0 (0 como un entero)</literal></member> + <member><literal>"0" (0 como una cadena)</literal></member> + <member>&null;</member> + <member>&false;</member> + <member><literal>array() (una matriz vac&iacute;a)</literal></member> + <member><literal>var $var; (una variable declarada, pero sin un + valor en una clase)</literal></member> + </simplelist> + </para> + </refsect1> + <refsect1 role="changelog"> + &reftitle.changelog; + <para> + <informaltable> + <tgroup cols="2"> + <thead> + <row> + <entry>&Version;</entry> + <entry>&Description;</entry> + </row> + </thead> + <tbody> + <row> + <entry>PHP 5</entry> + <entry> + <para> + A partir de PHP 5, los objetos sin propiedades no son + considerados vac&iacute;os. + </para> + </entry> + </row> + <row> + <entry>PHP 4</entry> + <entry> + <para> + A partir de PHP 4, el valor tipo cadena "0" es considerado + vac&iacute;o. + </para> + </entry> + </row> + </tbody> + </tgroup> + </informaltable> + </para> + </refsect1> + <refsect1 role="examples"> + &reftitle.examples; + <para> + <example> + <title> + Una simple comparaci&oacute;n <function>empty</function> / + <function>isset</function>. + </title> + <programlisting role="php"> +<![CDATA[ +<?php +$var = 0; - </refsect1> - </refentry> +// Evalua a true ya que $var esta vacia +if (empty($var)) { + echo '$var es 0, una variable vacia, o no esta definida en absoluto'; +} + +// Evalua a true ya que $var esta definida +if (isset($var)) { + echo '$var esta definida aunque este vacia'; +} +?> +]]> + </programlisting> + </example> + </para> + </refsect1> + <refsect1 role="notes"> + &reftitle.notes; + &note.language-construct; + </refsect1> + <refsect1 role="seealso"> + &reftitle.seealso; + <para> + <simplelist> + <member><function>isset</function></member> + <member><function>unset</function></member> + <member><function>array_key_exists</function></member> + <member><function>count</function></member> + <member><function>strlen</function></member> + <member><link linkend="types.comparisons">Las tablas de + comparaci&oacute;n de tipos</link></member> + </simplelist> + </para> + </refsect1> +</refentry> <!-- Keep this comment at the end of the file Local variables: http://cvs.php.net/diff.php/phpdoc-es/reference/var/functions/gettype.xml?r1=1.1&r2=1.2&ty=u Index: phpdoc-es/reference/var/functions/gettype.xml diff -u phpdoc-es/reference/var/functions/gettype.xml:1.1 phpdoc-es/reference/var/functions/gettype.xml:1.2 --- phpdoc-es/reference/var/functions/gettype.xml:1.1 Sun Apr 14 20:20:20 2002 +++ phpdoc-es/reference/var/functions/gettype.xml Mon Aug 8 02:45:33 2005 @@ -1,35 +1,84 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- splitted from ./es/functions/var.xml, last change in rev 1.1 --> -<!-- last change to 'gettype' in en/ tree in rev 1.2 --> +<!-- $Revision: 1.2 $ --> +<!-- EN-Revision: 1.6 Maintainer: lboshell Status: ready --> +<!-- splitted from ./en/functions/var.xml, last change in rev 1.2 --> <refentry id="function.gettype"> <refnamediv> <refname>gettype</refname> - <refpurpose>Obtiene el tipo de una variable.</refpurpose> + <refpurpose>Obtener el tipo de una variable</refpurpose> </refnamediv> <refsect1> <title>Descripci&oacute;n</title> <methodsynopsis> - <type>string</type><methodname>gettype</methodname> - <methodparam><type>mixed</type><parameter>var</parameter></methodparam> + <type>string</type><methodname>gettype</methodname> + <methodparam><type>mixed</type><parameter>var</parameter></methodparam> </methodsynopsis> - <para> - Devuelve el tipo de la variable PHP <parameter>var</parameter>.</para> - + Devuelve el tipo de la variable PHP <parameter>var</parameter>. + </para> + <warning> + <simpara> + Nunca use <function>gettype</function> para probar si una + variable es de cierto tipo, ya que la cadena devuelta puede ser + sujeta a cambios en versiones futuras. Asimismo, es lenta, ya + que involucra la comparaci&oacute;n de cadenas. + </simpara> + <simpara> + En su lugar, usa las funciones <literal>is_*</literal>. + </simpara> + </warning> <para> - Los valores posibles de la cadena devuelta son: + Los valores posible de la cadena devuelta son: <itemizedlist> - <listitem><simpara>"integer"</simpara></listitem> - <listitem><simpara>"double"</simpara></listitem> - <listitem><simpara>"string"</simpara></listitem> - <listitem><simpara>"array"</simpara></listitem> - <listitem><simpara>"object"</simpara></listitem> - <listitem><simpara>"unknown type"</simpara></listitem> - </itemizedlist></para> - + <listitem> + <simpara>"<type>boolean</type>" (a partir de PHP 4)</simpara> + </listitem> + <listitem> + <simpara>"<type>integer</type>"</simpara> + </listitem> + <listitem> + <simpara>"<type>double</type>" (por razones hist&oacute;ricas, + "double" se devuelve en caso de un valor tipo + <type>float</type>, y no "float")</simpara> + </listitem> + <listitem> + <simpara>"<type>string</type>"</simpara> + </listitem> + <listitem> + <simpara>"<type>array</type>"</simpara> + </listitem> + <listitem> + <simpara>"<type>object</type>"</simpara> + </listitem> + <listitem> + <simpara>"<type>resource</type>" (a partir de PHP 4)</simpara> + </listitem> + <listitem> + <simpara>"<type>NULL</type>" (a partir de PHP 4)</simpara> + </listitem> + <listitem> + <simpara>"user function" (s&oacute;lo PHP 3, valor + obsoleto)</simpara> + </listitem> + <listitem> + <simpara>"unknown type"</simpara> + </listitem> + </itemizedlist> + </para> <para> - Ver tambi&eacute;n <function>settype</function>.</para> - + Para PHP 4, deber&iacute;a usar + <function>function_exists</function> y + <function>method_exists</function> para reemplazar el antiguo uso + de <function>gettype</function> sobre una funci&oacute;n. + </para> + <para> + Vea tambi&eacute;n <function>settype</function>, + <function>is_array</function>, <function>is_bool</function>, + <function>is_float</function>, <function>is_int</function>, + <function>is_null</function>, <function>is_numeric</function>, + <function>is_object</function>, <function>is_resource</function>, + <function>is_scalar</function>, y <function>is_string</function>. + </para> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc-es/reference/var/functions/intval.xml?r1=1.1&r2=1.2&ty=u Index: phpdoc-es/reference/var/functions/intval.xml diff -u phpdoc-es/reference/var/functions/intval.xml:1.1 phpdoc-es/reference/var/functions/intval.xml:1.2 --- phpdoc-es/reference/var/functions/intval.xml:1.1 Sun Apr 14 20:20:22 2002 +++ phpdoc-es/reference/var/functions/intval.xml Mon Aug 8 02:45:33 2005 @@ -1,35 +1,138 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- splitted from ./es/functions/var.xml, last change in rev 1.1 --> -<!-- last change to 'intval' in en/ tree in rev 1.2 --> - <refentry id="function.intval"> - <refnamediv> - <refname>intval</refname> - <refpurpose>Obtiene el valor entero de una variable.</refpurpose> - </refnamediv> - <refsect1> - <title>Descripci&oacute;n</title> - <methodsynopsis> - <type>int</type><methodname>intval</methodname> - <methodparam><type>mixed</type><parameter>var</parameter></methodparam> - <methodparam choice="opt"><type>int</type><parameter>base</parameter></methodparam> - </methodsynopsis> - - <simpara> - Devuelve el valor entero de <parameter>var</parameter>, - usando la base de conversi&oacute;n especificada (por defecto es - base 10).</simpara> - - <simpara> - <parameter>var</parameter> puede ser cualquier tipo escalar. No se puede usar - <function>intval</function> sobre arrays u objetos.</simpara> - - <simpara> - Ver tambi&eacute;n <function>doubleval</function>, - <function>strval</function>, - <function>settype</function> y <link linkend="language.types.type-juggling">Type juggling</link>.</simpara> +<!-- $Revision: 1.2 $ --> +<!-- EN-Revision: 1.4 Maintainer: lboshell Status: ready --> +<refentry id="function.intval"> + <refnamediv> + <refname>intval</refname> + <refpurpose>Obtener el valor entero de una variable</refpurpose> + </refnamediv> - </refsect1> - </refentry> + <refsect1 role="description"> + &reftitle.description; + <methodsynopsis> + <type>int</type><methodname>intval</methodname> + <methodparam><type>mixed</type><parameter>var</parameter></methodparam> + <methodparam choice="opt"><type>int</type><parameter>base</parameter></methodparam> + </methodsynopsis> + <para> + Devuelve el valor <type>integer</type> de + <parameter>var</parameter>, usando la <parameter>base</parameter> + especificada para la conversi&oacute;n (la base predeterminada es + 10). + </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>var</parameter></term> + <listitem> + <para> + El valor escalar a convertir a entero + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>base</parameter></term> + <listitem> + <para> + La base para la conversi&oacute;n (la base predeterminada es + 10) + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + El valer entero de <parameter>var</parameter> en caso de + &eacute;xito, o 0 si ocurre un error. Las matrices y objetos + vac&iacute;os devuelven 0, las matrices y objetos no-vac&iacute;os + devuelven 1. + </para> + <para> + El valor m&aacute;ximo depende del sistema. Los sistemas de 32-bits + tienen un rango m&aacute;ximo de enteros con signo de -2147483648 a + 2147483647. As&iacute; que, por ejemplo, en un sistema de ese tipo, + <literal>intval('1000000000000')</literal> devolver&aacute; + 2147483647. El valor entero m&aacute;ximo para sistemas de 64-bits + es 9223372036854775807. + </para> + <para> + Las cadenas muy probablemente devuelvan 0, aunque esto depende de + los caracteres m&aacute;s a la izquierda de la cadena. Se aplican + las reglas comunes de <link + linkend="language.types.integer.casting">moldeamiento de + enteros</link>. + </para> + </refsect1> + + <refsect1 role="examples"> + &reftitle.examples; + <para> + <example> + <title>Ejemplos de <function>intval</function></title> + <para> + Los siguientes ejemplos est&aacute;n basados en un sistema de + 32-bits. + </para> + <programlisting role="php"> +<![CDATA[ +<?php +echo intval(42); // 42 +echo intval(4.2); // 4 +echo intval('42'); // 42 +echo intval('+42'); // 42 +echo intval('-42'); // -42 +echo intval(042); // 34 +echo intval('042'); // 42 +echo intval(1e10); // 1410065408 +echo intval('1e10'); // 1 +echo intval(0x1A); // 26 +echo intval(42000000); // 42000000 +echo intval(420000000000000000000); // 0 +echo intval('420000000000000000000'); // 2147483647 +echo intval(42, 8); // 42 +echo intval('42', 8); // 34 +?> +]]> + </programlisting> + </example> + </para> + </refsect1> + + <refsect1 role="notes"> + &reftitle.notes; + <note> + <para> + El par&aacute;metro <parameter>base</parameter> no tiene efecto + alguna a menos que <parameter>var</parameter> sea una cadena. + </para> + </note> + </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; + <para> + <simplelist> + <member><function>floatval</function></member> + <member><function>strval</function></member> + <member><function>settype</function></member> + <member><function>is_numeric</function></member> + <member><link + linkend="language.types.type-juggling">Manipulaci&oacute;n de + tipos</link></member> + <member><link linkend="ref.bc">Funciones Matem&aacute;ticas de + Precisi&oacute;n Arbitraria BCMath</link></member> + </simplelist> + </para> + </refsect1> +</refentry> <!-- Keep this comment at the end of the file Local variables: http://cvs.php.net/diff.php/phpdoc-es/reference/var/functions/is-array.xml?r1=1.1&r2=1.2&ty=u Index: phpdoc-es/reference/var/functions/is-array.xml diff -u phpdoc-es/reference/var/functions/is-array.xml:1.1 phpdoc-es/reference/var/functions/is-array.xml:1.2 --- phpdoc-es/reference/var/functions/is-array.xml:1.1 Sun Apr 14 20:20:23 2002 +++ phpdoc-es/reference/var/functions/is-array.xml Mon Aug 8 02:45:33 2005 @@ -1,32 +1,82 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- splitted from ./es/functions/var.xml, last change in rev 1.1 --> -<!-- last change to 'is-array' in en/ tree in rev 1.2 --> +<!-- $Revision: 1.2 $ --> +<!-- EN-Revision: 1.8 Maintainer: lboshell Status: ready --> <refentry id="function.is-array"> <refnamediv> <refname>is_array</refname> - <refpurpose>Averigua si una variable es un array.</refpurpose> + <refpurpose>Encuentra si una variable es una matriz</refpurpose> </refnamediv> - <refsect1> - <title>Descripci&oacute;n</title> + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> - <type>int</type><methodname>is_array</methodname> - <methodparam><type>mixed</type><parameter>var</parameter></methodparam> + <type>bool</type><methodname>is_array</methodname> + <methodparam><type>mixed</type><parameter>var</parameter></methodparam> </methodsynopsis> - <para> - Devuelve &true; si <parameter>var</parameter> es un array, y &false; - en otro caso.</para> - + Encuentra si una variable dada es una matriz. + </para> + </refsect1> + <refsect1 role="parameters"> + &reftitle.parameters; <para> - Ver tambi&eacute;n <function>is_double</function>, - <function>is_float</function>, - <function>is_int</function>, - <function>is_integer</function>, - <function>is_real</function>, - <function>is_string</function>, - <function>is_long</function>, y - <function>is_object</function>.</para> + <variablelist> + <varlistentry> + <term><parameter>var</parameter></term> + <listitem> + <para> + La variable evaluada. + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + Devuelve &true; si <parameter>var</parameter> es un valor tipo + <type>array</type>, &false; de lo contrario. + </para> + </refsect1> + <refsect1 role="examples"> + &reftitle.examples; + <para> + <example> + <title>Verificar que una variable es una matriz</title> + <programlisting role="php"> +<![CDATA[ +<?php +$si = array('esto', 'es', 'una matriz'); + +echo is_array($si) ? 'Matriz' : 'no es Matriz'; +echo "\n"; + +$no = 'esto es una cadena'; +echo is_array($no) ? 'Matriz' : 'no es Matriz'; +?> +]]> + </programlisting> + &example.outputs; + <screen> +<![CDATA[ +Matriz +no es Matriz +]]> + </screen> + </example> + </para> + </refsect1> + <refsect1 role="seealso"> + &reftitle.seealso; + <para> + <simplelist> + <member><function>is_float</function></member> + <member><function>is_int</function></member> + <member><function>is_string</function></member> + <member><function>is_object</function></member> + </simplelist> + </para> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc-es/reference/var/functions/is-float.xml?r1=1.1&r2=1.2&ty=u Index: phpdoc-es/reference/var/functions/is-float.xml diff -u phpdoc-es/reference/var/functions/is-float.xml:1.1 phpdoc-es/reference/var/functions/is-float.xml:1.2 --- phpdoc-es/reference/var/functions/is-float.xml:1.1 Sun Apr 14 20:20:23 2002 +++ phpdoc-es/reference/var/functions/is-float.xml Mon Aug 8 02:45:33 2005 @@ -1,31 +1,63 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- splitted from ./es/functions/var.xml, last change in rev 1.1 --> -<!-- last change to 'is-float' in en/ tree in rev 1.2 --> +<!-- $Revision: 1.2 $ --> +<!-- EN-Revision: 1.4 Maintainer: lboshell Status: ready --> <refentry id="function.is-float"> <refnamediv> <refname>is_float</refname> - <refpurpose>Averigua si una variable es un flotante.</refpurpose> + <refpurpose>Encuentra si una variable es un flotante</refpurpose> </refnamediv> - <refsect1> - <title>Descripci&oacute;n</title> + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> - <type>int</type><methodname>is_float</methodname> - <methodparam><type>mixed</type><parameter>var</parameter></methodparam> + <type>bool</type><methodname>is_float</methodname> + <methodparam><type>mixed</type><parameter>var</parameter></methodparam> </methodsynopsis> - - <simpara> - Esta funci&oacute;n es un alias de <function>is_double</function>.</simpara> - - <simpara> - Ver tambi&eacute;n <function>is_double</function>, - <function>is_real</function>, - <function>is_int</function>, - <function>is_integer</function>, - <function>is_string</function>, - <function>is_object</function>, - <function>is_array</function>, y - <function>is_long</function>.</simpara> - + <para> + Encuentra si la variable dada es un flotante. + </para> + <note> + <para> + Para probar si una variable es un n&uacute;mero o una cadena + num&eacute;rica (como por ejemplo la entrada de un formulario, + que es siempre de tipo cadena), debe usar + <function>is_numeric</function>. + </para> + </note> + </refsect1> + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>var</parameter></term> + <listitem> + <para> + La variable a evaluar. + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + Devuelve &true; si <parameter>var</parameter> es un valor tipo + <type>float</type>, &false; de lo contrario. + </para> + </refsect1> + <refsect1 role="seealso"> + &reftitle.seealso; + <para> + <simplelist> + <member><function>is_bool</function></member> + <member><function>is_int</function></member> + <member><function>is_numeric</function></member> + <member><function>is_string</function></member> + <member><function>is_array</function></member> + <member><function>is_object</function></member> + </simplelist> + </para> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc-es/reference/var/functions/is-int.xml?r1=1.1&r2=1.2&ty=u Index: phpdoc-es/reference/var/functions/is-int.xml diff -u phpdoc-es/reference/var/functions/is-int.xml:1.1 phpdoc-es/reference/var/functions/is-int.xml:1.2 --- phpdoc-es/reference/var/functions/is-int.xml:1.1 Sun Apr 14 20:20:24 2002 +++ phpdoc-es/reference/var/functions/is-int.xml Mon Aug 8 02:45:33 2005 @@ -1,31 +1,63 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- splitted from ./es/functions/var.xml, last change in rev 1.1 --> -<!-- last change to 'is-int' in en/ tree in rev 1.2 --> +<!-- $Revision: 1.2 $ --> +<!-- EN-Revision: 1.4 Maintainer: lboshell Status: ready --> <refentry id="function.is-int"> <refnamediv> <refname>is_int</refname> - <refpurpose>Averigua si una variable es un valor entero.</refpurpose> + <refpurpose>Encontrar si una variable es un entero</refpurpose> </refnamediv> - <refsect1> - <title>Descripci&oacute;n</title> + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> - <type>int</type><methodname>is_int</methodname> - <methodparam><type>mixed</type><parameter>var</parameter></methodparam> + <type>bool</type><methodname>is_int</methodname> + <methodparam><type>mixed</type><parameter>var</parameter></methodparam> </methodsynopsis> - - <simpara> - Esta funci&oacute;n es un alias de <function>is_long</function>.</simpara> - - <simpara> - Ver tambi&eacute;n <function>is_double</function>, - <function>is_float</function>, - <function>is_integer</function>, - <function>is_string</function>, - <function>is_real</function>, - <function>is_object</function>, - <function>is_array</function>, y - <function>is_long</function>.</simpara> - + <para> + Encuentra si la variable dada es un entero. + </para> + <note> + <para> + Para probar si una variable es un n&uacute;mero o una cadena + num&eacute;rica (como en el caso de la entrada de un formulario, + que es siempre una cadena), debe usar + <function>is_numeric</function>. + </para> + </note> + </refsect1> + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>var</parameter></term> + <listitem> + <para> + La variable a evaluar. + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + Devuelve &true; si <parameter>var</parameter> es un valor tipo + <type>integer</type>, &false; de lo contrario. + </para> + </refsect1> + <refsect1 role="seealso"> + &reftitle.seealso; + <para> + <simplelist> + <member><function>is_bool</function></member> + <member><function>is_float</function></member> + <member><function>is_numeric</function></member> + <member><function>is_string</function></member> + <member><function>is_array</function></member> + <member><function>is_object</function></member> + </simplelist> + </para> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc-es/reference/var/functions/is-object.xml?r1=1.1&r2=1.2&ty=u Index: phpdoc-es/reference/var/functions/is-object.xml diff -u phpdoc-es/reference/var/functions/is-object.xml:1.1 phpdoc-es/reference/var/functions/is-object.xml:1.2 --- phpdoc-es/reference/var/functions/is-object.xml:1.1 Sun Apr 14 20:20:27 2002 +++ phpdoc-es/reference/var/functions/is-object.xml Mon Aug 8 02:45:33 2005 @@ -1,32 +1,54 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- splitted from ./es/functions/var.xml, last change in rev 1.1 --> -<!-- last change to 'is-object' in en/ tree in rev 1.2 --> +<!-- $Revision: 1.2 $ --> +<!-- EN-Revision: 1.4 Maintainer: lboshell Status: ready --> <refentry id="function.is-object"> <refnamediv> <refname>is_object</refname> - <refpurpose>Averigua si una varible es un objeto.</refpurpose> + <refpurpose>Encuentra si una variable es un objeto</refpurpose> </refnamediv> - <refsect1> - <title>Descripci&oacute;n</title> + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> - <type>int</type><methodname>is_object</methodname> - <methodparam><type>mixed</type><parameter>var</parameter></methodparam> + <type>bool</type><methodname>is_object</methodname> + <methodparam><type>mixed</type><parameter>var</parameter></methodparam> </methodsynopsis> - <para> - Devuelve &true; si <parameter>var</parameter> es un objeto, y &false; - en otro caso.</para> - + Encuentra si la variable dada es un objeto. + </para> + </refsect1> + <refsect1 role="parameters"> + &reftitle.parameters; <para> - Ver tambi&eacute;n <function>is_long</function>, - <function>is_int</function>, - <function>is_integer</function>, - <function>is_float</function>, - <function>is_double</function>, - <function>is_real</function>, - <function>is_string</function>, y - <function>is_array</function>.</para> - + <variablelist> + <varlistentry> + <term><parameter>var</parameter></term> + <listitem> + <para> + La variable a evaluar. + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + Devuelve &true; si <parameter>var</parameter> es un valor tipo + <type>object</type>, &false; de lo contrario. + </para> + </refsect1> + <refsect1 role="seealso"> + &reftitle.seealso; + <para> + <simplelist> + <member><function>is_bool</function></member> + <member><function>is_int</function></member> + <member><function>is_float</function></member> + <member><function>is_string</function></member> + <member><function>is_array</function></member> + </simplelist> + </para> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc-es/reference/var/functions/is-string.xml?r1=1.1&r2=1.2&ty=u Index: phpdoc-es/reference/var/functions/is-string.xml diff -u phpdoc-es/reference/var/functions/is-string.xml:1.1 phpdoc-es/reference/var/functions/is-string.xml:1.2 --- phpdoc-es/reference/var/functions/is-string.xml:1.1 Sun Apr 14 20:20:31 2002 +++ phpdoc-es/reference/var/functions/is-string.xml Mon Aug 8 02:45:33 2005 @@ -1,34 +1,56 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- splitted from ./es/functions/var.xml, last change in rev 1.1 --> -<!-- last change to 'is-string' in en/ tree in rev 1.19 --> - <refentry id="function.is-string"> - <refnamediv> - <refname>is_string</refname> - <refpurpose>Averigua si una varible es una cadena de caracteres (string).</refpurpose> - </refnamediv> - <refsect1> - <title>Descripci&oacute;n</title> - <methodsynopsis> - <type>int</type><methodname>is_string</methodname> - <methodparam><type>mixed</type><parameter>var</parameter></methodparam> - </methodsynopsis> - - <para> - Devuelve &true; si <parameter>var</parameter> es una cadena, - y &false; en otro caso.</para> - - <para> - Ver tambi&eacute;n <function>is_long</function>, - <function>is_int</function>, - <function>is_integer</function>, - <function>is_float</function>, - <function>is_double</function>, - <function>is_real</function>, - <function>is_object</function>, y - <function>is_array</function>.</para> - - </refsect1> - </refentry> +<!-- $Revision: 1.2 $ --> +<!-- EN-Revision: 1.5 Maintainer: lboshell Status: ready --> +<refentry id="function.is-string"> + <refnamediv> + <refname>is_string</refname> + <refpurpose>Encuentra si una variable es una cadena</refpurpose> + </refnamediv> + <refsect1 role="description"> + &reftitle.description; + <methodsynopsis> + <type>bool</type><methodname>is_string</methodname> + <methodparam><type>mixed</type><parameter>var</parameter></methodparam> + </methodsynopsis> + <para> + Encuentra si la variable dada es una cadena. + </para> + </refsect1> + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>var</parameter></term> + <listitem> + <para> + La variable a evaluar. + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + Devuelve &true; si <parameter>var</parameter> es un valor tipo + <type>string</type>, &false; de lo contrario. + </para> + </refsect1> + <refsect1 role="seealso"> + &reftitle.seealso; + <para> + <simplelist> + <member><function>is_float</function></member> + <member><function>is_int</function></member> + <member><function>is_bool</function></member> + <member><function>is_object</function></member> + <member><function>is_array</function></member> + </simplelist> + </para> + </refsect1> +</refentry> <!-- Keep this comment at the end of the file Local variables: http://cvs.php.net/diff.php/phpdoc-es/reference/var/functions/isset.xml?r1=1.1&r2=1.2&ty=u Index: phpdoc-es/reference/var/functions/isset.xml diff -u phpdoc-es/reference/var/functions/isset.xml:1.1 phpdoc-es/reference/var/functions/isset.xml:1.2 --- phpdoc-es/reference/var/functions/isset.xml:1.1 Sun Apr 14 20:20:33 2002 +++ phpdoc-es/reference/var/functions/isset.xml Mon Aug 8 02:45:33 2005 @@ -1,35 +1,112 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- splitted from ./es/functions/var.xml, last change in rev 1.1 --> -<!-- last change to 'isset' in en/ tree in rev 1.2 --> +<!-- $Revision: 1.2 $ --> +<!-- EN-Revision: 1.14 Maintainer: lboshell Status: ready --> +<!-- splitted from ./en/functions/var.xml, last change in rev 1.2 --> <refentry id="function.isset"> <refnamediv> <refname>isset</refname> - <refpurpose>Determina si una varible est&aacute; definida</refpurpose> + <refpurpose>Determinar si una variable est&aacute; + definida</refpurpose> </refnamediv> <refsect1> <title>Descripci&oacute;n</title> <methodsynopsis> - <type>int</type><methodname>isset</methodname> - <methodparam><type>mixed</type><parameter>var</parameter></methodparam> + <type>bool</type><methodname>isset</methodname> + <methodparam><type>mixed</type><parameter>var</parameter></methodparam> + <methodparam choice="opt"><type>mixed</type><parameter>var</parameter></methodparam> + <methodparam choice="opt"><parameter>...</parameter></methodparam> </methodsynopsis> - + <simpara> - Devuelve &true; si <parameter>var</parameter> existe; - y &false; en otro caso.</simpara> - + Devuelve &true; si <parameter>var</parameter> existe; &false; de + lo contrario. + </simpara> <para> - Si una variable ha sido destruida con <function>unset</function>, - ya no estar&aacute; definida (no ser&aacute; <function>isset</function>). - <informalexample><programlisting> -$a = "test"; -echo isset($a); // true -unset($a); -echo isset($a); // false -</programlisting></informalexample></para> - - <simpara> - Ver tambi&eacute;n <function>empty</function> y <function>unset</function>.</simpara> + Si una variable ha sido removida con <function>unset</function>, + ya no estar&aacute; definida. <function>isset</function> + devolver&aacute; &false; si prueba una variable que ha sido + definida como &null;. Tambi&eacute;n note que un byte &null; + (<literal>"\0"</literal>) no es equivalente a la constante &null; + de PHP. + </para> + <note> + <title>Advertencia</title> + <para> + <function>isset</function> s&oacute;lo trabaja con variables, ya + que pasar cualquier otra cosa resultar&aacute; en un error de + int&eacute;rprete. Para chequear si se han definido <link + linkend="language.constants">constantes</link>, use la + funci&oacute;n <function>defined</function>. + </para> + </note> + <para> + <informalexample> + <programlisting role="php"> +<![CDATA[ +<?php + +$var = ''; + +// Esto evaluara a TRUE asi que el texto se imprimira. +if (isset($var)) { + echo "Esta variable esta definida, asi que se imprimira esto."; +} + +// En los siguientes ejemplo usaremos var_dump para imprimir +// el valor devuelto por isset(). + +$a = "prueba"; +$b = "otraprueba"; + +var_dump(isset($a)); // TRUE +var_dump(isset($a, $b)); // TRUE + +unset ($a); + +var_dump(isset($a)); // FALSE +var_dump(isset($a, $b)); // FALSE +$foo = NULL; +var_dump(isset($foo)); // FALSE + +?> +]]> + </programlisting> + </informalexample> + </para> + <para> + Tambi&eacute;n trabaja con elementos en matrices: + <informalexample> + <programlisting role="php"> +<![CDATA[ +<?php + +$a = array ('prueba' => 1, 'hola' => NULL); + +var_dump(isset($a['prueba'])); // TRUE +var_dump(isset($a['foo'])); // FALSE +var_dump(isset($a['hola'])); // FALSE + +// La clave 'hola' es igual a NULL asi que no se considera definida +// Si desea probar por valores NULL en claves, intente: +var_dump(array_key_exists('hola', $a)); // TRUE + +?> +]]> + </programlisting> + </informalexample> + </para> + + &note.language-construct; + + <simpara> + Vea tambi&eacute;n <function>empty</function>, + <function>unset</function>, <function>defined</function>, <link + linkend="types.comparisons">las tablas de comparaci&oacute;n de + tipos</link>, <function>array_key_exists</function>, y el + operador de control de errores <link + linkend="language.operators.errorcontrol">@</link>. + </simpara> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc-es/reference/var/functions/settype.xml?r1=1.1&r2=1.2&ty=u Index: phpdoc-es/reference/var/functions/settype.xml diff -u phpdoc-es/reference/var/functions/settype.xml:1.1 phpdoc-es/reference/var/functions/settype.xml:1.2 --- phpdoc-es/reference/var/functions/settype.xml:1.1 Sun Apr 14 20:20:40 2002 +++ phpdoc-es/reference/var/functions/settype.xml Mon Aug 8 02:45:33 2005 @@ -1,39 +1,90 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- splitted from ./es/functions/var.xml, last change in rev 1.1 --> -<!-- last change to 'settype' in en/ tree in rev 1.2 --> +<!-- $Revision: 1.2 $ --> +<!-- EN-Revision: 1.7 Maintainer: lboshell Status: ready --> +<!-- splitted from ./en/functions/var.xml, last change in rev 1.2 --> <refentry id="function.settype"> <refnamediv> <refname>settype</refname> - <refpurpose>Establece el tipo de una variable.</refpurpose> + <refpurpose>Definir el tipo de una variable</refpurpose> </refnamediv> <refsect1> <title>Descripci&oacute;n</title> <methodsynopsis> - <type>int</type><methodname>settype</methodname> - <methodparam><type>string</type><parameter>var</parameter></methodparam> - <methodparam><type>string</type><parameter>type</parameter></methodparam> + <type>bool</type><methodname>settype</methodname> + <methodparam><type>mixed</type><parameter role="reference">var</parameter></methodparam> + <methodparam><type>string</type><parameter>tipo</parameter></methodparam> </methodsynopsis> - <para> - Establece el tipo de la varible <parameter>var</parameter> como - <parameter>type</parameter>.</para> - + Definir el tipo de la variable <parameter>var</parameter> a + <parameter>tipo</parameter>. + </para> <para> - Los valores posibles para <parameter>type</parameter> son: + Los posibles valores de <parameter>tipo</parameter> son: <itemizedlist> - <listitem><simpara>"integer"</simpara></listitem> - <listitem><simpara>"double"</simpara></listitem> - <listitem><simpara>"string"</simpara></listitem> - <listitem><simpara>"array"</simpara></listitem> - <listitem><simpara>"object"</simpara></listitem> - </itemizedlist></para> - + <listitem> + <simpara> + "boolean" (o, desde PHP 4.2.0, "bool") + </simpara> + </listitem> + <listitem> + <simpara> + "integer" (o, desde PHP 4.2.0, "int") + </simpara> + </listitem> + <listitem> + <simpara> + "float" (&uacute;nicamente posible desde PHP 4.2.0, para + versiones anteriores use la variante obsoleta "double") + </simpara> + </listitem> + <listitem> + <simpara> + "string" + </simpara> + </listitem> + <listitem> + <simpara> + "array" + </simpara> + </listitem> + <listitem> + <simpara> + "object" + </simpara> + </listitem> + <listitem> + <simpara> + "null" (desde PHP 4.2.0) + </simpara> + </listitem> + </itemizedlist> + </para> <para> - Devuelve &true; si se lleva a cabo con &eacute;xito; en otro caso devuelve &false;.</para> - + &return.success; + </para> <para> - Ver tambi&eacute;n <function>gettype</function>.</para> - + <example> + <title>Ejemplo de <function>settype</function></title> + <programlisting role="php"> +<![CDATA[ +<?php +$foo = "5bar"; // string +$bar = true; // boolean + +settype($foo, "integer"); // $foo es ahora 5 (integer) +settype($bar, "string"); // $bar es ahora "1" (string) +?> +]]> + </programlisting> + </example> + </para> + <para> + Vea tambi&eacute;n <function>gettype</function>, <link + linkend="language.types.typecasting">moldeamiento de tipos</link> + y <link + linkend="language.types.type-juggling">manipulaci&oacute;n de + tipos</link>. + </para> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc-es/reference/var/functions/strval.xml?r1=1.1&r2=1.2&ty=u Index: phpdoc-es/reference/var/functions/strval.xml diff -u phpdoc-es/reference/var/functions/strval.xml:1.1 phpdoc-es/reference/var/functions/strval.xml:1.2 --- phpdoc-es/reference/var/functions/strval.xml:1.1 Sun Apr 14 20:20:40 2002 +++ phpdoc-es/reference/var/functions/strval.xml Mon Aug 8 02:45:33 2005 @@ -1,30 +1,36 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- splitted from ./es/functions/var.xml, last change in rev 1.1 --> -<!-- last change to 'strval' in en/ tree in rev 1.28 --> +<!-- $Revision: 1.2 $ --> +<!-- EN-Revision: 1.2 Maintainer: lboshell Status: ready --> +<!-- splitted from ./en/functions/var.xml, last change in rev 1.28 --> <refentry id="function.strval"> <refnamediv> <refname>strval</refname> - <refpurpose>Obtiene una cadena de caracteres a partir de una variable.</refpurpose> + <refpurpose>Obtener el valor de cadena de una + variable</refpurpose> </refnamediv> <refsect1> <title>Descripci&oacute;n</title> <methodsynopsis> - <type>string</type><methodname>strval</methodname> - <methodparam><type>mixed</type><parameter>var</parameter></methodparam> + <type>string</type><methodname>strval</methodname> + <methodparam><type>mixed</type><parameter>var</parameter></methodparam> </methodsynopsis> - <simpara> - Devuelve una cadena con el valor de <parameter>var</parameter>.</simpara> - + Devuelve el valor <type>string</type> de + <parameter>var</parameter>. Vea la documentaci&oacute;n sobre el + tipo <type>string</type> para m&aacute;s informaci&oacute;n sobre + la conversi&oacute;n a cadena. + </simpara> <simpara> - <parameter>var</parameter> puede ser cualquier tipo escalar. No se puede usar - <function>strval</function> sobre arrays u objetos.</simpara> - + <parameter>var</parameter> puede ser cualquier tipo escalar. No + es posible usar <function>strval</function> sobre matrices u + objetos. + </simpara> <simpara> - Ver tambi&eacute;n <function>doubleval</function>, - <function>intval</function>, - <function>settype</function> y <link linkend="language.types.type-juggling">Type juggling</link>.</simpara> - + Vea tambi&eacute;n <function>floatval</function>, + <function>intval</function>, <function>settype</function> y <link + linkend="language.types.type-juggling">Manipulaci&oacute;n de + tipos</link>. + </simpara> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc-es/reference/var/functions/unset.xml?r1=1.1&r2=1.2&ty=u Index: phpdoc-es/reference/var/functions/unset.xml diff -u phpdoc-es/reference/var/functions/unset.xml:1.1 phpdoc-es/reference/var/functions/unset.xml:1.2 --- phpdoc-es/reference/var/functions/unset.xml:1.1 Sun Apr 14 20:20:42 2002 +++ phpdoc-es/reference/var/functions/unset.xml Mon Aug 8 02:45:33 2005 @@ -1,34 +1,190 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- splitted from ./es/functions/var.xml, last change in rev 1.1 --> -<!-- last change to 'unset' in en/ tree in rev 1.2 --> +<!-- $Revision: 1.2 $ --> +<!-- EN-Revision: 1.12 Maintainer: lboshell Status: ready --> +<!-- splitted from ./en/functions/var.xml, last change in rev 1.2 --> <refentry id="function.unset"> <refnamediv> <refname>unset</refname> - <refpurpose>Destruye una variable dada</refpurpose> + <refpurpose>Remover una variable dada</refpurpose> </refnamediv> <refsect1> <title>Descripci&oacute;n</title> <methodsynopsis> - <type>int</type><methodname>unset</methodname> - <methodparam><type>mixed</type><parameter>var</parameter></methodparam> + <type>void</type><methodname>unset</methodname> + <methodparam><type>mixed</type><parameter>var</parameter></methodparam> + <methodparam choice="opt"><type>mixed</type><parameter>var</parameter></methodparam> + <methodparam choice="opt"><type>mixed</type><parameter>...</parameter></methodparam> </methodsynopsis> <para> - <function>unset</function> destruye la variable especificada y - devuelve &true;.</para> - + <function>unset</function> destruye las variables + especificadas. Note que en PHP 3, <function>unset</function> + siempr&eacute; devolver&aacute; &true; (en realidad, el valor + entero 1). En PHP 4, sin embargo, <function>unset</function> no + es una funci&oacute;n verdadera: es una sentencia. Como tal, no + devuelve valor alguno, e intentar tomar el valor de + <function>unset</function> resulta en un error de + int&eacute;rprete. + </para> <para> <example> <title>Ejemplo de <function>unset</function></title> - <programlisting> -unset( $foo ); -unset( $bar['quux'] ); + <programlisting role="php"> +<![CDATA[ +<?php +// destruir una variable sencilla +unset($foo); + +// destruir un elemento de una matriz +unset($bar['quux']); + +// destruir mas de una variable +unset($foo1, $foo2, $foo3); +?> +]]> </programlisting> - </example></para> + </example> + </para> + <para> + El comportamiento de <function>unset</function> al interior de + una funci&oacute;n puede variar dependiendo del tipo de variable + que intenta destruir. + </para> + <para> + Si se aplica <function>unset</function> sobre una variable global + al interior de una funci&oacute;n, solo la variable local es + destruida. La variable en el entorno de la llamada + retendr&aacute; el mismo valor que antes que que se llamara + <function>unset</function>. + <informalexample> + <programlisting role="php"> +<![CDATA[ +<?php +function destruir_foo() +{ + global $foo; + unset($foo); +} + +$foo = 'bar'; +destruir_foo(); +echo $foo; +?> +]]> + </programlisting> + </informalexample> + </para> + &example.outputs; + <para> + <informalexample> + <screen> +<![CDATA[ +bar +]]> + </screen> + </informalexample> + </para> + <para> + Si se aplica <function>unset</function> sobre una variable que es + PASADA POR REFERENCIA al interior de una funci&oacute;n, solo la + variable local es destruida. La variable en el entorno de la + llamada retendr&aacute; el mismo valor que antes de que + <function>unset</function> fuera llamada. + <informalexample> + <programlisting role="php"> +<![CDATA[ +<?php +function foo(&$bar) +{ + unset($bar); + $bar = "blah"; +} + +$bar = 'algo'; +echo "$bar\n"; + +foo($bar); +echo "$bar\n"; +?> +]]> + </programlisting> + </informalexample> + </para> + &example.outputs; + <para> + <informalexample> + <screen> +<![CDATA[ +algo +algo +]]> + </screen> + </informalexample> + </para> + <para> + Si se aplica <function>unset</function> sobre una variable + est&aacute;tica al interior de una funci&oacute;n, + <function>unset</function> destruye la variable y todas sus + referencias. + <informalexample> + <programlisting role="php"> +<![CDATA[ +<?php +function foo() +{ + static $a; + $a++; + echo "$a\n"; + unset($a); +} + +foo(); +foo(); +foo(); +?> +]]> + </programlisting> + </informalexample> + </para> + &example.outputs; + <para> + <informalexample> + <screen> +<![CDATA[ +1 +2 +3 +]]> + </screen> + </informalexample> + </para> + <para> + Si desea remover una variable global desde el interior de una + funci&oacute;n, puede usar la matriz <varname>$GLOBALS</varname> + para tal efecto: + <informalexample> + <programlisting role="php"> +<![CDATA[ +<?php +function foo() +{ + unset($GLOBALS['bar']); +} + +$bar = "algo"; +foo(); +?> +]]> + </programlisting> + </informalexample> + </para> + + &note.language-construct; <para> - Ver tambi&eacute;n <function>isset</function> y <function>empty</function>.</para> - + Vea tambi&eacute;n <function>isset</function>, + <function>empty</function>, y <function>array_splice</function>. + </para> </refsect1> </refentry>
« previous php.doc.es (#1244) next »