Una función no puede devolver múltiples valores, pero se pueden obtener resultados similares devolviendo un array.
A function can not return multiple values, but similar results can be obtained by returning an array.
Como demostración, vamos a crear una aplicación Rack sencilla pasándole el hash de entorno a un nuevo objeto proc, devolviendo un array con un código de estado, un hash de cabeceras vacío y el contenido.
To demonstrate this we'll quickly create a simple Rack application by passing in the environment hash to a new proc object and return an array with a status code, an (empty) hash of headers and some simple body content.
Como resultado, cuando llamas a yii\web\Session::getFlash(), puedes encontrarte algunas veces que te está devolviendo un array mientras que otras veces te está devolviendo un string, esto depende del orden que invoques a estos dos métodos. Cookies
As a result, when you call yii\web\Session::getFlash(), you may find sometimes you are getting an array while sometimes you are getting a string, depending on the order of the invocation of these two methods.
Alte rezultate
Devolviendo Valores Recuperar valores de un array, un objeto o una estructura compleja usando PHP estándar es bastante repetitivo.
Retrieving values from an array, an object or a complex structure consisting of both using standard PHP is quite repetitive.
Devuelve un array de salida con todas las variables añadidas a él.
Returns the output array with all the variables added to it.
Devuelve un array de números de mensajes ordenados según los parámetros dados.
Returns an array of message numbers sorted by the given parameters.
Un disco de un array pueden fallar sin datos que se ven afectados.
One disk in an array can fail without data being affected.
Devuelve un array que contiene el estado de la creación del índice.
Returns an array containing the status of the index creation.
Esta función devuelve un array en el cual cada elemento describe un índice.
This function returns an array in which each element describes an index.
El tercero es un array de opciones para la etiqueta form.
The third one is an array of options for the form tag.
Puede pasar un array como un argumento de función en VB.Net.
You can pass an array as a function argument in VB.Net.
Crear un total acumulado de un array es una operación rutinaria.
Creating a running total of an array is a common operation.
Devuelve un array donde cada elemento corresponde a una línea de texto.
Returns an array where each element corresponds to one line of text.
Conținut posibil inadecvat
Exemplele au rolul de a te ajuta să traduci cuvinte sau expresii corect si adaptat la context. Nu sunt selectate sau validate manual, așadar pot conține termeni inadecvați. Te rugăm să raportezi exemplele pe care le consideri inadecvate. Traducerile vulgare sau colocviale sunt în general marcate cu roșu sau cu portocaliu.
Înregistrează-te pentru a accesa mai multe exemple