Sample Questions Pack
One really important step in preparing for this exam is to get an idea of what kind of questions you might be asked - in terms of the format of the questions and the topics. I have a pack of 70 questions which I use when delivering ZCE preparation courses, but I also sell it separately and it is now updated for PHP 5.5
This pack is now available from https://leanpub.com/zce
As well as questions, this includes answers with detailed explanations of how those are reached and links to further reading. There is also some advice about the format of the exam and what to expect on the day itself.
The PHP Manual is fabulous, but sometimes you need a more conceptual explanation. I maintain a bundle of links to blog posts or other tutorials on the various topics involved in ZCE, which you may find helpful to dip into for your own study:
If you find any broken links, or have any resources you think should be included, just let me know. I intend for this to be a living document that we can share.
My advice for cramming for ZCE is always the same: you need to recap all areas of the manual but focus especially on strings and arrays, because while there will be an average number of questions on these topics, it's common to see strings and arrays used in questions that are really about function scope, or inheritance, etc.
For my own revision, I created flashcards by taking the PHP manual and making them into double-sided PDFs that I could cut up and use (you could do this with a single-sided printer, print the odd pages first and then put the paper through again - for duplex printers beware that you need to choose "short side").
Here are the String and Array flashcards that I used for myself (they're not perfect, but I found them useful so if you want to download them, you can. The main omission is that I stripped < and > characters which makes for interesting string comparison documentation).
Hopefully some of these resources will help you prepare for your own professional certification - good luck :)
In fact, you've been able to pass this as an array since PHP 5.2.10, so to set multiple headers in the stream context, I just used this:
<?php $options = ["http" => [ "method" => "POST", "header" => ["Authorization: token " . $access_token, "Content-Type: application/json"], "content" => $data ]]; $context = stream_context_create($options);
$access_token had been set elsewhere (in fact I usually put credentials in a separate file and exclude it from source control in an effort not to spread my access credentials further than I mean to!), and
$data is already encoded as JSON. For completeness, you can make the POST request like this:
On a related note, I'm also doing a Sitepoint "Talk with the Experts" session on 11th April (early morning UK time, as a special treat for everyone in Europe and further east, that doesn't happen often!). There are more details here: http://www.sitepoint.com/forums/showthread.php?1012242-Talk-Object-oriented-PHP-with-the-Experts and I hope you can join me then.
It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier.
These have been warnings in earlier versions of PHP, but as of PHP 5.4, the
date.timezone ini setting must be set correctly, using the continent and place - for me that's "Europe/London", like this:
date.timezone = "Europe/London"
If you see these errors, don't panic, just add the line above to your php.ini.
The title is a bit of a red herring as PHP has more than 9 magic methods, but these will get you off to a good start using PHP's magic methods. It might be magic, but no wands are required!
This post follows an earlier entry introducing the basics OOP and what that looks like in PHP. This time around we'll look at some more advanced concepts and some more practical examples of building code, covering use of constructors and how to add access modifiers in to control how calling code can operate on your objects. We'll also show off how to create static methods and properties and, perhaps more importantly, illustrate applications of these features.
Basically, we need to get some great submissions, so that when we come to choose the schedule (and it is only one track, one day, there's only a few slots available), we can put together something really fitting to showcase PHP for a wider audience than a PHP conference. Selection will be done on the basis of talk topic, abstract and length in the first instance - we'll only take into account the actual speakers when we're curating the final list.
Key things you need to know:
- link to call for papers form (google forms)
- Event is 2nd (and 3rd, but the PHP room is on the 2nd) of February 2013, at ULB campus Solbosh in Brussels, Belgium
- No expenses will be covered by the event
- There's also a Call for Stands if you have a project that you would like to represent there
- If you're not speaking, come and join us anyway!
Since the introduction of PHP 5 in 2004, PHP has had an object model worthy of that description and became a truly modern language for use on the web. Earlier PHP scripts would have been of the kind where, to quote from Alice's Adventures, you would "Begin at the beginning, and go on till you come to the end: then stop." Nowadays that very procedural approach is less common in PHP, so this article takes a look at some of the basic object oriented features available in the language and shows some examples of using them with code examples.