• ¿Documento equivocado? Cámbialo gratis
  • Escrito por estudiantes que aprobaron
  • Inmediatamente disponible después del pago
  • Leer en línea o como PDF
Vender
¿Dónde estudias?
Tu idioma
Document preview thumbnail
Vista previa 2 fuera de 5 páginas
Examen

Php Questions And Answers

Document preview thumbnail
Vista previa 2 fuera de 5 páginas

PHP QUESTIONS AND ANSWERS

Vista previa del contenido

PHP QUESTIONS AND ANSWERS

What does php stand for? - Answers -PHP stands for PHP: Hypertext Preprocessor

is PHP server side or client side scripting language? - Answers -server side

how are php files returned to the browser? - Answers -PHP files are returned to the
browser as plain HTML

how is a php started and ended? - Answers -A PHP scripting block always starts with
<?php and ends with ?>

where can a php script be placed in the document? - Answers -anywhere

how must each php code line end? - Answers -with a semi colon

what is the purpose of the semi colon? - Answers -it is a separator and used to
distinguish one set of instructions from another

what are two basic statements to output text with PHP? - Answers -echo and print

what happens if the php file has an html extension instead of PHP? - Answers -the php
code will not be executed

how is a single line comment made in php? - Answers -With //

how is a comment block made? - Answers -/* */

What are variables used for? - Answers -Variables are used for storing values, such as
numbers, strings or function results, so that they can be used many times in a script.

what do all variables start with? - Answers -All variables in PHP start with a $ sign
symbol.

The correct way of setting a variable in PHP: - Answers -$var_name = value;

is PHP strongly or loosely typed? - Answers -loosely

in php does a variable need to be declared (created) before being set? - Answers -no,
php automatically creates the variable and sets it to the correct type.

What is meant by the term strongly typed? - Answers -variables have to be defined
before they can be used

, in php how must a variable name start? - Answers -A variable name must start with a
letter or an underscore _

What kinds of characters can a variable name contain? - Answers -A variable name
can only contain alpha-numeric characters and underscores (a-z, A-Z, 0-9, and _ )

should a variable name contain spaces? - Answers -no

if a variable name is more than one word how should it be formatted? - Answers -with
an underscore between words or with the second word capitalized

What is a string variable used for? - Answers -A string variable is used to store and
manipulate a piece of text.

What is the only string operator in php? - Answers -The concatenation operator (.)

What is the concatenation operator used for? - Answers -to put two string values
together.

what are operators used for? - Answers -Operators are used to operate on values.

What kinds of different operators exist? - Answers -arithmetic, assignment, comparison,
and logical

when should the if else statement be used? - Answers -if you want to execute a set of
code when a condition is true and another if the condition is not true

when should the else if statement be used? - Answers -is used with the if...else
statement to execute a set of code if one of several condition are true

if more than one line is to be executed as a result of the if else statement then the lines
to be executed should be enclosed in curly braces - Answers -...

What is the switch statement used for in PHP? - Answers -to perform one of several
different actions based on one of several different conditions.

If you want to select one of many blocks of code to be executed which statement should
be used? - Answers -switch

What is the primary advantage of using the switch statement? - Answers -It avoids
avoid long blocks of if..elseif..else code.

What is an Array? - Answers -An array can store one or more values in a single
variable name.

Información del documento

Subido en
23 de enero de 2026
Número de páginas
5
Escrito en
2025/2026
Tipo
Examen
Contiene
Preguntas y respuestas
$12.99

¿Documento equivocado? Cámbialo gratis Dentro de los 14 días posteriores a la compra y antes de descargarlo, puedes elegir otro documento. Puedes gastar el importe de nuevo.
Escrito por estudiantes que aprobaron
Inmediatamente disponible después del pago
Leer en línea o como PDF

Seller avatar
Los indicadores de reputación están sujetos a la cantidad de artículos vendidos por una tarifa y las reseñas que ha recibido por esos documentos. Hay tres niveles: Bronce, Plata y Oro. Cuanto mayor reputación, más podrás confiar en la calidad del trabajo del vendedor.
GEEKA
3.8
(376)
Vendido
2223
Seguidores
1450
Artículos
62811
Última venta
15 horas hace



Por qué los estudiantes eligen Stuvia

Creado por compañeros estudiantes, verificado por reseñas

Calidad en la que puedes confiar: escrito por estudiantes que aprobaron y evaluado por otros que han usado estos resúmenes.

¿No estás satisfecho? Elige otro documento

¡No te preocupes! Puedes elegir directamente otro documento que se ajuste mejor a lo que buscas.

Paga como quieras, empieza a estudiar al instante

Sin suscripción, sin compromisos. Paga como estés acostumbrado con tarjeta de crédito y descarga tu documento PDF inmediatamente.

Student with book image

“Comprado, descargado y aprobado. Así de fácil puede ser.”

Alisha Student

Preguntas frecuentes