Logo F2FInterview

Php Advanced Interview Questions

Q   |   QA

Since the data inside the single-quoted string is not parsed for variable substitution, it’s always a better idea speed-wise to initialize a string with single quotes, unless you specifically need variable substitution.

We can use the preg_match() function with "/.*@(.*)$/" as

the regular expression pattern. For example:

preg_match("/.*@(.*)$/","http://info@abc.com",$data);

echo $data[1];

unlink() is a function for file system handling. It will simply delete the file in context.

unset() is a function for variable management. It will make a variable undefined.

Any time you have an array with more than one dimension, complex parsing syntax is required. print "Contents: {$arr[1][2]}" would’ve worked.

session_register($session_var);

$_SESSION['var'] = ‘value’;

In order to link this F2FInterview's page as Reference on your website or Blog, click on below text area and pres (CTRL-C) to copy the code in clipboard or right click then copy the following lines after that paste into your website or Blog.

Get Reference Link To This Page: (copy below code by (CTRL-C) and paste into your website or Blog)
HTML Rendering of above code: