Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PHP #244

Open
weidmaster opened this issue Sep 26, 2022 · 2 comments
Open

PHP #244

weidmaster opened this issue Sep 26, 2022 · 2 comments

Comments

@weidmaster
Copy link

Thumbs up if you want PHP support. It gets different syntax then HTML/CSS and sometimes some themes are difficult to read for this language.

@jschr
Copy link
Member

jschr commented May 26, 2023

I would like to add support for PHP soon. It's been a long time since I've used PHP so if anybody would like to provide some suggestions for the PHP code we show in the previews that would be helpful.

The code should:

  • Be exactly 14 lines including empty lines (so that the font sizes remain the same across different languages)
  • Be valid syntax and ideally a working program
  • Include a comment

@davisenra
Copy link

I would like to suggest the following code:

<?php

class Main
{
    // This is a comment
    private string $message = 'Hello World!';

    public function printMessage(): void
    {
        echo "{$this->message}\n";
    }
}

(new Main())->printMessage();

14 lines, has empty lines, valid syntax, working program and includes a comment, plus it follows the code styling defined by the community.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants