How can I print the cpf
screen according to my code?
The code:
<?php
class valida {
protected $cpf;
public function cpf($cpf) {
if(is_numeric($cpf) and $cpf > 11) {
$this->cpf = $cpf;
return $cpf;
}
}
}
class manda extends valida {
function foo() {
return $this->cpf;
}
}
$cpf1 = $_GET['cpf'];
$p1 = new valida;
$p1->cpf($cpf1);
$sis = new manda;
echo $sis->foo();
What am I doing wrong?