Usuario:ManuelRomero/Laravel/artisan

De WikiEducator
Saltar a: navegación, buscar
<?php
 
class prueba{
    public function __construct() {
        echo "hola desde contruct ";
    }
    public function prueba($a){
        echo "hola desde prueba $a";
    }
}
 
$p = new prueba(5);
 
?>
class prueba{
  <?php
class Complejo{
 
private $real;
private $imaginario;
 
    public function __construct( $a, $b) {
        $this->real = $a;
        $this->imaginario=$b;
    }
    public function  conjugado(Complejo $n){
        return new Complejo ($a, -$b);
 
    }
 
 
}
 
?>
}
<?php
class Complejo{
 
public $dia;
public $mes;
public $year;
 
    public function __construct( $d, $m,$y) {
        $this->dia = $d;
        $this->mes=$m;
        $this->year=$y;
    }
    public function getDia(){
        return ($this->dia);
    }
    public function getMes(){
        return ($this->mes);
    }
    public function getYear(){
        return ($this->year);
    }
 }
 
?>