<?php
namespace Modelo;
use modelo\cpf;
Class CPF {
private $cpf;
public function __construct ( string $cpf) {
$this -> cpf = $cpf;
}
public function recuperaCPF() : string {
return $this-> cpf;
}
}
Ao rodar
Interactive shell
php > require 'C:\Users\rlirio\Documents\ProjetoPHP\Modelo\cpf.php';
php > $cpf = New CPF('1212131414');
PHP Warning: Uncaught Error: Class 'CPF' not found in php shell code:1
Stack trace:
#0 {main}
thrown in php shell code on line 1
Warning: Uncaught Error: Class 'CPF' not found in php shell code:1
Stack trace:
#0 {main}
thrown in php shell code on line 1
php >