Hack
1 program
Added 2025-10-22T09:54:13Z
Model: anthropic/claude-3.5-sonnetTemp: 0.4
Evidence
Report issue
View issues
Aliases: Hack PHP
Provenance: commit 1b8908402c · authored 2025-10-22T11:54:13+02:00 · model anthropic/claude-3.5-sonnet
Sources mentioning this language
8 sources · pl_id:
pl/hackWikipedia infobox ↗
Pulled from the
wikimedia/structured-wikipedia
snapshot — see data/raw/wikipedia_pl_facts.*.jsonl and
pl_fact.csv for the long-table provenance.
| Paradigms | multi-paradigm: imperative · functional · object-oriented · procedural · reflective |
|---|---|
| Typing | dynamic, weak, gradual |
| Designed by | The PHP Development Team · Zend Technologies · PHP Foundation · Rasmus Lerdorf |
| First appeared | 1995 |
| Influenced by | Perl · C · C++ · Java · Tcl · JavaScript |
| License | Modified BSD License |
| Implemented in | C (primarily · some components in C++) |
| Homepage | https://thephp.foundation |
Extensions claimed by this language
6 claims. Each row is one upstream assertion with its strength.
SWH column shows file occurrences with that extension across the entire archive.| Extension | Source | Strength | SWH |
|---|---|---|---|
.hack | linguist | primary | 71.3K files |
.php | pygments | primary | 417.7M files |
.hh | linguist | secondary | 3.9M files |
.hhi | linguist | secondary | 5.3K files |
.inc | pygments | secondary | 6.3M files |
.php | linguist | secondary | 417.7M files |
Related languages
LLM-contributed programs
Simple REST API endpoint in Hack
Provenance: commit 1b8908402c · authored 2025-10-22T11:54:13+02:00 · model anthropic/claude-3.5-sonnet · Temp 0.4
<?hh
namespace HelloHackWorld\Controllers;
class BaseController {
public static function getResponse(): array<string, mixed> {
return array(
'success' => true,
'data' => array(
'message' => 'Welcome to Hack!',
'timestamp' => time(),
),
);
}
public static function sendResponse(): void {
$response = static::getResponse();
header('Content-Type: application/json');
print json_encode($response);
}
}
Real programs from Software Heritage
No SWH evidence indexed yet for this language. (Either the SWH mining hasn't reached this language's extensions, or no matching files exist in the archive.)
Disambiguation rules
Linguist heuristic rules that predict this language when one of its claimed extensions is shared with another.
| Rule | Ext | Kind | Predicates (truncated) |
|---|---|---|---|
h/linguist/.php/0 | .php | predicates | [{"kind": "any", "regexes": ["<\\?hh"]}] |
h/linguist/.hh/0 | .hh | predicates | [{"kind": "any", "regexes": ["<\\?hh"]}] |