Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

PhpStorm Blog:
Working With PHPUnit and PhpStorm
Mar 23, 2017 @ 16:50:12

On the PhpStorm blog (from JetBrains) Gary Hockin reflects on a post from Adam Wathan with tips for combining PHPUnit and PhpStorm for more effective debugging.

Community stalwart and Laravel aficionado Adam Wathan blogged on his PHPUnit workflow in Sublime text.

Gary then goes through the points in Adam's post and shows how they can (mostly) be accomplished directly in PhpStorm:

  • Generating unit test boilerplate for a class
  • Using "snippets" to create shortcuts for reusable code
  • Running the tests in just one file directly from the IDE

Each section comes with a brief description and animated screen grabs showing the flow of the setup and use for each.

tagged: phpstorm debugging unittest feature generation snippets singlefile tutorial

Link: https://blog.jetbrains.com/phpstorm/2017/01/working-with-phpunit-and-phpstorm/

PHPMaster.com:
5 Inspiring (and Useful) PHP Snippets
Jul 02, 2012 @ 15:58:45

On PHPMaster.com there's a new tutorial that shares some useful PHP snippets that you could use in your development.

"X PHP Snippets" type articles abound on the Internet, so why write another one? Well, let's face it… the PHP snippets in them are generally lame. Snippets that generating a random string or return $_SERVER["REMOTE_ADDR"] for the IP Address of a client really aren't that interesting and are of modest usefulness. Instead, here's five snippets that you'll no doubt find interesting and useful, presented along with the problems that inspired them. I hope the creativity in many of them inspire you to write better and more creative code in your own day-to-day endeavors.

Their "five tips" are about:

  • Generating CSV files from an array of data
  • Autoloading classes (in a PSR-0 way)
  • Parsing data with the unpack function
  • Templating in HTML (creating a "View" object)
  • Using file_get_contents as a cURL Alternative
tagged: snippets csv autoload unpack template filegetcontents

Link:

Stuart Herbert's Blog:
PHPUnit Plugin For Sublime Text 2
Feb 06, 2012 @ 16:05:11

Stuart Herbert has officially released a plugin for the popular text editor Sublime Text 2 to integrate PHPUnit support directly into the editing environment.

Sublime Text 2 is a new cross-platform text editor that I’ve recently switched to. It’s still in public beta, but already offers better performance (and battery life!) and a better look (fonts that render properly!) than Java-based IDEs such as Netbeans. One thing it didn’t have was support for PHPUnit, so I’ve made a plugin. It’s available to install via Package Control.

The plugin allows you to directly create tests for a class using a context menu's "Test This Class" option. You can also run the tests directly from the editor and use either the menu or direct text commands to control it. He's also gathering some other well-used PHP snippets into another related plugin, the Additional PHP Snippets plugin.

tagged: sublimetext2 editor phpunit plugin additional snippets

Link:

SnippetCollection.com:
PHP Snippets & Examples
Feb 14, 2006 @ 13:09:05

Welcome to SnippetCollection.com. Here you can find a large collection of snippets and examples in ActionScript, Php, Java, Java Script, VB, VB.NET, C, C++, ASP, ASP.NET, Perl , SQL and Python.

SnippetCollection.com is just like it sounds - a resource for sharing those little handy pieces of code that we all use over and over again. There are various other categories, but the PHP section has its fair share of items in the list. Various topics and skill levels are represented here, everything from "calling a function" to advanced array operations. So, if you have a bit of code to share with the world, head over, sign up, and get started...

tagged: snippets examples share snippets examples share

Link:

SnippetCollection.com:
PHP Snippets & Examples
Feb 14, 2006 @ 13:09:05

Welcome to SnippetCollection.com. Here you can find a large collection of snippets and examples in ActionScript, Php, Java, Java Script, VB, VB.NET, C, C++, ASP, ASP.NET, Perl , SQL and Python.

SnippetCollection.com is just like it sounds - a resource for sharing those little handy pieces of code that we all use over and over again. There are various other categories, but the PHP section has its fair share of items in the list. Various topics and skill levels are represented here, everything from "calling a function" to advanced array operations. So, if you have a bit of code to share with the world, head over, sign up, and get started...

tagged: snippets examples share snippets examples share

Link:

Community News:
New Site Created - PHP4it.com
Jan 16, 2006 @ 13:45:50

In an effort to provide a place for "common (& not so common) problems in IT" revolving around PHP, a new has been created - PHP4it.com.

Welcome to PHP4IT where you'll find php code samples & php scripts geared towards solving common (& not so common) problems in IT. Any comments/corrections are 100% welcome so please feel free to speak up!

Currently, they have a few posts, but it could definitely grow to a resource with lots of handy "snippets" of PHP code to help out with specific tasks. So, head over and check out this newly-formed site and contribute your own tip(s) today!

tagged: new site php4it.com snippets howto common problems new site php4it.com snippets howto common problems

Link:

Community News:
New Site Created - PHP4it.com
Jan 16, 2006 @ 13:45:50

In an effort to provide a place for "common (& not so common) problems in IT" revolving around PHP, a new has been created - PHP4it.com.

Welcome to PHP4IT where you'll find php code samples & php scripts geared towards solving common (& not so common) problems in IT. Any comments/corrections are 100% welcome so please feel free to speak up!

Currently, they have a few posts, but it could definitely grow to a resource with lots of handy "snippets" of PHP code to help out with specific tasks. So, head over and check out this newly-formed site and contribute your own tip(s) today!

tagged: new site php4it.com snippets howto common problems new site php4it.com snippets howto common problems

Link:


Trending Topics: