Ver Mensaje Individual
  #7 (permalink)  
Antiguo 22/04/2003, 08:24
josemi
Ex Colaborador
 
Fecha de Ingreso: junio-2002
Mensajes: 9.091
Antigüedad: 21 años, 10 meses
Puntos: 16
Tal como lo has puesto:
Código PHP:
 return $this->uno+$this->dos+$this->$GLOBALS["tres"]; 
equivale a
Código PHP:
 return $this->uno+$this->dos+$this->3
($GLOBALS['tres'] se sustituye por su valor).

Lo que quieres es poner sin el $this:
Código PHP:
 return $this->uno+$this->dos+$GLOBALS["tres"]; 
Aunque yo sinceramente pasaria el valor externo a la clase como parametro.

Saludos.
__________________
Josemi

Aprendiz de mucho, maestro de poco.