• +91 9971497814
  • info@interviewmaterial.com

Computer Interview Questions Answers

PHP Interview Questions Answers

Question - 41 : - What type of inheritance that php supports?

Answer - 41 : - In PHP an extended class is always dependent on a single base class, that is, multiple inheritance is not supported. Classes are extended using the keyword 'extends'.

Question - 42 : - Who is the father of PHP and what is the current version of PHP and MYSQL?

Answer - 42 : - Rasmus Lerdorf. PHP 5.1. Beta MySQL 5.0

Question - 43 : - What is the functionality of MD5 function in PHP?

Answer - 43 : - string md5(string) It calculates the MD5 hash of a string. The hash is a 32-character hexadecimal number.

Question - 44 : - How can we repair a MySQL table?

Answer - 44 : - The syntex for repairing a mysql table is: REPAIR TABLE tablename REPAIR TABLE tablename QUICK REPAIR TABLE tablename EXTENDED This command will repair the table specified. If QUICK is given, MySQL will do a repair of only the index tree. If EXTENDED is given, it will create index row by row.

Question - 45 : - What are the reasons for selecting LAMP (Linux, Apache, MySQL, Php) instead of combination of other software programs, servers and operating systems?

Answer - 45 : - All of those are open source resource. Security of  Linux is very more than windows. Apache is a better server that IIS both in functionality and security. Mysql is world most popular open source database. Php is more faster that asp or any other scripting language.

Question - 46 : - What is maximum size of a database in mysql?

Answer - 46 : - If the operating system or filesystem places a limit on the number of files in a directory, MySQL is bound by that constraint. The efficiency of the operating system in handling large numbers of files in a directory can place a practical limit on the number of tables in a database. If the time required to open a file in the directory increases significantly as the number of files increases, database performance can be adversely affected. The amount of available disk space limits the number of tables. MySQL 3.22 had a 4GB (4 gigabyte) limit on table size. With the MyISAM storage engine in MySQL 3.23, the maximum table size was increased to 65536 terabytes (2567 – 1 bytes). With this larger allowed table size, the maximum effective table size for MySQL databases is usually determined by operating system constraints on file sizes, not by MySQL internal limits. The InnoDB storage engine maintains InnoDB tables within a tablespace that can be created from several files. This allows a table to exceed the maximum individual file size. The tablespace can include raw disk partitions, which allows extremely large tables. The maximum tablespace size is 64TB. The following table lists some examples of operating system file-size limits. This is only a rough guide and is not intended to be definitive. For the most up-to-date information, be sure to check the documentation specific to your operating system. Operating System File-size Limit Linux 2.2-Intel 32-bit 2GB (LFS: 4GB) Linux 2.4+ (using ext3 filesystem) 4TB Solaris 9/10 16TB NetWare w/NSS filesystem 8TB Win32 w/ FAT/FAT32 2GB/4GB Win32 w/ NTFS 2TB (possibly larger) MacOS X w/ HFS+ 2TB

Question - 47 : - How can we encrypt the username and password using PHP?

Answer - 47 : - 1) - You can encrypt a password with the following Mysql>SET PASSWORD=PASSWORD("Password"); 2) - You can use the MySQL PASSWORD() function to encrypt username and password. For example, INSERT into user (password, ...) VALUES (PASSWORD($password”)), ...);

Question - 48 : - How do you call a constructor for a parent class?

Answer - 48 : - parent::constructor($value)

Question - 49 : - How can we submit form without a submit button?

Answer - 49 : - 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()">

Question - 50 : - What types of images that PHP supports ?

Answer - 50 : - Using imagetypes() function to find out what types of images are supported in your PHP engine. imagetypes() - Returns the image types supported. This function returns a bit-field corresponding to the image formats supported by the version of GD linked into PHP. The following bits are returned, IMG_GIF | IMG_JPG | IMG_PNG | IMG_WBMP | IMG_XPM.

Computer Contributors

krishan
Rajeev Katiyar
Yes Baroda

Share your email for latest updates

Name:
Email:

Our partners