1. Question:What is object cloning?

     

    Answer
    If we try to copy a referenced object, it will simply point back to the addressing location of the original object. To remedy the problems with copying, PHP offers an explicit means for cloning an object which is known as object cloning.


    1. Report
  2. Question:What type of inheritance that PHP supports? 

    Answer
    Ans: In PHP an extended class is always dependent on a single base class that is multiple inheritances is not supported. Classes are extended using the keywords ‘extends’

    1. Report
  3. Question:Define exceptions? 

    Answer

    When a specified error (exceptional) condition occurs in the script is called an exception.
    There are Four important keywords of exceptions:
    Try
    Catch
    Throw
    Finaly


    1. Report
  4. Question:What are the four configuration directive scopes? 

    Answer
    Configuration directive scopes are given bellow:
    • PHP_INI_PERDIR: Directive can be modified within the php.ini,httpd.conf, or .htaccess files.
    • PHP_INI_SYSTEM: Directive can be modified within the php.ini and httpd.conf files.
    • PHP_INI_USER: Directive can be modified within user scripts.
    • PHP_INI_ALL: Directive can be modified anywhere.

    1. Report
  5. Question:What are the differences between public, private, protected, static, transient, final and volatile? 

    Answer
    Public: Public declared items can be accessed everywhere.
    
    Protected: Protected limits access to inherited and parent classes (and to the class that defines the item).
    
    Private: Private limits visibility only to the class that defines the item.
    
    Static: A static variable exists only in a local function scope, but it does not lose its value when program execution leaves this scope.
    
    Final: Final keyword prevents child classes from overriding a method by prefixing the definition with final. It means if we define a method with final then it prevent us to override
    the method.
    
    transient: A transient variable is a variable that may not be serialized.
    
    volatile: A variable that might be concurrently modified by multiple threads should be declared volatile. Variables declared to be volatile will not be optimized by the compiler because their value can change at any time

    1. Report
  6. Question:What are the general language features of php?

     

    Answer
    Ans: There are four type of key categorize of the general language features of php. There are given bellow:    
    ·    Practicality
    ·    power
    ·    Possibility
    ·    And Price

    1. Report
  7. Question:What is htaccess? Why do we use this and Where? 

    Answer
    .htaccess files are configuration files of Apache Server which provide a way to make configuration changes on a per-directory basis. A file, containing one or more configuration directives, is placed in a particular document directory, and the directives apply to that directory, and all sub directories thereof.

    1. Report
  8. Question:What are default session time and path? 

    Answer
    - Default session time in PHP is 1440 seconds or 24 minutes.
    - Default session save path id temporary folder /tmp

    1. Report
  9. Question:What are the abstract class and interface? 

    Answer
    Ans: Abstract class: Abstract classes are the class where one or more methods are abstract but not necessarily all method has to be abstract. Abstract methods are the methods, which are declare in its class but not define. The definition of those methods must be in its extending class.
    Interface: Interfaces are one type of class where all the methods are abstract. That means all the methods only declared but no defined. All the methods must be defined by its implemented class.


    1. Report
  10. Question:How many ways you can write into a file? 

    Answer

    We can write into a file using the following mode:   

    r+,
     W,  
    w+,
    A,
    a+,
    X,
    x+


    1. Report
Copyright © 2024. Powered by Intellect Software Ltd