ctrl+shift+p filters: :st2 :st3 :win :osx :linux
Browse

Additional PHP Snippets

by stuartherbert ST2/ST3

A collection of miscellaneous snippets for coding in PHP using Sublime Text 2

Labels snippets

Details

  • 2012.10.12.09.42.32
  • github.​com
  • github.​com
  • 5 years ago
  • 1 hour ago
  • 6 years ago

Installs

  • Total 66K
  • Win 39K
  • OS X 14K
  • Linux 13K
Jan 22 Jan 21 Jan 20 Jan 19 Jan 18 Jan 17 Jan 16 Jan 15 Jan 14 Jan 13 Jan 12 Jan 11 Jan 10 Jan 9 Jan 8 Jan 7 Jan 6 Jan 5 Jan 4 Jan 3 Jan 2 Jan 1 Dec 31 Dec 30 Dec 29 Dec 28 Dec 27 Dec 26 Dec 25 Dec 24 Dec 23 Dec 22 Dec 21 Dec 20 Dec 19 Dec 18 Dec 17 Dec 16 Dec 15 Dec 14 Dec 13 Dec 12 Dec 11 Dec 10 Dec 9 Dec 8
Windows 3 6 11 10 12 10 6 5 6 6 10 4 2 13 5 2 0 4 6 5 5 1 9 0 8 7 13 11 4 4 4 9 6 8 5 7 4 6 8 7 8 11 15 14 8 6
OS X 0 0 0 1 1 3 1 0 0 0 2 1 2 1 0 0 1 0 2 0 0 1 0 0 0 0 1 1 1 2 0 0 2 0 0 1 0 0 2 4 2 0 2 2 1 0
Linux 1 2 4 2 2 4 2 1 1 3 1 3 1 3 3 1 1 5 2 3 3 0 4 1 2 3 2 0 0 0 1 1 2 5 1 4 1 0 1 0 1 7 2 0 1 0

Readme

Source
raw.​githubusercontent.​com

Additional PHP Snippets For Sublime Text 2

Sublime Text 2 already ships with a lot of snippets for writing PHP code. This is a collection of additional snippets contributed by the PHP community.

Installation

Use Sublime Text 2's Package Control (Preferences -> Package Control -> Install Package -> Additional PHP Snippets) to install this plugin.

Snippets

We add the following snippets to speed up writing PHP code.

To use any of the snippets, simply type the name of the snippet, then press the key. Sublime Text 2 will insert the snippet, and you can then use the key to move through any placeholders that you need to replace.

For LICENSE.md-type files:

  • license-mit: insert the MIT license
  • license-newbsd: insert the new BSD license

__ For PHP files:__

  • php-getset: create getter/setter methods quickly and easily (based on a snippet originally published by @akrabat)
  • php-mit: insert the MIT license as a PHP docblock
  • php-newbsd: insert the new BSD license as a PHP docblock
  • php-section-comment: insert a prominent comment to help break up the sections of your class

Contributions Welcome

Requests for features, and pull requests with patches, are most welcome :)