Share to:

PHP

PHP (rekursivs Akronym für „PHP: Hypertext Preprocessor“, ursprünglich „Personal Home Page Tools“) isch e Skriptsproch mit ere ähnliche Syntax wie C und Perl, wo hauptsächlich für d Erstellig vo dynamische Internetsite brucht wird. PHP isch e Open-Source-Software.

S spezielle an PHP isch ihri Eifachheit, die breiti Datenbankunterstützig und s Vorhandesie vo Funktionsbibliotheke. Es existiere zum Biispiel au Bibliotheke, um mit PHP GTK-Awändigsprogramm z entwickle.

PHP isch e serversitigi Sprache. Das bedeütet, dass dr Quelltext – im Gegesatz zu JavaScript, wo er meischtens direkt im HTML-Code iibettet wird – nid an dr Browser übermittlet wird, sondern an e Interpreter uf em Webserver. Erscht däm sini Ussgob wird denn an Browser gschickt. In de meischten Fäll isch das e HTML-Dokumänt, wobi s mit PHP aber au möglich isch, anderi Dateitype, wie z. B. Bilder mit dr GD-Bibilothek odr PDF-Dateie, z generiere.

Nebscht dr verwendig vu PHP zum Erstelle vu Webapplikatione (zum Bispiil Websitene), benützt me PHP au für sunstigi Arbeite, wo es ähnlichs Programm in C au mache chönnt. Dr Nachteil an PHP isch, dass dr Programmkod zerscht an dr Interpreter gah muess, wo dr Kod usfüehrt. D'Effiktivität isch drumm eher minimal bi PHP. Für Websitene isch es dennoch wie gschaffe, will me e Website nur schwer mit C oder C++ realisiere khan.

Code-Bispiel

Eifachs PHP-Script (git „Hallo Wält!“ us, wenn d'Rechnig 2+5, 7 als Resultat hett):

<?php
  $var1 = 2;
  $var2 = 5;

  if(($var1 + $var2) == 7) {
    echo "Hallo Wält!";
  }
?>
Dä Artikel basiert uff ere fräie Übersetzig vum Artikel „PHP“ vu de dütsche Wikipedia. E Liste vu de Autore un Versione isch do z finde.

Content Disclaimer

Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.

  1. The information displayed on this website is sourced in part or in whole from Wikipedia and has been adapted for the purpose of restating it. We strive to provide accurate and relevant information, however:
  2. There is no guarantee of absolute accuracy. Wikipedia is an open, collaborative project that can be edited by anyone, so information is subject to change.
  3. It is not intended to constitute professional advice. The content displayed is for informational and educational purposes only. For important decisions (e.g., medical, legal, or financial), please consult a professional.
  4. Content copyright. Wikipedia is licensed under the Creative Commons Attribution-ShareAlike License (CC BY-SA). This means that content may be reused with appropriate attribution and shared under a similar license.
  5. Responsible use. Any risk arising from the use of information from this website is entirely the responsibility of the user.
Prefix: a b c d e f g h i j k l m n o p q r s t u v w x y z 0 1 2 3 4 5 6 7 8 9

Portal di Ensiklopedia Dunia

Kembali kehalaman sebelumnya