Results 1 to 5 of 5

Thread: What are the Predefined Classes and Predefined Constants in PHP?

  1. #1
    Join Date
    May 2009
    Posts
    529

    What are the Predefined Classes and Predefined Constants in PHP?

    Hi friends,
    I have recently started with the PHP programming language, so I don't know much enough about the PHP. Before this I have done C++ and Core Java as programming language. I also have bit knowledge about the HTML and JavaScript. I really don't know the basic things about the PHP. I now want to know about the classes and constants that are defined previously. I thought that anyone would be interested in solving my doubt. So please tell me what are the Predefined Classes and Predefined Constants in PHP.??

  2. #2
    Join Date
    Mar 2008
    Posts
    672

    Re: What are the Predefined Classes and Predefined Constants in PHP?

    For knowing the predefined classes you should know about the Standard Classes. These classes are defined in the standard class set of PHP included with all versions of PHP. Directory - The class that can instantiate dir are :
    PHP Code:
    Directory 
    string path
    resource handle
    string read (void
    void rewind (void
    void close (void

    A pseudo-object mechanism allows playback of a file. The given directory is opened. Two properties are available once the file open: the pointer can be used with other functions such as readdir (), rewinddir () and closedir (). The folder path is the path provided during the construction of the object.

  3. #3
    Join Date
    Mar 2008
    Posts
    349

    Re: What are the Predefined Classes and Predefined Constants in PHP?

    While defining the classes or the constants, you should keep in mind about the Special classes. You cannot use some ID's that belong to the special classes. The following IDs should not be used as class name because of their role :
    • Self
    • parent
    • Closure

    The closure class is used for the internal implementation of anonymous functions. The class has a constructor that prohibits manual creation of the object and calls the method on invoke call.

  4. #4
    Join Date
    Jan 2008
    Posts
    1,521

    Re: What are the Predefined Classes and Predefined Constants in PHP?

    I would like to discuss about the predefined constants, since I have some knowledge about it. Predefined Constants are defined by the PHP core. The following are some predefined constants that are available on PHP 5.2.7 :
    • PHP_VERSION (string)
    • PHP_MAJOR_VERSION (integer)
    • PHP_MINOR_VERSION (integer)
    • PHP_RELEASE_VERSION (integer)
    • PHP_VERSION_ID (integer)
    • PHP_EXTRA_VERSION (string)
    • PHP_ZTS (integer)
    • PHP_DEBUG (integer)

  5. #5
    Join Date
    Oct 2005
    Posts
    2,393

    Re: What are the Predefined Classes and Predefined Constants in PHP?

    I am providing some more predefined constants that was available since PHP 5.3.0 :
    • PHP_WINDOWS_VERSION_MAJOR (integer)
    • PHP_WINDOWS_VERSION_MINOR (integer)
    • PHP_WINDOWS_VERSION_BUILD (integer)
    • PHP_WINDOWS_VERSION_PLATFORM (integer)
    • PHP_WINDOWS_VERSION_SP_MAJOR (integer)
    • PHP_WINDOWS_VERSION_SP_MINOR (integer)
    • PHP_WINDOWS_VERSION_SUITEMASK (integer)

Similar Threads

  1. How to parse constants in formula to cells in Excel
    By Hache hi in forum MS Office Support
    Replies: 14
    Last Post: 24-02-2012, 02:19 PM
  2. Where to put global constants in a C++ program?
    By Migueel in forum Software Development
    Replies: 5
    Last Post: 05-03-2010, 10:03 PM
  3. What are the Predefined Variables in PHP?
    By Leonard in forum Software Development
    Replies: 5
    Last Post: 27-02-2010, 11:44 PM
  4. What are Constants in PHP?
    By NIcaBoy in forum Software Development
    Replies: 4
    Last Post: 21-02-2010, 07:20 AM
  5. Classes in VB.NET
    By Samir_1 in forum Software Development
    Replies: 2
    Last Post: 10-04-2009, 12:07 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,445,924.55131 seconds with 16 queries