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
  • 2 hours ago
  • 6 years ago

Installs

  • Total 65K
  • Win 39K
  • OS X 14K
  • Linux 13K
Oct 23 Oct 22 Oct 21 Oct 20 Oct 19 Oct 18 Oct 17 Oct 16 Oct 15 Oct 14 Oct 13 Oct 12 Oct 11 Oct 10 Oct 9 Oct 8 Oct 7 Oct 6 Oct 5 Oct 4 Oct 3 Oct 2 Oct 1 Sep 30 Sep 29 Sep 28 Sep 27 Sep 26 Sep 25 Sep 24 Sep 23 Sep 22 Sep 21 Sep 20 Sep 19 Sep 18 Sep 17 Sep 16 Sep 15 Sep 14 Sep 13 Sep 12 Sep 11 Sep 10 Sep 9 Sep 8
Windows 3 4 12 11 8 13 7 10 4 7 10 4 4 11 10 4 8 2 9 7 10 8 1 8 10 10 8 13 12 5 10 15 8 10 12 12 9 10 16 19 14 14 4 8 6 9
OS X 1 0 0 0 1 2 2 2 3 0 0 3 0 1 1 1 1 4 0 1 0 1 1 1 0 1 2 0 1 1 2 0 3 1 2 1 1 0 1 2 0 1 1 2 0 3
Linux 0 1 0 4 2 3 4 5 5 6 0 0 0 1 3 3 1 2 3 0 1 5 2 2 4 2 5 4 4 2 4 2 6 3 4 5 1 1 3 3 3 2 2 2 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 :)