Questão de Programação — PHP — FGV 2023
ProgramaçãoPHP
- Código
- fg063630
- Banca
- FGV
- Órgão
- DPE-RS
- Ano
- 2023
- Nível
- Superior
- Cargo
- Analista - Área de Apoio Especializado - Tecnologia da Informação - Desenvolvimento de Sistemas
Analise o código PHP abaixo, no qual três linhas foram omitidas do trecho tracejado.<!DOCTYPE html><html><body><?phpclass Time {public $x;public $y;function set_n($x) {$this->n = $x;}function get_n() {return $this->n;}function set_c($c) {$this->c = $c;}function get_c() {return $this->c;}}- - - - - - - - - - - - - -echo "Time: " . $t->get_n();echo "<br>";echo "Cor: " . $t->get_c();?></body></html>Dado que essa página exibe o trechoTime: FlamengoCor: Redas linhas omitidas são:
- A$t = new Time();$t->set_n('Flamengo');$t->set_c('Red');
- B$t = new Time;$t = set_n('Flamengo');$t = set_c('Red');
- C$t = new Time();$t := set_n('Flamengo');$t := set_c('Red');
- D$t<-new Time;$t->set_n('Flamengo');$t->set_c('Red');
- E$t = new Time();$t.set_n('Flamengo');$t.set_c('Red');