Update cheatsheets

This commit is contained in:
ivuorinen
2025-05-29 00:20:08 +00:00
parent 7ff012837a
commit ab141b6531
16 changed files with 387 additions and 16 deletions

View File

@@ -12,30 +12,30 @@ source: https://github.com/tldr-pages/tldr.git
`php {{path/to/file}}`
- Check syntax on (i.e. lint) a PHP script:
- Check syntax on (i.e. [l]int) a PHP script:
`php -l {{path/to/file}}`
`php {{[-l|--syntax-check]}} {{path/to/file}}`
- Run PHP interactively:
- Run PHP inter[a]ctively:
`php -a`
`php {{[-a|--interactive]}}`
- Run PHP code (Notes: Don't use <? ?> tags; escape double quotes with backslash):
`php -r "{{code}}"`
`php {{[-r|--run]}} "{{code}}"`
- Start a PHP built-in web server in the current directory:
- Start a PHP built-in web [S]erver in the current directory:
`php -S {{host:port}}`
`php {{[-S|--server]}} {{host:port}}`
- List installed PHP extensions:
`php -m`
`php {{[-m|--modules]}}`
- Display information about the current PHP configuration:
`php -i`
`php {{[-i|--info]}}`
- Display information about a specific function:
`php --rf {{function_name}}`
`php {{[--rf|--rfunction]}} {{function_name}}`