Data Types, Literals, Variables, and Constants - Part 2
694259
This week we look at valid names, declaring, initializing and displaying variables and mixed data types. We conclude this section with an introduction to form variables. By Ellie Quigley. 0122
178184
Continuing on from the previous part of his series, Stefan Priebsch has posted part two of his look at using XDebug over at the Zend Developer Zone.   Welcome to the second installment of our five-part series of articles on xdebug, the PHP developer's swiss army knife extension. The installation of xdebug and its basic features were covered last week. This week, we will explore the tracing feature of xdebug.   He details what tracing is and how it's helpful (no more repetitive var_dumps!) in finding issues in your code. He shows how to set up a trace log, add the code to your application to pass debugging information off to the log and how to add additional information to the log to make narrowing down the error even easier.
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
632891
Popular posts from PHPDeveloper.org for the past week:Job Posting: WorldNetJobs.com Seeks Expert PHP Developer (Multiple Locations - FL/MD/NY)Stefan Reuter's Blog: Profiling PHP ApplicationsRich Zygler's Blog: People work with WS-* web services in PHP? Why?PHPBuilder.com: Securing Data Sent Via GET RequestsKore Nordmann's Blog: Comparision of PHP image librariesJim Wynia's Blog:  WebDAV, PHP and YouPadraic Brady's Blog: Namespaces (or Yet Another Pointless Opinion Piece)Christopher Jones' Blog: PHP 5.2.5 RPMs with OCI8 and PDO_OCI are availableZend Developer Zone: PHP Abstract Podcast Episode 29: PHP Women Podcast (Recorded Live)Evert Pot's Blog: PHP WebDAV Integration Library
242013
Popular posts from PHPDeveloper.org for the past week:ProDevTips.com: Writing a CMS/Community with Smarty and the Zend Framework: Part 6Nessa's Blog: Using an .htaccess with PHP Compiled as CGIArnold Daniels' Blog: How I PHP: The Output Handler - ContinuedMartynas Jusevicius' Blog: PHP 5 features: Class autoloadingSean Coates' Blog: Actually Solving a Problem (believe it or not)The Northclick Blog: Message Queue Project: First working versionStefan Mischook's Blog: A Question about object properties in PHP ClassesJob Posting: G2 Technology Seeks PHP Developer (Memphis, TN)Rob Allen's Blog: Zend_View: Access the view from a view helperDavid Walsh's Blog: Using PHP Generic Objects To Organize Your Code
288007
After long discussions and much opinion being thrown around, Andrei Zmievski points outintegration of namespaces into the upcoming PHP6 release.   Ladies and gentlemen, we have namespaces.   According to the post from  \
587677
John Lim has posted about an interesting bug he's come across when working with the output of two strings that should look the same:   Someone reported a bug in ADOdb, the open source db library i maintain. I went crazy for half an hour until i realised the problem.   According to him, "if you expect the above code to produce the same values, you are sadly mistaken". His example gives an interesting result for the first echo statement - not echoing the 9 in the first character like it seems would make sense. Check out his post for the code and try it out for yourself.
700792
Brian Moon has posted some thoughts about "the post" that Terry Chay recently wrote including comments on smart versus intelligent, object nonense, and funky function names.    So, if you are not smart, then stop coding PHP.  Its a good thing that C developers are smart.  They have to remember all those functions.  Assembly language developers donât have to remember functions.  I guess they are not smart?   Ok, that last paragraph was tongue in cheek.  Knowing 3000+ functions does not make you smart.  It means you have a good memory.  I will take intelligence over smart or a good memory any day.     His comments on the "object nonsense" makes note of the difference between functions and methods and the function naming issue - well, he has "no solid defense" as they do make it difficult to learn the language and send some developers running back to the manual to make sure the parameter order is right each time.
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
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
582158
Michael Kimsal points out the posting of the latest part of his "Grails for PHP developers" series to his blog site - Part Five of the series.   I've put up the latest installment in my "Grails for PHP developers".  Rather than delve too much more in to Grails head on, I'm taking this installment (and at least the next one) to delve more in to the Groovy language itself.  Groovy offers similarities to PHP, but also many differences which can trip you up if you're not careful.  I'll try to lay those out as best I can in the next couple of installments.   This new part of the series goes back and puts the spotlight on GRoovy, the base of the Groovy/Grails combo. He talks about working with variables and arrays as containers for multiple pieces of data and some possible gotchas that could come up along the way.
351323
This week wraps up our section on Object-Oriented JavaScript with a look at prototypes, the JavaScript execution context, var x, this.x, and x, inheritance using closures and prototypes and more. By Cristian Darie, Bogdan Brinzarea. 1029
731858
Really cool blog post about hidden Java features.  These are little tricks that you forget about from time to time but that make life more pleasant.  This is a good one:  "Instance initializers -- I've been exploiting these lately to abbreviate list initialization (in unit tests only): > List triple = new ArrayList(3) { >   { add("a"); add("b"); add("c"); } > };"  I've been using static code blocks but this looks like it might be a better trick.  Example:  "public static List = new ArrayList(); > static {     list.add( "foo" ); }"  Also this final Closure  hack seems pretty cool:
320728
In an earlier post John Lim pointed out an interesting issue with how certain numbers are handled in PHP - ones starting with a zero:   That's because any number preceded by 0 is treated as an octal number, and 9 is an invalid octal number. [...] The silly thing is that hardly anyone uses octal nowadays, but it continues to be part of the C, C++, Java and PHP standards. The mistake is also very common.   There's not much way around it, he notes - the format's been in use for a long time now and is so ingrained in just about every C-based language out there that it's "too deeply imprinted in modern compiler DNA" to take out.
318761
DevShed ramps up another new series today with this new article giving developers a look at working with object-oriented programming through the eyes of design patterns. It's another excerpt from the George Schlossnagle book "Advanced PHP Programming".   This chapter provides an overview of the advanced OO features now available in PHP. Some of the examples developed here will be used throughout the rest of this book and will hopefully serve as a demonstration that certain problems really benefit from the OO approach.   The article lays down the foundation for the more complex information to come. It introduces object-oriented programming briefly, and talks about some of the handy features of it - like inheritance, static attributes and methods.
235938
Ivo Jansch discovered something interesting by way of an applicant's resume - a hidden "trick" that PHP pulls on the user when they try to use a Java-like syntax with System.    So yesterday I was reviewing a code sample that a job applicant had written during a test and I encountered the following line of code:  It's not hard to guess what his background was :), but I was initially stunned that this actually works in php.    After a little investigating (and ruling out the Java Bridge), Ivo found that the line was being interpreted literally and was just being handled as a string instead of a constant. He gives two other examples to help with clarification.
68341
Mike Naberezny has posted a few more articles to the "Rails for PHP Developers" website (based on this book) covering some more of the basics.  There's three new tutorials posted:  Ruby Block Scope - the basics of Ruby block scope, a common point of confusion for PHP developers new to Ruby.  Variable Arguments - an article that shows two common API patterns found in Rails, variable arguments and option hashes, and how to implement them both in PHP.  Regular Expressions in Ruby - a useful reference that maps all of the common PHP regular expression functions to the equivalents in Ruby.    Check out the rest of the site for even more great content.