junio campos
Quiz by , created more than 1 year ago

pra não esquecer

162
0
0
junio campos
Created by junio campos almost 8 years ago
Close

Questões de PHP

Question 1 of 24

1

O que é PHP

Select one of the following:

  • Private Home Page

  • PHP: Hypertext Preprocessor

  • Personal Hypertext Processor

  • Personal Home Page

Explanation

Question 2 of 24

1

Os scripts PHP são delimitados por

Select one of the following:

  • <script>...</script>

  • <?php>...</?>

  • <&>...</&>

  • <?php…?>

Explanation

Question 3 of 24

1

Como se escreve um programa em PHP que exiba
“Hello World” no browser?

Select one of the following:

  • "Hello World";

  • Document.Write("Hello World");

  • echo "Hello World";

  • <?php 'Hello Word'; ?>

Explanation

Question 4 of 24

1

Em PHP, todas as variáveis começam com o símbolo?

Select one of the following:

  • $

  • #

  • &

  • !

Explanation

Question 5 of 24

1

Qual é a forma certa de terminar uma instrução
PHP?

Select one of the following:

  • </php>

  • Ponto e virgula ' ; '

  • com um Enter

  • virgula ','

Explanation

Question 6 of 24

1

Como se acede a informação submetida com o
método GET?

Select one of the following:

  • Request.QueryString;

  • Request.Form;

  • $_GET[];

Explanation

Question 7 of 24

1

Quando se usa o método POST, as variáveis

Select one of the following:

  • São exibidas no URL

  • O método POST só serve para enviar emails

  • São enviadas sem ser exibidas no Browser

  • O método POST só serve para receber variáveis

Explanation

Question 8 of 24

1

Qual é a forma certa de incluir o ficheiro "time.inc" ?

Select one of the following:

  • <!-- include file="time.inc" -->

  • <?php include "time.inc"; ?>

  • <?php include file="time.inc"; ?>

  • <?php include:"time.inc"; ?>

Explanation

Question 9 of 24

1

Qual é a forma correcta de criar uma função em
PHP?

Select one of the following:

  • function myFunction()

  • create myFunction()

  • new_function myFunction()

Explanation

Question 10 of 24

1

Qual é a forma correcta de abrir o ficheiro "time.txt" para leitura?

Select one of the following:

  • fopen("time.txt","r+");

  • open("time.txt");

  • fopen("time.txt","r");

  • open("time.txt","read");

Explanation

Question 11 of 24

1

Qual é a forma correcta para estabelecer uma ligação
a uma base de dados MySQL?

Select one of the following:

  • mysql_connect(hostname, userid, password)

  • mysql_open(host,username,password,dbname);

  • mysqli_db(host,username,password,dbname);

Explanation

Question 12 of 24

1

Qual é a forma correcta de adicionar 1 à variável
$count?

Select one of the following:

  • $count - -;

  • ++count

  • count++;

  • $count =+1

Explanation

Question 13 of 24

1

Qual é a forma correcta de escrever um comentário em
PHP?

Select one of the following:

  • *\..\*

  • <comment>…</comment>

  • <!--…-->

  • /*…*/

Explanation

Question 14 of 24

1

Qual destas variáveis tem um nome ilegal?

Select one of the following:

  • $my_Var

  • $my-Var

  • $myVar

Explanation

Question 15 of 24

1

Como se define uma constante em PHP?

Select one of the following:

  • const

  • constant

  • define

  • require

Explanation

Question 16 of 24

1

Como se cria um array em PHP?

Select one of the following:

  • Answers $myArray = new array();

  • $myArray = create(array);

  • $myArray = array();

  • $myArray = Array.create();

Explanation

Question 17 of 24

1

Qual das seguintes variáveis não pode ser usada para
obter dados de um formulário submetido?

Select one of the following:

  • $_POST

  • $_GET

  • $_REQUEST

  • $_FORMDATA

Explanation

Question 18 of 24

1

O PHP é uma plataforma Open Source

Select one of the following:

  • Não se aplica ao php

  • Não

  • Sim

Explanation

Question 19 of 24

1

Qual será o resultado do seguinte programa?
<?php
if (8 >= 7 && "Tom" == "Rose")
{ echo "Hello World";
}
?>

Select one of the following:

  • Hello World

  • não será exibido

Explanation

Question 20 of 24

1

Recebe dado da URL

Select one of the following:

  • $_GET

  • GET

  • $_POST

  • POST

Explanation

Question 21 of 24

1

recebe dado campo do form

Select one of the following:

  • $_POST

  • $_GET

  • POST

  • GET

Explanation

Question 22 of 24

1

encapsula junto ao corpo da requisição

Select one of the following:

  • $_GET

  • $_POST

  • GET

  • POST

Explanation

Question 23 of 24

1

encaminha e exibe pela url o resultado dos campos

Select one of the following:

  • GET

  • POST

  • $_POST

  • $_GET

Explanation

Question 24 of 24

1

Marque as opções corretas

Select one or more of the following:

  • strttoupper($_POST['campo']); transforma texto recebido do formulário em maiúsculo.

  • strtolower($_POST['campo']) ; Transforma texto recebido do formulário em minusculo.

  • client-side -> os processos ficam do lado cliente

  • server-side -> os processos ficam do lado do servidor

  • strttoupper($_POST['campo']); Transforma texto recebido do formulário em minusculo.

Explanation