 | News Feed |
 | Jobs Feed |
Sections
|
| feed this: |  |
Mayflower Blog: Zend Framework Application.ini Cheat Sheet
by Chris Cornutt February 06, 2012 @ 11:42:22
On the Mayflower blog today there's a new post sharing a Zend Framework application.ini "cheat sheet" with links to pages in the ZF manual explaining the details about each of the front controller options.
All this is long gone in the past since the introduction of Zend_Application and the bootstrapping resource adapters. Zend introduced a standard bootstrapping mechanism into their framework. Many of the options from different framework components can now be configured in the applications configuration file application.ini. One problem persists although: the documentation. All the parameters for components like View, Session, Database etc. are documented either with the bootstrap resource, the component itself or both.
They've posted it to github complete with sections detailing:
- CacheManager
- Db
- FrontController
- Layout
- Navigation
- Router
- Translate
...and quite a few more. This is a great reference for anyone using the Zend Framework, no matter your experience level.
voice your opinion now!
zendframework applicationini cheatsheet configuration reference
Ryan Gantt's Blog: Anonymous recursion in PHP
by Chris Cornutt August 11, 2011 @ 10:55:35
In a recent post to his blog Ryan Gantt looks at an interesting way to get around a limitation in PHP dealing with anonymous recursion and closures that throws a Fatal error when called.
Turns out that variables called as functions must be an instance of Closure, an instance of a class which implements __invoke(), or a string representing a named function in the global namespace. In the anonymous function body above, $fibonacci is none of these. It is an undeclared, free variable in the closure created by the anonymous function. At the time when it's called, it hasn't been bound-hence the Notice that you would have gotten if error reporting were set at a high enough threshold - and therefore can't be called as anything, let alone as a function.
He tried using the "use" functionality PHP closures have to bring a variable/object/etc into the scope of the running function, but it still threw an error. As it turns out, the combination of "use"-ing the object and calling it by reference handles things correctly. He takes this method and applies it in two examples - one call in an array_map function and another in an array_reduce.
voice your opinion now!
anonymous recursion reference invoke closure
DZone.com: PHP Quick Reference
by Chris Cornutt April 06, 2011 @ 08:34:05
On DZone.com today there's a new post from Chris Shiflett sharing some timeless advice from an older copy of a PHP Quick Reference (published in 2009) about performance and security.
While cleaning out my desk, I found an old copy of a PHP Quick Reference I helped make a few years ago. On the front page are a few performance and security tips that I thought I'd share. (Performance tips are from George Schlossnagle.)
Performance tips include profile early/profile often, cache when possible and don't over-optimize. The security hints include some of the usual suspects - trust nothing, filter input/escape output and use prepared statements.
voice your opinion now!
quick reference advice security performance
Giorgio Sironi's Blog: The PHPUnit Refcard is out
by Chris Cornutt November 15, 2010 @ 11:58:17
Unit testing fans will be happy to know that a Refcard from DZone has been published (authored by Giorgio Sironi) so you can keep PHPUnit at your fingertips.
Do you occasionally forget the syntax for creating Mocks and Stubs in PHPUnit? Or wonder how a command line option work? Or if there is an assertion that may be perfect for the test you're writing? Then this Refcard can help you. The Refcard is a PDF cheatsheet of 6 pages, which interleaves code samples with explaining test and sample outputs. Getting to know PHPUnit to use it at its full potential will be a little easier now.
You can check out the contents of the refcard on the DZone site or download a PDF to make it all your own.
voice your opinion now!
reference card dzone phpunit release
Derick Rethans' Blog: Collecting Garbage PHP's take on variables
by Chris Cornutt August 31, 2010 @ 10:49:11
Derick Rethans is republishing an article series he wrote (originally for php|architect) about the garbage collection that is included with the PHP 5.3 releases. He kicks off the series with this first post introducing internal variable handling.
Before we start with the intricate details of PHP's new GC engine I will explain why it is actually needed. This, combined with an introduction how PHP deals with variables in general is explained in this first part of the column. The second part will cover the solution and some notes on the GC mechanism itself, and the third part covers some implications of the GC mechanism, as well as some benchmarks. But now first on to the introduction.
He introduces the concept of a "zval" - the container PHP uses internally to handle variables (along with its "is_ref" and "refcount" to tell the interpreter if it's a reference or not). He also shows how these relate to the variables you set in your applications as well as a mention of the xdebug_debug_zval function of XDebug to show how it's handled behind the scenes. He also shows how references are handled with accompanying images to show the flow. If you'd like more information on variable handling, Derick points to this article for more detail.
voice your opinion now!
garbage collection variable introduction zval reference xdebug
Brian Swan's Blog: SQL Server Driver for PHP Cheat Sheet
by Chris Cornutt March 03, 2010 @ 09:14:55
Following in the steps of some of his previous posts looking at the combination of PHP and SQL Server, Brian Swan has a new post to his MSDN blog today - a SQL Server driver cheat sheet.
You might think that I would know the driver API by heart at this point, but alas, my many trips back to the documentation are proof that my brain is like a fixed length queue - if something new goes in, something else must go out. So, I've created a cheat sheet that saves me some of those trips to the documentation. I'm hoping that others might find it helpful too
He mentions a few things that make the sheet particularly useful - signatures for the functions are included but not the type info for the parameters, a list of PHPTYPE constants, FETCH constants (for the return type) and CURSOR constants (for defining cursor return type). You can see a preview of it here (as a PNG) and grab the actual sheet here as a PDF.
voice your opinion now!
sqlserver driver cheatsheet reference pdf
Chris Shiflett's Blog: PHP Quick Reference
by Chris Cornutt August 07, 2009 @ 07:57:20
Chris Shiflett, after finding an old reference guide, has decided to share a few helpful hints from the guide to help you in your development.
While cleaning out my desk, I found an old copy of a PHP Quick Reference I helped make a few years ago. On the front page are a few performance and security tips that I thought I'd share. (Performance tips are from George Schlossnagle.)
The tips include topics like caching, using external data sources, filtering input using prepared statements and using pre-existing solutions before just rolling your own.
voice your opinion now!
quick reference book list tip
Symfony Blog: The symfony Reference Guide The new book about symfony
by Chris Cornutt July 29, 2009 @ 12:16:47
The Symfony blog has a new post letting you know that the latest version of their guide to the framework - "The Symfony 1.2 Reference Guide" - has been released.
The symfony Reference Guide book is now available. As always, you can read the online version right now for free, or buy the printed version. At only $19.90, it is also a great way to donate to the symfony project. [...] This is a book you will keep with you whenever you develop with symfony. This book is the fastest way to find every available configuration thanks to a very detailed table of contents, an index of terms, cross-references inside the chapters, tables, and much more.
This book joins others about the framework including "Practical Symfony", "The Guide to Doctrine 1.0" and "Symfony : Mieux developper en PHP avec Symfony 1.2 et Doctrine".
voice your opinion now!
symfony book framework reference guide
Mark van der Velden's Blog: PHP Quiz part 2
by Chris Cornutt May 14, 2009 @ 12:05:22
Mark van der Velden has posted another PHP quiz you can used to test your knowledge of the language:
A short quiz this time, but that doesn't make it less fun. Do you know the answer to all of them? Get a cup of coffee and kill 10 minutes with round two... As always, think of the answer before you execute the code or look it up. You can find round one here.
This one has questions on arrays, ArrayAccess, references, operator precedence and nesting structures. There's no answer key, so you'll just have to test it out if you want to see the answer.
voice your opinion now!
operator nesting reference array quiz
ITJOBLOG: Zend Server and how PHP sidled into the Enterprise
by Chris Cornutt April 28, 2009 @ 12:06:58
On the ITJOBLOG a recent post takes a look at how PHP has "sidled into the Enterprise" with the help of Zend and Zend Server.
Zend is flourishing despite the recession - "the Q1 of 2009 has been our strongest quarter ever," says Suraski - and although PHP's enterprise market share is small compared to Java or .NET, it is growing. [...] What interests me is why this has happened. [...] More directly important though is that the community using PHP - the large area of non-paying users in Suraski's slide - has created a remarkable pool of resources on the Internet that is available to everyone, business users included. Non-commercial users are those most likely to share their knowledge, unfettered by concerns over business confidentiality or copyright.
He notes that, upon sitting down and developing a small PHP application, every problem he encountered was easily remedied by either a Google search, a message board or in the PHP manual - "I don't mean to belittle the extent of online resources available to Java or .NET developers, but would argue that PHP has the edge here."
voice your opinion now!
zend zendserver reference resource enterprise zeevsuraski
|
Community Events
Don't see your event here? Let us know!
|