PHP

1 program Added 2025-10-22T09:39:29Z Model: meta-llama/llama-3.1-70b-instructTemp: 0.4 Evidence Report issue View issues
Aliases: Hypertext Preprocessor
Provenance: commit 603e751f60 · authored 2025-10-22T11:39:29+02:00 · model meta-llama/llama-3.1-70b-instruct

Sources mentioning this language

8 sources · pl_id: pl/php
LLM (this repo) · 1PldbLinguistPygmentsWikipediaHyperpolyglotRosettacodeWikidata · Q59

Wikipedia infobox

Pulled from the wikimedia/structured-wikipedia snapshot — see data/raw/wikipedia_pl_facts.*.jsonl and pl_fact.csv for the long-table provenance.

Paradigmsmulti-paradigm: imperative · functional · object-oriented · procedural · reflective
Typingdynamic, weak, gradual
Designed byThe PHP Development Team · Zend Technologies · PHP Foundation · Rasmus Lerdorf
First appeared1995
Influenced byPerl · C · C++ · Java · Tcl · JavaScript
LicenseModified BSD License
Implemented inC (primarily · some components in C++)
Homepagehttps://thephp.foundation

Extensions claimed by this language

21 claims. Each row is one upstream assertion with its strength. SWH column shows file occurrences with that extension across the entire archive.
ExtensionSourceStrengthSWH
.pharwikidataprimary80.3K files
.phplinguistprimary417.7M files
.phppygmentsprimary417.7M files
.phpwikidataprimary417.7M files
.php3wikidataprimary129.7K files
.php4wikidataprimary4.3K files
.php5wikidataprimary56.8K files
.php7wikidataprimary1.3K files
.phpswikidataprimary12.6K files
.phtwikidataprimary1.5K files
.phtmlwikidataprimary3.7M files
.awlinguistsecondary45.4K files
.ctplinguistsecondary2.6M files
.fcgilinguistsecondary11.6K files
.inclinguistsecondary6.3M files
.incpygmentssecondary6.3M files
.php3linguistsecondary129.7K files
.php4linguistsecondary4.3K files
.php5linguistsecondary56.8K files
.phpslinguistsecondary12.6K files
.phptlinguistsecondary534.5K files

Related languages

Logos (0.36)GPP (0.32)HSP (0.27)SLIP (0.23)Hot Soup Processor (0.22)

LLM-contributed programs

PHPMailer

Provenance: commit 603e751f60 · authored 2025-10-22T11:39:29+02:00 · model meta-llama/llama-3.1-70b-instruct · Temp 0.4
code.php · license: LGPL-2.1-only · added: 2025-10-22T09:39:29Z
require 'PHPMailerAutoload.php';
$mail = new PHPMailer;
$mail->isSMTP();
$mail->Host = 'smtp1.example.com;smtp2.example.com';
$mail->SMTPAuth = true;
$mail->Username = 'user@example.com';
$mail->Password = 'secret';
$mail->SMTPSecure = 'tls';
$mail->From = 'from@example.com';
$mail->FromName = 'Mailer';
$mail->addAddress('whoto@example.com', 'John Doe');
$mail->addReplyTo('info@example.com', 'Information');
$mail->addCC('cc@example.com');
$mail->addBCC('bcc@example.com');
$mail->addAttachment('/var/tmp/file.tar.gz');
$mail->addAttachment('/tmp/image.jpg', 'new.jpg');
$mail->isHTML(true);
$mail->Subject = 'Here is the subject';
$mail->Body    = 'This is the HTML message body <b>in bold!</b>';
$mail->AltBody = 'This is the body in plain text for non-HTML mail clients';
if(!$mail->send()) {
    echo 'Message could not be sent.';
    echo 'Mailer Error: '. $mail->ErrorInfo;
} else {
    echo 'Message has been sent';
}

Real programs from Software Heritage

1 sample mined from derived_datasets/<date>/contents/*.parquet, byte-verified against the SWH archive. Citation-grade qualified SWHIDs preserved.
emails.phps · 307 B · ext .phps · seen 436× in SWH
via fallback
swh:1:cnt:d2219cc92f7f417e6d5e3941eccfa9372354bd03;origin=https://github.com/hechenqingyuan/gitwms;anchor=swh:1:rev:17acfbbf920f92ce2faf466f324ff4c98e7e96c1;path=/Git.Storage.Web/Theme/plugins/jquery-validation/demo/marketo/emails.phps
Open in SWH · Raw bytes (SWH) · GitHub raw
Show source
<?php
$request = trim(strtolower($_REQUEST['value']));
$emails = array('glen@marketo.com', 'george@bush.gov', 'me@god.com', 'aboutface@cooper.com', 'steam@valve.com', 'bill@gates.com');
$valid = 'true';
foreach($emails as $email) {
	if( strtolower($email) == $request )
		$valid = 'false';
}
echo $valid;
?>

Disambiguation rules

Linguist heuristic rules that predict this language when one of its claimed extensions is shared with another.
RuleExtKindPredicates (truncated)
h/linguist/.php/1.phppredicates[{"kind": "any", "regexes": ["<\\?[^h]"]}]
h/linguist/.inc/1.incpredicates[{"kind": "any", "regexes": ["^<\\?(?:php)?"]}]

Contribute — propose a file extension

Tell us where to find evidence about PHP (mapped to pl/php). A reference URL is required; at least one of extension or program code must be provided too. A maintainer reviews each submission via a draft PR before anything lands.
Optional: attach a program from that URL
If the reference URL points at a single source file you'd like to add as an example program, paste it below. The workflow will write it under languages/PHP/programs/<sha>/. Keep under ~200 lines.
(or open the pre-filled issue directly)
← Photon (Quintopia) Php4delphi →