Upwork Test answers 2018 | Latest | Solved | Top 10 %

Q.1:

Given the following array:

$array = array(0 => 'blue', 1 => 'red', 2 => 'Green', 3 => 'red');

which one of the following will print 2?

Q.2:

if you are given two dates in this form;

Start Date: 2017-03-24
End Date: 2009-06-26

which code snippet finds the difference between these 2 in the following form;

2 years, 3 months, and 2 days

PHP > 5.3

Q.3:
PDO_MYSQL data source name (DSN) is composed of following elements?
Q.4:

Which function can be used to determine if a file exists?

Q.5:
you can extend the exception class but you cannot extend any on the preceding methods because they are declared as:
Q.6: 
PHP currently offering following functions for searching strings using POSIX-Style regular expressions?
Q.7:
 How to create a database with PHP in MySQL server?
Q.8:
 with regard to the static keyword in PHP, which of the following statement is false?
Q.9:
 which of the following is not a valid DOM method in PHP?
Q.10: 
which of the following statement is incorrect with respect to “!==” and “==!”?
Q.11:
 what is the procedural style of the associative array?
Q.12: 
what is the difference between “echo” and “print” in PHP?
Q.13:

what will be the output of the following code?

<?php
var_dump(floor(3.74));
?>

Q.14:
Which of the following will be used to print today’s date in PHP?

Q.15:
what is the output of the following code?
$foo = 400;
$bar = 10;
echo $foo.”+”.$bar;
Q.16:
Correct format to convert represent year 2
Q.17:
How to enable short tag in php.ini file?
Q.18:
What will be the output of the following code?
Q.19:
How to remove white spaces from the beginning and end of the string variable in PHP?

Q.20:

how would you create enums in php?

Q.21:

which of the following are valid My_Sqli configuration options?

Q.22:
Which of these is not a valid API?
Q.23:
PHP currently offers the following functions for searching strings using POSIX style regular expressions?
Q.24:
placing the _____ symbol before a function tells php to suppress any errors generated by that function

Q.25:

How can you rename a file in PHP?

Q.26:

simple way to send smtp email:

Q.27:

What are methods in PHP?

Q.28:

what happens if the fatal error was thrown in your program?

Q.29:

what is the best practice for running MySQL queries in PHP consider the risk of SQL injection?

Q.30:

what is the correct syntax of constructor function?

Q.31:

what is wrong with the following code ?

Q.32:

what of the following mode is used to write into the file at the end of the existing content and create the file if it does not exist?

Q.33:

what will be the output of the following code?

Q.34:

which function is used to determine that a file exists?

Q.35:

which function is used to read a file removing the HTML and PHP tags in it?

Q.36:

which function will used to destroy a variable or object?

Q.37:

which inbuilt function will add value to end of the array?

Q.38:

which is the correct syntax of mail() function in PHP?

Q.39:

which is the valid way to add 1 to count variable?

Q.40:

which method is use d to tweak an object cloning behavior in php?

Q.41:

which mime type needs to be used to send an attachment in mail?

Q.42:

which of the following are valid MySQL configuration options- true?

Q.43:

which of the following will produce val of 83?

Q.44:

which of the following is true about singleton design pattern?

Q.45:

which of the following will detect which request type was used (GET, POST, PUT or DELETE) q.mark?

Q.46:

which of these is not a valid SimpleXml parser method?

Q.47:

which one is valid XML API?

Q.48:

which statement is not correct ?

Q.49:

you can extend the exception class but you can not override any of the preceding methods because they are declared as?

Q.50:

what of the following mode is used to write into the file at the end of the existing content and create the file if it does not exist?

Share it in your network:

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

small_c_popup.png

Congratulations!

You have successfully subscribed to my email list. Now you will be recieving latest wordpress tips and tricks directly in your mail box.

Don’t worry! I won’t spam you