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
What Is The UK Equivalent Of SCHD ETF? - Comprehensive Guide
Best Way to Transfer Money to a Foreign Bank Account
Xre-02022
Fat Hog Prices Today
Amtrust Bank Cd Rates
Mlifeinsider Okta
Scentsy Dashboard Log In
Bill Devane Obituary
Purple Crip Strain Leafly
2015 Honda Fit EX-L for sale - Seattle, WA - craigslist
Curtains - Cheap Ready Made Curtains - Deconovo UK
Bad Moms 123Movies
Iu Spring Break 2024
Testberichte zu E-Bikes & Fahrrädern von PROPHETE.
Lowes Undermount Kitchen Sinks
Tyler Sis University City
Shopmonsterus Reviews
Sullivan County Image Mate
Craigslist Apartments Baltimore
What Is The Lineup For Nascar Race Today
Sister Souljah Net Worth
Chamberlain College of Nursing | Tuition & Acceptance Rates 2024
Mandy Rose - WWE News, Rumors, & Updates
What we lost when Craigslist shut down its personals section
Nurtsug
Datingscout Wantmatures
Was heißt AMK? » Bedeutung und Herkunft des Ausdrucks
Spy School Secrets - Canada's History
Poster & 1600 Autocollants créatifs | Activité facile et ludique | Poppik Stickers
Babbychula
What Time Does Walmart Auto Center Open
What Time Is First Light Tomorrow Morning
How to Destroy Rule 34
Austin Automotive Buda
State Legislatures Icivics Answer Key
Fototour verlassener Fliegerhorst Schönwald [Lost Place Brandenburg]
Omaha Steaks Lava Cake Microwave Instructions
Bartow Qpublic
Pokemon Reborn Gyms
Hazel Moore Boobpedia
Tricia Vacanti Obituary
QVC hosts Carolyn Gracie, Dan Hughes among 400 laid off by network's parent company
Busted Newspaper Mcpherson Kansas
Tinfoil Unable To Start Software 2022
Phmc.myloancare.com
Paradise leaked: An analysis of offshore data leaks
Abigail Cordova Murder
Craigslist Pets Charleston Wv
Laura Houston Wbap
Wvu Workday
Uno Grade Scale
Ok-Selection9999
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.