PHP Interview Questions & Answers part 3
PHP is a language that has outgrown its name. It was originally conceived as a set of macros to help coders maintain personal home pages, and its name grew from its purpose. Since then, PHP's capabilities have been extended, taking it beyond a set of utilities to a full-featured programming language, capable of managing huge database-driven online environments.
ImagePolygon() and ImageFilledPolygon()
One-to-one, one-to-many, many-to-many
Q: – How can you read data from a process after you have opened a connection? What about writing data?
You can read and write to and from a process just as you can with an open file, namely with feof() and fgets() for reading and fputs() for writing.
If user input is part of your shell command, you can use the escapeshellcmd() or escapeshellarg() functions to properly escape it.
PHP 5 introduces (among other things) SQLite support, improved XML support, and a significantly improved object model.
Q: – Because many-to-many relationships are difficult to represent in an efficient database design, what should you do?
Create a series of one-to-many relationships using intermediary mapping tables.
Often the data type of a variable constrains what you can do with it. You might want to ensure that a variable contains an integer or a double before using it in a mathematical calculation, for example.
$new_image = ImageCreate(300,200);
Submitted By:-Payal Gupta Email-ID: – email@example.com