mirror of
https://github.com/php/web-php.git
synced 2026-03-23 23:02:13 +01:00
f71b6c7396f5ccc1f5e93eac89c644734da084c5
The following changes are made in this commit: **(1)** Add the WOFF2 variant of web fonts. [WOFF2 standard](https://w3c.github.io/woff/woff2/) reduces the file sizes significantly. This is important to make our website more accessible to folks with limited Internet connections. 96% of browsers support WOFF2 ([source](https://caniuse.com/?search=woff2)) and we still have WOFF and TTF/OTF/EOT formats for those edge-cases which don't support it. Real examples of the file size reductions for php.net: ``` Fira Sans Regular: 183 KB (woff) -> 129 KB (woff2) --> 30% reduction in size Fira Mono Regular: 87 KB (woff) -> 65 KB (woff2) --> 35% reduction in size ``` **(2)** Use `font-display: swap` for web fonts (see [MDN Docs for font-display](https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display)) This is recommended to not block the rendering the page for a long time if the web font is not available. Again, this is important for folks with suboptimal network connections. The `swap` value is also the default option in popular font services like [Google Fonts](https://fonts.google.com/). **(3)** Update the list of alternative font families. I updated the sans-serif and mono font stack used in the design. The new stacks are much longer (not a problem in practice thanks to CSS variables) but they cover all common browsing devices (including smartphones). I crafted the list from the recommended font stacks of the most popular CSS frameworks and the most popular websites for developers.
Local development
This is the git repository for the official www.php.net website.
To setup a local mirror of the website, clone the repository:
git clone https://github.com/php/web-php.git
Change into web-php:
cd web-php
Start the built-in web server:
php -S localhost:8080 .router.php
This repository includes most (generated) files that are required for normal operation of this website, such as
- News & events data
- Several manual pages (and a translation), see manual/{en,ja}/
- User contributed notes for manual pages
- A "router" for the builtin PHP webserver
How to set up a full local mirror is described in our Wiki: https://wiki.php.net/web/mirror
Code requirements
Code must function on a vanilla PHP 7.3 installation. Please keep this in mind before filing a pull request.
Contributing
Please have a look at CONTRIBUTING.md.
Description
⚠️ ARCHIVED: Original GitHub repository no longer exists. Preserved as backup on 2026-01-22T16:26:27.645Z
Languages
PHP
94.4%
CSS
2.6%
JavaScript
2.5%
PowerShell
0.2%
TypeScript
0.2%