mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-03-02 08:54:42 +00:00
Update cheatsheets
This commit is contained in:
20
tldr/php
20
tldr/php
@@ -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}}`
|
||||
|
||||
Reference in New Issue
Block a user