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

Christian Weiske:
PHP Cannot access property started with '\o'
November 08, 2013 @ 09:59:13

Christian Weiske had an interesting situation pop up in one of his applications around a call to a variable with an interesting name.

Some days ago I saw the following fatal error for the first time in my life:

Fatal error: Cannot access property started with 'o' in file.php

After some debugging, I found out that the source of the error was not some strange BOM or UTF-8 characters in PHP source code files. No, it was a combination of protected class properties, object-to-array casting and automatic template property mappings.

As it turns out, there was a change in how object-to-array casting was done in PHP 5.3 that made this break (related to things appended to private and protected variable names). He includes a bit of sample code to illustrate the problem - a simple class converted from object to array with direct casting. He does point out that it doesn't happen with get_object_vars, though, as that doesn't do the casting, just extraction.

0 comments voice your opinion now!
class property special character private protected casting

Link: http://cweiske.de/tagebuch/php-property-started-nul.htm

Gareth Heyes:
PHP nonalpha tutorial
August 22, 2012 @ 08:53:02

Gareth Heyes has another post to his site on the topic of "non-alpha PHP code", this time getting a bit more into the process and how his examples are parsed by PHP into more familiar functionality.

My first post on PHP non-alpha numeric code was a bit brief, in the excitement of the discovery I failed to detail in depth the process. I've decided to follow up with a tutorial and hopefully explain the process better for anyone wanting to learn or improve the technique. The basis of PHP non-alphanumeric code is to take advantage of the fact that PHP automatically converts Arrays into a string "Array" when using in a string context.

He includes some basic examples showing how, with just a combination of things like "+", "_" and "[" or "]" you can reproduce similar output to echoing out an array and use that "Array" output string to get to other strings (like the letter "B"). There's also a more lengthy example showing how to build up the string "print 1+1" and have it execute using this technique.

0 comments voice your opinion now!
interpretation nonalpha tutorial special character


Refulz.com:
Special characters in Regular Expressions - Part 1
June 12, 2012 @ 08:39:11

On the Refulz.com site they've posted the first part of a series about the basics of using special characters regular expressions (both in PHP and outside of it).

With this post, we continue to explore the Regular expressions. The first post of the Learning Regular Expression series introduced Regular Expressions. The first post covers the regular expression delimiters and the "i" pattern modifier. In the language of regular expression, there is a special meaning of certain characters.

In this article they show the use of characters like the caret, asterisk, dot and dollar symbol to modify your expressions to handle special cases, matching for more than one character and the start and end of strings.

0 comments voice your opinion now!
regularexpression tutorial introduction special character


Alan Skorkin's Blog:
How To Fix The WP-Syntax Special Character Escaping Issue
March 11, 2010 @ 09:15:21

Alan Skorkin has a recent post to his blog about a trouble that many WordPress users have come across in working with their content and the WP-Syntax plugin (for displaying code) - a special character escaping bug that escapes characters that don't need it.

Suffice to say, [WP-Syntax] does the job fine except for one very annoying issue. Whenever you have any kind of special characters in your code (which you inevitably do e.g. <, >, & etc.), these always render as their escaped representations.

It only happens with the WYSIWYG editor for writing content (which the tool's FAQ recommends turning off) but there's a better solution that Alan found - change a line of code in the plugin to use the htmlspecialchars_decode function to rid your install of this pesky escaping bug.

0 comments voice your opinion now!
wpsyntax wordpress special character escape


PHPBuilder.com:
The ABC's of PHP Part 5 - Strings & Text
April 16, 2009 @ 09:31:25

PHPBuilder.com has the latest in their series looking at beginner level PHP and some of the core concepts that go with it ("The ABC's of PHP"). This latest tutorial looks at string and text handling.

In the last part of this series we looked at what a variable was in general. Today we'll be covering strings and text. We'll look at the contents those variables would typically hold.

Topics include the differences between single and double quotes, appending to a string and special characters (like line feeds and tabs). Code snippets are provided for each to help you visualize what they mean.

0 comments voice your opinion now!
beginner introduction string text quote special character tutorial


Ibuildings Blog:
Dutch phpGG Frontend Special Win a ticket!
January 21, 2009 @ 08:41:58

Wanting to attend the phpGG group's "Frontend Special" event next Saturday (the 24th)? Want a free ticket to join in the fun? According to this new post on the Ibuildings blog, you could win one!

Next saturday (24th of January 2008) the Dutch PHP usergroup (phpGG) will host an all day frontend event in The Hague (Den Haag). [...] And if you're not interested in learning more about Frontend development or if you're not up for having a good time with like minded developers, I'd stay away... Otherwise I'd suggest checking out the special PHPGG page for more details and if you reply to this post before Thursday night, 23:58 (UTC+1) you can win a FREE ticket donated by the phpGG (there will be a raffle).

Be sure you get your entry in by the end of Thursday (the 22nd) night to be entered to win the free pass. You can find out more about the event on the phpGG homepage or here.

0 comments voice your opinion now!
phpgg frontend special event hague free ticket


Community News:
phpGG Frontend Special
January 07, 2009 @ 15:03:16

The Dutch PHP Usergroup (phpGG) is having a special event at the end of January (on the 24th) - something they're calling the "phpGG Frontend Special".

Here's more from Stefan Koopmanschap's blog entry on the event:

I am quite excited about us organizing this event. This is our first step towards a full-blown conference, and I am proud of the speaker schedule we're putting together. We have speakers from Microsoft and Adobe who will go into their respective frontend and RIA technologies, Boy Baukema - the javascript expert at Ibuildings - will be talking about Javascript, and Robert Jan Verkade will give a take on HTML and CSS technologies. More on the content of the different presentations will follow as well as the actual schedule.

The event is free for active/paying phpGG members and will be 15 Euro for everyone else (for a pre-sale price, after that it's bumped up to 25 Euro). Along with the admission, this also gives you a one year membership in the phpGG.

More information on the event can be found on the phpGG group's website.

0 comments voice your opinion now!
phpgg usergroup frontend special event


php|architect:
Stuff your stockings single issues 30% off
December 21, 2007 @ 13:47:00

The mystery has been relealed - the php|architect folks have posted about their secret today - a discount on single issues of 30%.

Seasons greetings everyone! The first of two surprises from us today is a great opportunity to combine our recent drop of all DRM protection on our PDFs with an awesome 30% discount on our single-issue prices to stock up on all your favourite past issues of php|architect.

This means that single issues are priced at (about) $3.49 CAD for a few days - all you need to do is pick your favorites from their archive, even their most recent issue.

0 comments voice your opinion now!
special offer discount issue single phparchitect purchase thirty percent special offer discount issue single phparchitect purchase thirty percent


Hasin Hayder's Blog:
Did you know 'you can have cheese burger' could be a variable name?
October 24, 2007 @ 08:57:00

Hasin Hayder has a quick tip for users of SimpleXML - a handy way to access a node in an XML document that has unsupported characters in its name.

I was finding a way to refer that element as a SimpleXMLElement and found a nifty note in PHP Manual. It says if you have unsupported (unsupported in PHP Lexicon for a variable name) characters inside the name of a node, you can access it using a special pattern {'name'}.

In his example, he shows how a popular phrase ("i can have cheese burger") can be used as the variable name despite having spaces in it.

0 comments voice your opinion now!
variable name unsupported character special pattern variable name unsupported character special pattern



Community Events





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


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

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