explaingit

codeguy/php-the-right-way

9,253CSSAudience · developerComplexity · 1/5LicenseSetup · easy

TLDR

The source for PHP: The Right Way, a community reference guide to PHP best practices and coding standards available in 20-plus languages at phptherightway.com, built with Jekyll from Markdown files.

Mindmap

mindmap
  root((PHP The Right Way))
    What it is
      Best practices guide
      PHP coding standards
      Community reference
    Content
      Markdown sections
      Jekyll static site
      PSR-1 code samples
    Translations
      20 plus languages
      Community forks
      Linked from main site
    Contributing
      Fork and PR
      American English
      Style guide enforced
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Read accepted PHP best practices and coding standards as a beginner or intermediate developer at phptherightway.com

USE CASE 2

Contribute a new section or correction to the guide by forking the repo, editing Markdown, and opening a pull request

USE CASE 3

Start a community translation of the guide into a new language by following the fork instructions in the repository

USE CASE 4

Run the site locally with Jekyll to preview changes before submitting a pull request

Tech stack

JekyllMarkdownCSSHTMLRuby

Getting it running

Difficulty · easy Time to first run · 5min
Free to share and adapt for non-commercial purposes only, with attribution, and you must release derivatives under the same license.

In plain English

This repository holds the source code for the PHP: The Right Way website, a reference guide aimed at helping PHP developers follow accepted best practices and coding standards. The actual reading experience lives at phptherightway.com, but all the content and the site structure that produces it are managed here. The site is built with Jekyll, which turns a collection of plain text and Markdown files into a static website. The guide itself is organized as a series of sections and sub-sections, each stored as a separate Markdown file in the project's posts directory. The navigation and page layout are generated automatically from those files, so contributors can add or edit content without touching the site's HTML structure. The guide exists because the PHP community has historically suffered from a shortage of credible, well-organized learning resources, especially for people new to the language. It was started by Josh Lockhart, who is also the author of the Slim Framework, a lightweight PHP web framework. The project has since grown with contributions from collaborators and the broader community. One of the more notable aspects of the project is the number of translations that have been produced. The guide is available in more than twenty languages, including Spanish, French, German, Japanese, Chinese, Arabic, Korean, Russian, and others. Each translation is maintained as a separate fork on GitHub and linked from the main site. The instructions for contributing a new translation are included in the repository. Contributors can improve the guide by forking the repository, making changes to the Markdown files, and submitting a pull request. The content follows a style guide requiring American English in the primary version, consistent indentation, line length limits, and code samples that meet PHP's PSR-1 standard. The project is released under a Creative Commons Attribution-NonCommercial-ShareAlike license.

Copy-paste prompts

Prompt 1
I'm contributing to codeguy/php-the-right-way. Walk me through forking the repo, adding a new sub-section in Markdown that matches the PSR-1 code style, and opening a pull request.
Prompt 2
Using php-the-right-way as a reference, list the key PHP coding standards (PSR-1 and PSR-2) I should follow for indentation, naming, and file structure in a new PHP project.
Prompt 3
I want to start a translation of PHP: The Right Way into a new language. Show me how to fork the repository and structure the translation files according to the project instructions.
Prompt 4
How do I install the dependencies and run the php-the-right-way Jekyll site locally so I can preview my Markdown edits in a browser before submitting a pull request?
Open on GitHub → Explain another repo

← codeguy on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.