PHP: Hypertext Preprocessor (2024)

A simple tutorial »

« What is PHP?

  • PHP Manual
  • Getting Started
  • Introduction

Anything. PHP is mainly focused on server-side scripting, so you can do anything any other CGI program can do, such as collect form data, generate dynamic page content, or send and receive cookies. But PHP can do much more.

There are two main areas where PHP scripts are used.

  • Server-side scripting. This is the most traditional and main target field for PHP. You need three things to make this work: the PHP parser (CGI or server module), a web server and a web browser. You need to run the web server, with a connected PHP installation. You can access the PHP program output with a web browser, viewing the PHP page through the server. All these can run on your home machine if you are just experimenting with PHP programming. See the installation instructions section for more information.
  • Command line scripting. You can make a PHP script to run it without any server or browser. You only need the PHP parser to use it this way. This type of usage is ideal for scripts regularly executed using cron (on *nix or Linux) or Task Scheduler (on Windows). These scripts can also be used for simple text processing tasks. See the section about Command line usage of PHP for more information.

PHP can be used on all major operating systems, including Linux, many Unix variants (including HP-UX, Solaris and OpenBSD), Microsoft Windows, macOS, RISC OS, and probably others. PHP also has support for most of the web servers today. This includes Apache, IIS, and many others. And this includes any web server that can utilize the FastCGI PHP binary, like lighttpd and nginx. PHP works as either a module, or as a CGI processor.

So with PHP, you have the freedom of choosing an operating system and a web server. Furthermore, you also have the choice of using procedural programming or object-oriented programming (OOP), or a mixture of them both.

With PHP you are not limited to output HTML. PHP's abilities include outputting rich file types, such as images or PDF files, encrypting data, and sending emails. You can also output easily any text, such as JSON or XML. PHP can autogenerate these files, and save them in the file system, instead of printing it out, forming a server-side cache for your dynamic content.

One of the strongest and most significant features in PHP is its support for a wide range of databases. Writing a database-enabled web page is incredibly simple using one of the database specific extensions (e.g., for mysql), or using an abstraction layer like PDO, or connect to any database supporting the Open Database Connection standard via the ODBC extension. Other databases may utilize cURL or sockets, like CouchDB.

PHP also has support for talking to other services using protocols such as LDAP, IMAP, SNMP, NNTP, POP3, HTTP, COM (on Windows) and countless others. You can also open raw network sockets and interact using any other protocol. PHP has support for the WDDX complex data exchange between virtually all Web programming languages. Talking about interconnection, PHP has support for instantiation of Java objects and using them transparently as PHP objects.

PHP has useful text processing features, which includes the Perl compatible regular expressions (PCRE), and many extensions and tools to parse and access XML documents. PHP standardizes all of the XML extensions on the solid base of libxml2, and extends the feature set adding SimpleXML, XMLReader and XMLWriter support.

And many other interesting extensions exist, which are categorized both alphabetically and by category. And there are additional PECL extensions that may or may not be documented within the PHP manual itself, like »XDebug.

As you can see this page is not enough to list all the features and benefits PHP can offer. Read on in the sections about installing PHP, and see the function reference part for explanation of the extensions mentioned here.

+add a note

User Contributed Notes 1 note

up

down

-1

arthur dot devbr at gmail dot com

3 days ago

Wrong:

O PHP consegue gerar automaticamente esses arquivos, e gravá-los no sistema de arquivos, ao invés de apenas imprmir, possibilitando criar um cache no lado do servidor para seu "counteúdo" dinâmico.

Correct:
O PHP consegue gerar automaticamente esses arquivos, e gravá-los no sistema de arquivos, ao invés de apenas imprmir, possibilitando criar um cache no lado do servidor para seu CONTEÚDO dinâmico.

+add a note

PHP: Hypertext Preprocessor (2024)
Top Articles
2024 Investment Banking Summer Associate Program (Financial Institutions Group)
Can A Seller or Buyer Back Out of Escrow Contracts in California?
St Thomas Usvi Craigslist
Roblox Roguelike
Cars & Trucks - By Owner near Kissimmee, FL - craigslist
Ups Dropoff Location Near Me
25X11X10 Atv Tires Tractor Supply
Truist Park Section 135
Www.craigslist Augusta Ga
Directions To 401 East Chestnut Street Louisville Kentucky
Trade Chart Dave Richard
Owatc Canvas
Kent And Pelczar Obituaries
Best Theia Builds (Talent | Skill Order | Pairing + Pets) In Call of Dragons - AllClash
Craigslist In Fredericksburg
Top Golf 3000 Clubs
Catsweb Tx State
Www.paystubportal.com/7-11 Login
Thayer Rasmussen Cause Of Death
Pro Groom Prices – The Pet Centre
Bc Hyundai Tupelo Ms
Mens Standard 7 Inch Printed Chappy Swim Trunks, Sardines Peachy
Diesel Mechanic Jobs Near Me Hiring
Snow Rider 3D Unblocked Wtf
Nissan Rogue Tire Size
Committees Of Correspondence | Encyclopedia.com
20 Different Cat Sounds and What They Mean
The Tower and Major Arcana Tarot Combinations: What They Mean - Eclectic Witchcraft
Village
Obituaries Milwaukee Journal Sentinel
Harrison County Wv Arrests This Week
Dr Seuss Star Bellied Sneetches Pdf
Table To Formula Calculator
Tom Thumb Direct2Hr
Lucky Larry's Latina's
Diana Lolalytics
Prima Healthcare Columbiana Ohio
11 Pm Pst
Mohave County Jobs Craigslist
Tirage Rapid Georgia
Craigslist Jobs Brownsville Tx
Yogu Cheshire
Aurora Il Back Pages
Cl Bellingham
Walmart Car Service Near Me
Arigreyfr
Courtney Roberson Rob Dyrdek
Gotrax Scooter Error Code E2
Penny Paws San Antonio Photos
Pickwick Electric Power Outage
German American Bank Owenton Ky
Buildapc Deals
Latest Posts
Article information

Author: Dong Thiel

Last Updated:

Views: 5762

Rating: 4.9 / 5 (79 voted)

Reviews: 94% of readers found this page helpful

Author information

Name: Dong Thiel

Birthday: 2001-07-14

Address: 2865 Kasha Unions, West Corrinne, AK 05708-1071

Phone: +3512198379449

Job: Design Planner

Hobby: Graffiti, Foreign language learning, Gambling, Metalworking, Rowing, Sculling, Sewing

Introduction: My name is Dong Thiel, I am a brainy, happy, tasty, lively, splendid, talented, cooperative person who loves writing and wants to share my knowledge and understanding with you.