0

Basic PHP Quiz - 5

Description: Basic PHP Quiz - 5
Number of Questions: 10
Created by:
Tags: php
Attempted 0/10 Correct 0 Score 0

Include files must have the file extension ".inc"

php
  1. True

  2. False


Correct Option: B

In PHP you can use both single quotes ( ' ' ) and double quotes ( " " ) for strings:

php
  1. True

  2. False


Correct Option: A

What is the correct way to create a function in PHP?

php
  1. function myFunction()

  2. new_function myFunction()

  3. create myFunction()


Correct Option: A

What is the correct way to connect to a MySQL database?

php
  1. mysql_open("localhost");

  2. connect_mysql("localhost");

  3. dbopen("localhost");

  4. mysql_connect("localhost");


Correct Option: D

What is the correct way to add 1 to the $count variable?

php
  1. count++;

  2. $count++;

  3. ++count

  4. $count =+1


Correct Option: B

PHP can be run on Microsoft Windows IIS(Internet Information Server):

php
  1. True

  2. False


Correct Option: A

Which one of these variables has an illegal name?

php
  1. $my-Var

  2. $myVar

  3. $my_Var


Correct Option: A

Which of the following regular expressions will match the string no.no.no?

php
  1. no?no?no

  2. no*no*no*

  3. ........

  4. ........


Correct Option: C
- Hide questions