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
  • 6 years ago
  • 32 minutes ago
  • 7 years ago

Installs

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

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 :)