0% found this document useful (0 votes)
72 views6 pages

Final Keyword: What Are The Two New Error Levels Introduced in PHP5.3?

PHP 5 introduces the final keyword to prevent method overriding in child classes. The final keyword can also make a class final to prevent extension. Drupal information flows through 5 main layers: data, modules, blocks/menus, user permissions, and templates. PHP 5.3 introduced two new error levels: E_DEPRECATED and E_USER_DEPRECATED for indicating deprecated features.

Uploaded by

Yashvin Awootar
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
72 views6 pages

Final Keyword: What Are The Two New Error Levels Introduced in PHP5.3?

PHP 5 introduces the final keyword to prevent method overriding in child classes. The final keyword can also make a class final to prevent extension. Drupal information flows through 5 main layers: data, modules, blocks/menus, user permissions, and templates. PHP 5.3 introduced two new error levels: E_DEPRECATED and E_USER_DEPRECATED for indicating deprecated features.

Uploaded by

Yashvin Awootar
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 6

Final Keyword PHP 5 introduces the final keyword, which prevents child classes from overriding a method by prefixing

the definition with final. If the class itself is being defined final then it cannot be extended.

Explain drupal flow of information among 5 main layers Basically, there are 5 main layers in Drupal where information flows, 1. Data (Node, ETC) 2. Modules 3. Blocks and Menus 4. User Permissions 5. Template

What are the two new error levels introduced in PHP5.3?


E_DEPRECATED The E_DEPRECATED error level is used to indicate that a function or feature has been deprecated. E_USER_DEPRECATED The E_USER_DEPRECATED level is intended for indicating deprecated features in user code, similarly to the E_USER_ERROR and E_USER_WARNING levels. Latest version of PHP? 5.3.6 on 17 march 2011 What and why? - XML - Frameworks, MVC - CMS - Difference between GET and POST
There are some difference between GET and POST method 1. GET Method have some limit like only 2Kb data able to send for request But in POST method unlimited data can we send 2. When we use GET method requested data show in url 3. POST method is good for send sensitive request

Encapsulation, overloading, inheritance urlencode and urldecode

Persistent connections: Persistent connections remain connected even after your script has ended, which means that the next time a script asks for a connection, it uses the one that is already open - this saves a lot time negotiating passwords and such that can otherwise be used to execute important code. Switching to persistent connections does not require any other change than adding a "p" in the function name -

Session and Cookies: The most significant differences between the two are that cookies are stored on the client, while the session data is stored on the serve. As a result, sessions are more secure than cookies (no information is being sent back and forth between the client and the server) and sessions work even when the user has disabled cookies in their browser. Cookies, on the other hand, can be used to track information even from one session to another by setting it's time( ) parameter Sessions in PHP are started by using the session_start( ) function. Like the setcookie( ) function, the session_start( ) function must come before any HTML The session_start( ) function generates a random Session Id and stores it in a cookie on the user's computer (this is the only session information that is actually stored on the client side.) SessionID can be stored on a cookie or in the URL What is meant by MVC (Model View Controller)? MODEL VIEW CONTROLLER, is a software architecture, currently considered an architectural pattern used in software engineering. This isolates business logic from presentation logic. 1. The Model represents the application data 2. The View renders a presentation of model data 3. The Controller handles and routes requests made by the client.

Whats the difference between LEFT, RIGHT, INNER, OUTER, JOIN? The difference is in the way tables are joined if there are no common records. JOIN is same as INNER JOIN and means to only show records common to both tables. Whether the records are common is determined by the fields in join clause. For example: FROM t1 JOIN t2 on t1.ID = t2.ID means show only records where the same ID value exists in both tables. LEFT JOIN is same as LEFT OUTER JOIN and means to show all records from left table (i.e. the one that precedes in SQL statement) regardless of the existance of matching records in the right table. RIGHT JOIN is same as RIGHT OUTER JOIN and means opposite of LEFT JOIN, i.e. shows all records from the second (right) table and only matching records from first (left) table.

Auto Increment id in Mysql There is a structure of a table with an auto-increment ID.Last inserted id is 2145. What will be the next ID after following conditions? o o o Delete from tablename? Delete from tablename where ID=2145 Truncate table tablename

How to Generate Random Numbers using php? You can generate Random Numbers using php: follow the code. <? srand(time()); $random = (rand()%9); print("random number between 0 and 9 is: $random"); ?>

Stored procedures, Triggers, Indexes What are the advantages of stored procedures, triggers, indexes? Stored procedure is a set of SQL commands that can be compiled and stored in the server. Once this has been done, clients dont need to keep re-issuing the entire query but can refer to the stored procedure. This provides better overall performance because the query has to be parsed only once, and less information needs to be sent between the server and the client. However, stored procedures of course do increase the load on the database server system, as more of the work is done on the server side and less on the client (application) side.

A trigger is effectively a type of stored procedure, one that is invoked when a particular event occurs. For example, you can install a stored procedure that is triggered each time a record is deleted from a transaction table and that stored procedure automatically deletes the corresponding customer from a customer table when all his transactions are deleted.

Indexes are used to find rows with specific column values quickly. Without an index, MySQL must begin with the first row and then read through the entire table to find the relevant rows. The larger the table, the more this costs. If the table has an index for the columns in question, MySQL can quickly determine the position to seek to in the middle of the data file without having to look at all the data.

What is meant by PEAR in php?


Answer1: PEAR is the next revolution in PHP. This repository is bringing higher level programming to PHP. PEAR is a framework and distribution system for reusable PHP components. It eases installation by bringing an automated wizard, and packing the strength and experience of PHP users into a nicely organised OOP library. PEAR also provides a command-line interface that can be used to automatically install packages Answer2: PEAR is short for PHP Extension and Application Repository and is pronounced just like the fruit. The purpose of PEAR is to provide: A structured library of open-sourced code for PHP users A system for code distribution and package maintenance A standard style for code written in PHP The PHP Foundation Classes (PFC), The PHP Extension Community Library (PECL),

What is the difference between $message and $$message? Answer 1: $message is a simple variable whereas $$message is a reference variable. Example: $user = bob is equivalent to $holder = user; $$holder = bob; Answer 2: They are both variables. But $message is a variable with a fixed name. $$message is a variable whos name is stored in $message. For example, if $message contains var, $$message is the same as $var.

What is the difference between mysql_fetch_object and mysql_fetch_array?


MySQL fetch object will collect first single matching record where mysql_fetch_array will collect all matching records from the table in an array

CHECK IF A VARIABLE IS AN INTEGER IN JAVASCRIPT


var myValue =9.8; if(parseInt(myValue)== myValue) alert(Integer); else alert(Not an integer);

What are the reasons for selecting LAMP (Linux, Apache, MySQL, Php) instead of combination of other software programs, servers and operating systems? All of those are open source resource. Security of linux is very 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.

A complete list of available variables can be seen by calling the function



info() phpinfo() phpvarinfo() varinfo()

Whats the difference between mysql_fetch_row() and mysql_fetch_array()?


mysql_fetch_row() returns all of the columns in an array using a 0 based index. The first row would have the index of 0, the second would be 1, and so on. Now another MySQL function in PHP is mysql_fetch_assoc(), which is an associative array. Its indexes are the column names. For example, if my query was returning first_name, last_name, email, my indexes in the array would be first_name, last_name, and email. mysql_fetch_array() provides the output of mysql_fetch_assoc and mysql_fetch_row().

What does the GD library do?


This is probably one of my favorite libraries, as it is built into PHP as of version 4.3.0. This library allows you to manipulate and display images of various extensions. More often than not, it is used to create thumbnail images. An alternative to GD is ImageMagick, however, unlike GD, this does not come built in to PHP and must be installed on the server by an Administrator.

How can we create a database using PHP and MySQL? We can create MySQL database with the use of mysql_create_db("Database Name")

What is CAPTCHA? CAPTCHA stands for Completely Automated Public Turing Test to tell Computers and Humans Apart. To prevent spammers from using bots to automatically fill out forms, CAPTCHA programmers will generate an image containing distorted images of a string of numbers and letters.

You might also like