June 17, 2019

Srikaanth

AppDynamics Most Frequently Asked PHP Interview Questions

AppDynamics Most Frequently Asked PHP Latest Interview Questions Answers

How Do You Pass A Variable By Value?

Just like in C++, put an ampersand in front of it, like $a = &$b.

What Is The Functionality Of The Functions Strstr() And Stristr()?

string strstr ( string haystack, string needle ) returns part of haystack string from the first occurrence of needle to the end of haystack. This function is case-sensitive.
stristr() is idential to strstr() except that it is case insensitive.

When Are You Supposed To Use Endif To End The Conditional Statement?

When the original if was followed by : and then the code block without braces.

How Can We Send Mail Using Javascript?

No. There is no way to send emails directly using JavaScript.
But you can use JavaScript to execute a client side email program send the email using the "mailto" code. Here is an example:
function myfunction(form)
{
tdata=document.myform.tbox1.value;
location="mailto:mailid@domain.com?subject=...";
return true;
}
AppDynamics Most Frequently Asked PHP Latest Interview Questions Answers
AppDynamics Most Frequently Asked PHP Latest Interview Questions Answers

What Is The Functionality Of The Function Strstr And Stristr?

strstr() returns part of a given string from the first occurrence of a given substring to the end of the string. For example: strstr("user@example.com","@") will return "@example.com".
stristr() is idential to strstr() except that it is case insensitive.

What Is The Difference Between Ereg_replace() And Eregi_replace()?

eregi_replace() function is identical to ereg_replace() except that it ignores case distinction when matching alphabetic characters.

How Do I Find Out The Number Of Parameters Passed Into Function9?

func_num_args() function returns the number of parameters passed in.

What Is The Purpose Of The Following Files Having Extensions: Frm, Myd, And Myi? What These Files Contain?

In MySQL, the default table type is MyISAM.
Each MyISAM table is stored on disk in three files. The files have names that begin with
the table name and have an extension to indicate the file type.

The '.frm' file stores the table definition.
The data file has a '.MYD' (MYData) extension.
The index file has a '.MYI' (MYIndex) extension.

If The Variable $a Is Equal To 5 And Variable $b Is Equal To Character A, What's The Value Of $$b?

5, it’s a reference to existing variable.

How To Protect Special Characters In Query String?

If you want to include special characters like spaces in the query string, you need to protect them by applying the urlencode() translation function. The script below shows how to use urlencode():

<?php
print("<html>");
print("<p>Please click the links below"
." to submit comments about FYICenter.com:</p>");
$comment = 'I want to say: "It\'s a good site! :->"';
$comment = urlencode($comment);
print("<p>"
."<a href=\"processing_forms.php?name=Guest&comment=$comment\">"
."It's an excellent site!</a></p>");
$comment = 'This visitor said: "It\'s an average site! :-("';
$comment = urlencode($comment);
print("<p>"
.'<a href="processing_forms.php?'.$comment.'">'
."It's an average site.</a></p>");
print("</html>");
?>

Are Objects Passed By Value Or By Reference?
Everything is passed by value.

What Are The Differences Between Drop A Table And Truncate A Table?
DROP TABLE table_name - This will delete the table and its data.

TRUNCATE TABLE table_name - This will delete the data of the table, but not the table definition.

What Is The Difference Between Characters \023 And \x23?

The first one is octal 23, the second is hex 23.

How Can We Submit Form Without A Submit Button?
We can use a simple JavaScript code linked to an event trigger of any form field. In the JavaScript code, we can call the document.form.submit() function to submit the form. For example: <input type=button value="Save" onClick="document.form.submit()">.

How Can We Create A Database Using Php And Mysql?
We can create MySQL database with the use of mysql_create_db($databaseName) to create a database.

How Many Ways We Can Retrieve The Date In Result Set Of Mysql Using Php?
As individual objects so single record or as a set or arrays.

How Many Ways Can We Get The Value Of Current Session Id?

session_id() returns the session id for the current session.

Can We Use Include ("abc.php") Two Times In A Php Page "makeit.php"?
Yes.

What's The Difference Between Include And Require?

It’s how they handle failures. If the file is not found by require(), it will cause a fatal error and halt the execution of the script. If the file is not found by include(), a warning will be issued, but execution will continue.

Explain The Ternary Conditional Operator In Php?
Expression preceding the ? is evaluated, if it’s true, then the expression preceding the : is executed, otherwise, the expression following : is executed.

What Type Of Headers Have To Be Added In The Mail Function To Attach A File?

$boundary = '--' . md5( uniqid ( rand() ) );
$headers = "From: \"Me\"\n";
$headers .= "MIME-Version: 1.0\n";
$headers .= "Content-Type: multipart/mixed; boundary=\"$boundary\"";

List Out Different Arguments In Php Header Function?
void header ( string string [, bool replace [, int http_response_code]]).

What Are The Different Functions In Sorting An Array?
Sorting functions in PHP:
asort()
arsort()
ksort()
krsort()
uksort()
sort()
natsort()
rsort()

How Can We Know The Count / Number Of Elements Of An Array?
2 ways:

sizeof($array) - This function is an alias of count().
count($urarray) - This function returns the number of elements in an array. Interestingly if you just pass a simple var instead of an array, count() will return 1.

Subscribe to get more Posts :