التخطي إلى المحتوى الرئيسي

المشاركات

عرض المشاركات من سبتمبر, ٢٠٠٩

The Basics of php

The Basics class Every class definition begins with the keyword class , followed by a class name, followed by a pair of curly braces which enclose the definitions of the class's properties and methods. The class name can be any valid label which is a not a PHP reserved word . A valid class name starts with a letter or underscore, followed by any number of letters, numbers, or underscores. As a regular expression, it would be expressed thus: [a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]* . A class may contain its own constants , variables (called "properties"), and functions (called "methods"). Example #1 Simple Class definition class SimpleClass { // property declaration public $var = 'a default value' ; // method declaration public function displayVar () { echo $this -> var ; } } ?> The pseudo-variable $this is ...

what is php

PHP , or PHP: Hypertext Preprocessor, is a widely used, general-purpose scripting language that was originally designed for web development, to produce dynamic web pages. It can be embedded into HTML and generally runs on a web server, which needs to be configured to process PHP code and create web page content from it. It can be deployed on most web servers and on almost every operating system and platform free of charge. PHP is installed on over 20 million websites and 1 million web servers PHP was originally created by Rasmus Lerdorf in 1995 and has been in continuous development ever since. The main implementation of PHP is now produced by The PHP Group and serves as the de facto standard for PHP as there is no formal specification. [ 4 ] PHP is free software released under the PHP License, which is incompatible with the GNU General Public License (GPL) because of restrictions on the use of the term PHP . [ 5 ] PHP has evolved to include a command line interface capability ...