Tag: web technology

Questions Related to web technology

Which is the correct way to call an object method?

  1. $object.method()

  2. $object->$method()

  3. $object:$method()

  4. $object->method()


Correct Option: D
  1. Object attributes are not of any specific data type

  2. The constructor of the class is not correctly defined

  3. You cannot put an equal when recieving a parameter in the constructor

  4. The word function is missing before the class constructor


Correct Option: D

Which is the function, besides join(), that you use to join array elements with a string?

  1. strconcat(string $glue, array $pieces)

  2. implode ( string $glue , array $pieces )

  3. strcmp(array $pieces, string $concat, int $elementNumber)

  4. arrayConcat(array $pieces, string $concat, string $EOF)


Correct Option: B

Which logical operators are allowed in PHP?

  1. &&

  2. and

  3. nxor

  4. ||


Correct Option: A,B,D
  1. $var = new asoc_array("key"->"value","key2"->"value2");

  2. $var = array("key"=>"value","key2"=>"value2");

  3. $var = new ArrayList("key,value","key1,value1");

  4. $var = new List(Of Associative)["key"=>"value","key1","value1"];


Correct Option: B
  1. $result = mysql_obtain_rows($query);

  2. $result = mysql_executeNonQuery($query);

  3. $result = mysql_query($query);

  4. $record = mysql_fetch_array($result)


Correct Option: C,D