Community News: Namespaces in PHP6
22384
Spurred on by a recent post to the php-dev mailing list by Dmitry Stogov the ever-popular "namespaces discussion" has surged back to the top of everyone's list. Dmitry proposed a patch for PHP6 that would easily implement namespaces for the upcoming version.   All class and function names inside are automatically prefixed with namespace name. Inside namespace, local name always takes precedence over global name. It is possible to use the same namespace in several PHP files. The namespace declaration statement must be the very first statement in file.   The general idea is to provide an easy separation of functionality but to keep things accessible at any level (in scope, in parent scope, etc). He's included code in his mailing list post to illustrate how it would all work.   Several others in the PHP community have jumped on and are already talking about this new proposal:   Evert Pot's post a blog entry from Richard Heyes proposing a namespace character a new post from the PHP 10.0 Blog on simplicity in namespaces this new post from Tony Bibbs some thoughts from Tobias Schlitt happily supporting the proposal this post from DynamicWebPages.de
698334
Popular posts from PHPDeveloper.org for the past week:The Bakery: Six New Articles/Tutorials PostedEvert Pot's Blog: PHP: Arrays vs. ObjectsDevArticles: Learning AJAXInternet Super Hero: PHP: mysqli_fetch_all()David Coallier's Blog: PHP Namespaces (Part 1: Basic usage & gotchas)I/O Reader: 15 Cool Things & 12 Things to Dislike About PHPProPHP Podcast: Newscast - August 16, 2007PHPBuilder.com: Dynamic XML with PHPSite News: Popular Posts for the Week of 08.17.2007PRADO Watch Blog: PRADO Watch: Interview With Timani Tunduwani - Why I Moved From CakePHP to PRADO
449459
DevShed continues their series looking at some of the fundamentals of working with PHP in this new tutorial posted today. It looks at one of the flow control statements the language has to offer and a very useful data structure - the switch statement and arrays.   In our last exciting adventure (back in early November), we braved crocodiles, ravenous editors, most of the PHP statements, and beginning loops. In this edition we'll cover the final statement, the Switch, and discuss arrays. So sit back, order your R2D2 robot to bring you a cold, frosty Jolt Cola, and let's get cracking.   They start with a simple example of a switch statement (to echo out strings) and follow it with a detailed description of the different sorts of arrays - numeric indexed, associative and multidimensional versions.
400984
Ed Finkler has a little PHP6-related humor posted to his blog today - some things he's looking forward to in PHP6:  His tongue-in-cheek list includes things like:  Punctuation-only variable names HDMI outputs ASCII-art generators added to core (once CLAs are signed) Improved elegance   Looking for something a bit more realistic? Check out our posts tagged with php6 to get details on what's to come and some discussion about these new features.
738021
Manfred Weber points out a new blog post from Jan Kneschke concerning the creation of and the idea of typesafe objects in PHP via doc-comments and the Reflection API.   From Jan:   I always disliked the way PHP handles Objects. There is no way to assign a type to properties. Validators have to be glued against the fields externally and you can't just generate a Object-Description (like WSDL) from a object either.   Because of this he's looked into an alternate solution - the typesafe objects. Since, by defauly, PHP's addition of object properties is pretty freeform, making things typesafe is a little difficult. His suggestion, though, uses a combination of comments in the code (declaring what the type of the property should be) and the Reflection API built in to PHP to "look back" at the comments and ensure the type of the property is correct. He even includes examples - a simple one about throwing an error, generating XML this way, and making safe encoded SQL statements.
650296
In a post from PHP Magazine today, there's mention of an interesting discussion that was had at the latest NYPHP meeting concerning the accessing of the NDB Cluster native API directly from PHP.
242658
Popular posts from PHPDeveloper.org for the past week:Sebastian Bergmann's Blog: Support for the Cancel Case Workflow PatternCommunity News: The PDO v2 ProposalSite News: Popular Posts for the Week of 01.25.2008ProPHP Podcast: PHP Newscast for 2008/01/24Developer Tutorials Blog: Why you should be using YAML for configJob Posting: InvestorGuide.com Seeks Web Developer (Fairfax, VA)Pierre-Alain Joye's Blog: Debugging symfony (or any php script) with vim and XdebugCIO.com: You Used PHP to Write WHAT?!Demian Turner's Blog: Seagull 0.6.4 Release (fixes Security Isse from 0.6.3)Developer Tutorials Blog: PHP Qualifications: The Good, The Bad and The Ugly
360849
On the Zend Developer Zone today, there's this new tutorial that looks at making the move from PHP4's object-oriented programming up to the "more complete obejct model of PHP5" - specifically with the Decorator design pattern.   While working on a project I realized one particular solution was a pretty good way to demonstrate the decorator design pattern together with some of PHP5's features, including abstract classes, interfaces, type hinting, the final keyword and the visibility of properties and methods. This article is intended for those of you who, like myself, are moving from object-oriented programming, including some use of design patterns, in PHP4, to the more complete object model of PHP5.   He sets up a scenario about the development of an online pizza ordering system to show how to "decorate" a pizza with each of the toppings on a list (instead of having to list out every pizza in every possible topping combination). Of course, all of the code is included and explained so you understand exactly what's happening. Finally, there's a demonstration of its usage - a simple call that grabs the stock level/name/cost of each of the items in stock (pizza combinations).
539608
Today, you'll learn about programming fundamentals such as control and page events, variables, arrays, functions, operators, conditionals, and loops. Next, we'll dive into namespaces and address the topic of classes, how they're exposed through namespaces, etc. By SitePoint. 0719
407104
If you've been looking for more information on the phpAspect project but have been sad to note it having fallen by the wayside, you'll be happy to know that Willliam Candillon is alive and well and so is the project!   The first news concerns the windows developers, the windows build of PHP_Parse_Tree is finally available (click here to download)! [...] The second news is that my proposal "phpAspect eclipse plugin" for the Google Summer of Code 2007 under the mentoring of Gilles Vanwormhoudt has been accepted!   Be sure to keep an eye on the project's website and their Summer of Code page to keep up with the latest.
635920
Popular posts from PHPDeveloper.org for the past week:Padraic Brady's Blog: Complex Views w/Zend Framework - The Final Chapter: ZFE & Zend_Layout in Core!php|architect: Stuff your stockings: single issues 30% offDeveloperTutorials.com: How to Install PHP 5 on LinuxStoyan Stefanov's Blog: Fancy FormattingSymbianOne.com: Your S60 Web server gets a boostAndreas Gohr's Blog: MySimple.php - A lightweight PHPMyAdmin substituteNessa's Blog: Working with Permissions in PHPSymfony Blog: Symfony 1.0.10 is OutMatthew Turland's Blog: Web Scraping Article PublishedJan Lehnardt's Blog: REST Controller for PHP Applications
575210
Popular posts from PHPDeveloper.org for the past week:PHP-Coding-Practices.com: How I Turned A Slow Array Sort Into A Quick One Using Quicksort AlgorithmZend Developer Zone: PHP Abstract Podcast Episode 4: Planning ProgrammingWeb Development Blog: Save bandwidth with PHProxy and ip2nationJob Posting: Assembleron Ltd Seeks PHP 5/MySQL/Ajax Developers (Reading, UK)PÃ¡draic Brady's Blog: Complex Views with the Zend Framework - Part 6: Setting The TerminologyThe Bakery: Four New Articles - Load Balancing, Request Info, UUID Behavior & Upload ThumbnailsCommunity News: PEAR Installer version 1.6.0 releasedChristopher Kunz's Blog: Building PHP with cURL and libmysqlclient5DevShed: Working with Prepared Queries with PDO Objects in PHP 5Secunia.com: rPath update for gd, php, php-mysql, and php-pgsql
126500
DevShed is starting up another new series today, this time looking at the DirectoryIterator methods out of the Standard PHP Library functionality.   Because this class might be handy to use in projects where handling directories is a must, in this new series I'll be taking a close look at some of its most important methods. We will explore these methods appropriately in conjunction with the corresponding code samples.    They introduce the class, noting why it's handy to use and where's the best place to use it - including an example. They get into a bit more detail, looking at the key() and current() methods as well as using the rewind() method to reset the pointer for the directory.
186014
Latest PHPClasses.org Releases:Simple CURL WrapperMoney CurrencyDraw SudokuPlay List ImportercPanel APIDate Drop Down List GeneratorBig Number CalculatorRSS ErrorSession in CookiesPHP MS WordOverall Tag ViewGoogle Calendar WrapperGraidleAJAXed list boxes
616513
Popular posts from PHPDeveloper.org for the past week:Community News: Namespaces in PHP6Mike Potter's Blog: Sample Code From PHP / Flex e-SeminarThe Bakery: PremierMarinas.com, ScienceHack.com and an iPhone AppPHP F1: PHP Session TutorialCommunity News: GoPHP5 Official SiteCommunity News: jPOP Framework - Javascript & PHPTim Koschuetzki's Blog: Composing Methods: Remove Assignments to ParametersAlexey Zakhlestin's Blog: YAML: Syck for PHP is not read-only anymoreMatthew O'Phinney's Blog: File_Fortune refactoredSite News: Popular Posts for the Week of 07.06.2007
325308
This week's edition of PHP Magazine's PHPBarnstormer has been released - Issue #22.
496780
Lorenzo Alberton has posted some updates about the PEAR packages that he maintains to his blog today including MDB_QueryTool, Mail_Queue2, MDB2, and Translation2.   Even if lately I've been coding way more in C/C++ than in PHP, I still keep an eye on PEAR developement: I reckon in the last month I've closed a bug a day, on average. And after my last call for help about my PEAR packages, I'm also pleased to announce that someone did indeed offer a hand. I'm happy to welcome not one, but two new developers!   Each of the items has links to their PEAR homepage and a few quick words on where the package stands (including developers involved or wanting to get involved). He also reminds developers out there that they can help out too if they want to jump in and get into PEAR.