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

NetTuts.com:
Five Hidden Gems of Laravel
Aug 22, 2014 @ 16:51:20

The NetTuts.com site has posted a list of their five hidden gems in Laravel, a popular PHP framework. They look at a wide range of these "hidden" features that can help make your Laravel experience even better.

Many developers who use Laravel are probably only barely scratching the surface of what the framework has to offer. While the documentation does cover the most common use cases and the obvious features, it doesn’t cover everything. Don’t get me wrong, the documentation is fine, it’s just that there’s so much you can do, it’s hard to document everything. Because of that, we're going to take a look at some of the hidden gems that lurk within Laravel.

The five items on their list come complete with summaries about the feature, when they were added, if they're documented and a code sample with them in use:

  • Cascading Views
  • Collections (with sorting, filtering and pagination)
  • Regular Expression Filters
  • The Message Bag
  • Fluent
tagged: hidden gems laravel framework views collections regex filter message fluent

Link: http://code.tutsplus.com/articles/five-hidden-gems-of-laravel--cms-21907

Derick Rethans:
Contributing Advent 1: Xdebug and hidden properties
Dec 02, 2013 @ 15:16:50

As a part of his "Advent Contribution" series Derick Rethans has posted about an update to XDebug that fixes a bug reported around hidden properties.

This first contribution is for bug #987: "Hidden property names not shown". In PHP it is possible to convert an array to an object. [...] Xdebug's standard HTML var_dump() as well as the CLI, the coloured CLI and the debugger interface DBGp all suffered from the same issues that numerical properties were not showing in output.

With the committed fix the output of the var_dump now shows these special property names with curly braces around them and makes them available via the property_get method. If you're interested in the actual commit, you can check it out here.

tagged: advent contribute hidden properties xdebug vardump propertyget

Link: http://derickrethans.nl/advent01.html

Stefan Koopmanschap's Blog:
PHP Hidden Gem: similar_text()
Jul 13, 2009 @ 14:37:50

Stefan Koopmanschap has written about a hidden gem he discovered in PHP to help locate blocks of text that seem similar from one or more sources - similar_text.

I am working on a hobby project where I aggregate feeds from several different sources. With the blogs I work it right now, it often happens that an author posts the same post to a few different sites. However, because of site formats and sometimes also quick edits an author makes on one site but not on the author, the article contents are usually not identical strings. So I needed something that would help me figure out whether or not two strings are nearly identical.

After Googling around and finding things like the xdiff extension and soundex, he discovered the two functions he needed - levenshtein and similar_text.

I am still trying to figure out which percentage will catch the duplicates but not catch too many posts which are only similar but not actually duplicates, but with the above 75% I seem to catch quite a few duplicates so far.
tagged: similartext gem hidden

Link:

Johannes Schluter's Blog:
A hidden gem in PHP 5.3: fileinfo
Dec 17, 2008 @ 15:35:59

Johannes Schluter has pointed out a "hidden gem" for PHP 5.3 in his latest blog post - the fileinfo extension.

This series is not meant to be complete but some personal choice, these blog postings are also no replacement for documentation, but just pointers. My goal is that you try out 5.3 right now so we can fix bugs as soon as possible before releasing it The NEWS file has a quite short entry for my first subject: Added fileinfo extension as replacement for mime_magic extension. (Derick)

He looks at one situation where the extension could come in very handy - getting the content type of the file for a download push - as well as why its better than the older mime_content_type function.

tagged: php5 gem fileinfo mimecontenttype function extension hidden

Link:

Zend Developer Zone:
Zend Framework Hidden Gems: Zend_Db
Dec 18, 2006 @ 16:04:00

Aaron Wormus and the Zend Developer Zone have posted the latest edition of their "Hidden Gems" series looking at the lesser-known features of the Zend Framework. This time, it's a look at Zend_Db (database abstraction).

Zend_Db is a layer which sits above the native PDO database extension. Before PDO (pre-PHP5.1) all we had to connect to databases were libraries that were developed in individual cycles and development teams, with little regard to what other database extensions were doing.

Taking this speed benefit of using PDO to do a majority of the work, PDO wrapper libraries like Zend_Db can supplement PDO with their own wrapper code leaving you with a fairly lightweight yet feature-rich database abstraction layer.

Aaron looks at connecting to a database (using both the PDO and DSN connections) and some example code showing how to work with the database using them - including queries and using transactions.

tagged: hidden gem zend framework zenddb database abstraction hidden gem zend framework zenddb database abstraction

Link:

Zend Developer Zone:
Zend Framework Hidden Gems: Zend_Db
Dec 18, 2006 @ 16:04:00

Aaron Wormus and the Zend Developer Zone have posted the latest edition of their "Hidden Gems" series looking at the lesser-known features of the Zend Framework. This time, it's a look at Zend_Db (database abstraction).

Zend_Db is a layer which sits above the native PDO database extension. Before PDO (pre-PHP5.1) all we had to connect to databases were libraries that were developed in individual cycles and development teams, with little regard to what other database extensions were doing.

Taking this speed benefit of using PDO to do a majority of the work, PDO wrapper libraries like Zend_Db can supplement PDO with their own wrapper code leaving you with a fairly lightweight yet feature-rich database abstraction layer.

Aaron looks at connecting to a database (using both the PDO and DSN connections) and some example code showing how to work with the database using them - including queries and using transactions.

tagged: hidden gem zend framework zenddb database abstraction hidden gem zend framework zenddb database abstraction

Link:

Zend Developer Zone:
Zend Framework Hidden Gems: Zend_Config
Nov 24, 2006 @ 17:43:00

The Zend Developer Zone has posted another in the "Hidden Gems" series by Aaron Wormus, this time looking at the Zend_Config component.

Managing configuration is a pretty simple thing to do in PHP, in fact, I'd bet that at some point in their programming career every php programmer has written code. But as soon as you get a bit bigger you realize that you're going to have trouble accessing your configuration variable.

There are many reasons to manage your configuration data indepenantly from your business logic. One common reason is that you don't want to enter your configuration data into the public versioning system that you use.

Aaron looks at how you can use the component in your application easily including an example using the built-in inheritance functionality to easily manage a move from development to production.

tagged: zend framework hidden gem zendconfig inheritance zend framework hidden gem zendconfig inheritance

Link:

Zend Developer Zone:
Zend Framework Hidden Gems: Zend_Config
Nov 24, 2006 @ 17:43:00

The Zend Developer Zone has posted another in the "Hidden Gems" series by Aaron Wormus, this time looking at the Zend_Config component.

Managing configuration is a pretty simple thing to do in PHP, in fact, I'd bet that at some point in their programming career every php programmer has written code. But as soon as you get a bit bigger you realize that you're going to have trouble accessing your configuration variable.

There are many reasons to manage your configuration data indepenantly from your business logic. One common reason is that you don't want to enter your configuration data into the public versioning system that you use.

Aaron looks at how you can use the component in your application easily including an example using the built-in inheritance functionality to easily manage a move from development to production.

tagged: zend framework hidden gem zendconfig inheritance zend framework hidden gem zendconfig inheritance

Link:

Zend Developer Zone:
Zend Framework Hidden Gems: Zend_Cache
Nov 17, 2006 @ 18:38:42

The Zend Developer Zone has its next in its "Inside Look" series at the Zend Framework and its components - this look at the Zend_Cache component.

Caching isn't one of those things that many people think of when designing their first applications. However once they launch their new AJAX enabled web2.0 application, they might start wondering what they can do to get this beast to move faster. The answer is caching.

Aaron Wormus gets started with the basics - why use caching and some of what it's for - before getting into the actual code example. His simple example just shows how to cache a bit of information and get when it was cached. He also talks about implementing tagging for more complex caches (different pieces for different times), and the drivers that are available for the component - both frontend and backend.

tagged: zendcache component zend framework hidden gem cache zendcache component zend framework hidden gem cache

Link:

Zend Developer Zone:
Zend Framework Hidden Gems: Zend_Cache
Nov 17, 2006 @ 18:38:42

The Zend Developer Zone has its next in its "Inside Look" series at the Zend Framework and its components - this look at the Zend_Cache component.

Caching isn't one of those things that many people think of when designing their first applications. However once they launch their new AJAX enabled web2.0 application, they might start wondering what they can do to get this beast to move faster. The answer is caching.

Aaron Wormus gets started with the basics - why use caching and some of what it's for - before getting into the actual code example. His simple example just shows how to cache a bit of information and get when it was cached. He also talks about implementing tagging for more complex caches (different pieces for different times), and the drivers that are available for the component - both frontend and backend.

tagged: zendcache component zend framework hidden gem cache zendcache component zend framework hidden gem cache

Link:


Trending Topics: