News Feed
Sections




News Archive
feed this:

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
August 22, 2014 @ 11: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
0 comments voice your opinion now!
hidden gems laravel framework views collections regex filter message fluent

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

Qafoo.com:
Black Magic with Regular Expresions
November 29, 2012 @ 10:21:47

If you've been mystified by regular expressions in the past and want to learn more about their effective use, you should check out these two webcasts from Qafoo - "Black Magic with Regular Expressions" and "Understanding Regular Expressions".

We are happy to announce the availability of my second Regular Expression webinar recording. It was a fun event, which I used to explain all the attendees a little bit more about the PCRE Regular Expression engine available in PHP and some other languages. I am covering some slightly advanced topics, like subpattern options, unicode and backtracking aka. greediness and performance.

You can watch these two recordings over on the Zend.com site:

0 comments voice your opinion now!
blackmagic regularexpressions regex webcast recording zend


NETTUTS.com:
Advanced Regular Expression Tips and Techniques
April 19, 2010 @ 09:47:04

NETTUTS.com has posted an advanced guide to regular expressions that just happens to use the PHP PCRE functions to do the matching.

Regular Expressions are the Swiss Army knife for searching through information for certain patterns. They have a wide arsenal of tools, some of which often go undiscovered or underutilized. Today I will show you some advanced tips for working with regular expressions.

They have it broken out into several tips including:

  • Using Callbacks
  • Lookahead and Lookbehind Assertions
  • Filtering Patterns
  • Named Subpatterns

There's also a section called "Don't Reinvent the Wheel" with a few handy expressions to do common things like parse [X]HTML and validating form input.

0 comments voice your opinion now!
advanced regularexpression regex tutorial tip


PHPFreaks.com:
PCRE Regex Spotlight K
August 25, 2009 @ 10:28:44

On the PHPFreaks.com blog today there's a quick new post looking at one of the special backslash strings that doesn't get talked about very much - K - but is quite powerful.

One backslash sequence that doesn't get much attention is K. What this handy little assertion does is match the position of whatever string comes before it in the pattern, then it in essence resets the match. At that point it starts a new match with whatever comes after K from the current location in the subject string.

They include a series of PHP code examples showing how use can use it to work around some of the issues with lookbehind assertions. They also include a few benefits and drawbacks of using them over lookbehinds.

0 comments voice your opinion now!
regularexpression regex assertion backslashk


Robert Basic's Blog:
Playing with Zend_Navigation and routes
August 10, 2009 @ 08:13:12

In this new post to his blog Robert Basic looks at the Zend_Navigation component of the Zend Framework and how it can be used to more correctly handle bad requests.

I wanted to set up routes in such way that when a user requests a page, all requests for non-existing controllers/modules are directed to a specific controller (not the error controller). In other words, if we have controllers IndexController, FooController and PageController, anything but http://example.com/index and http://example.com/foo is directed to the PageController.

Using the Zend_Controller_Router_Route_Regex component he creates an expression that matches anything but the two allowed controllers and pushes them back over to the "page" controller. The new route is put in place via an addRoute call. He also shows how to use the Zend_Navigation component to manage the navigation structure for this application, defining a PHP array of the nested sitemap if the site.

0 comments voice your opinion now!
zendnavigation route regex tree


Make Me Pulse:
Using the Zend Framework URL rewriting
January 15, 2009 @ 07:55:15

New from the Make Me Pulse blog is this quick tutorial about bending the URL rewriting that the Zend Framework does to match whatever your needs might be.

Today for a good website's referencement in Google, it's necessary to have an URL rewriting. [...] If your application is based on ZF, we have a htaccess base file which will redirect all php files to the boostrap (what is the bootstrap ?), and ZF classes will manage all redirection rules. How to implement the URL rewriting with ZF classes ?

He sets up a config file (an ini file) with the routing instructions the framework will need to adhere to and shows how to get the application to include it and match against it for routing rules. His example sets a default route and several regular expression-based routes to remap requests right where they need to go.

0 comments voice your opinion now!
zendframework config file ini routing regex default route tutorial


Kevin Waterson's Blog:
Introduction to PHP Regex
September 09, 2008 @ 12:59:06

Kevin Waterson has posted an extensive tutorial to his site today giving a great look at regular expressions in PHP (and just regular expressions in general).

At its most basic level, a regex can be considered a method of pattern matching or matching patterns within a string. In PHP the most oft used is PCRE or "Perl Compatible Regular Expressions". Here we will try to decypher the meaningless hieroglyphics and set you on your way to a powerful tool for use in your applications. Do not try to understand all this in a single sitting. Instead, take in a little and come back as you grasp various concepts.

He starts with simple string matching, showing how to get values from the middle, end and beginning of it then moves on to the next more powerful step - using meta characters. He outlines these as well as sequences and modifiers. There's plenty of examples here so there's almost no chance of getting lost.

It's a great tutorial that I'd recommend to anyone who things regular expressions are "just too hard" or it looking to figure out their power.

0 comments voice your opinion now!
introduction tutorial regularexpression regex beginner


Tobias Schlitt's Blog:
Comfortable PHP editing with VIM -5-
August 23, 2006 @ 09:55:06

Tobias Schlitt has picked by up his "comfortable PHP editing in VIM" series today with this lengthy post with loads of helpful VIM tips to share with PHP developers everywhere.

More than a half year after my last "Comfortable PHP editing with VIM" post, I take up this series again, although I decided to let it die in January. Sadly I did not find any time by now, to extend PDV (the PHP Documentor for VIM plugin) further than it's version 1.0.1, which is available through vim.org and on my SVN. Anyway, I collected a lot of (at least for me) helpful VIM tips, which I'd like to share here

The post contains tons of tips on subjects such as:

  • Find matching brace
  • Indenting and unindeting
  • Emergency help
  • Macros
and many more. For each subject, there's an explaination of a situation you might need it in and, of course, the tip itself. He also links to the earlier parts of the series (one through four) for those wanting to catch up.

0 comments voice your opinion now!
vim easy edit pdv comfortable matching recover regex commands vim easy edit pdv comfortable matching recover regex commands



Community Events





Don't see your event here?
Let us know!


api tips deployment install laravel unittest release package language symfony podcast community library introduction opinion zendserver series update framework interview

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework