downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | conferences | my php.net

search for in the

Valores enteros en los parámetros de funciones> <Cambios en el control de referencias
[edit] Last updated: Thu, 23 May 2013

view this page in

Leyendo []

<?php
class XmlTest {

    function 
test_ref(&$test) {
        
$test "ok";
    }

    function 
test($test) { }

    function 
run() {
        
$ar = array();
        
$this->test_ref($ar[]);
        
var_dump($ar);
        
$this->test($ar[]);
    }
}

$o = new XmlTest();
$o->run();
?>

Esto debería haber emitido un error fatal E_ERROR, ya que [] no se puede usar para leer en PHP. Es un código inválido en PHP 4.4.2, PHP 5.0.5 y superior.



add a note add a note User Contributed Notes Leyendo [] - [0 notes]
There are no user contributed notes for this page.

 
show source | credits | sitemap | contact | advertising | mirror sites