I'm studying POO in php, and I've done this code, but when I run it, the page goes blank and does not show me the data I've entered before, any help?
<?php
class coche{
var $ruedas;
var $color;
var $motor;
}
function __construct(){
$this->ruedas=4;
$this->color="";
$this->motor=1600;
}
function arrancar(){
echo "Estoy arrancando";
}
function frenar (){
echo "Estoy frenando";
}
function girar(){
echo "Estoy girando";
}
$renault=new coche();
$chevrolet= new coche();
$mazda = new coche();
$mazda->girar();
echo $mazda->ruedas;
?>
and I get this error
Fatal error: Call to undefined method car :: rotate () in C: \ wamp \ www \ Php Course \ Video 14. (Programming Oriented to Objects) \ POO (III) (Calls to methods with parameters and reuse of code) \ poo3.php on line 36
Line 36 would be $ mazda- > rotate (); I do not see the error