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

Installs

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