Test your PHP skills
Posted on: December 6, 2008
- In: PHP | Programming | zend
- 13 Comments
Are you working wih PHP MySQL? If your answer is yes, then you may have a look this free online test. This is an evaluation test for ZCE certification. You will find 8 questions there. Let me discuss on those questions a bit. Zillions of thanks to http://www.zend.com to organize this test:)
FYI I would like to suggest you not to read the rest of this post before completion of your test at : http://www.zend.com/store/education/certification/self-test.php?begin=1
Be back and read the rest of this post to check the correct answers. Good Luck!! Okay, Let’s start the test now!!
Q-1: How can precisely one byte be read from a file, pointed by $fp?
| A) | fseek($fp, 1) |
| B) | fgets($fp, 1) |
| C) | fgetss($fp, 1) |
| D) | fgetc($fp) |
| E) | All of the above |
The right answer is: D
Q-2: What object method specifies post-deserialization behavior for an object?
| A) | __sleep() |
| B) | __wakeup() |
| C) | __set_state() |
| D) | __get() |
| E) | __autoload() |
Right answer: B
Q-3: Where does the session extension store the session data by default?
| A) | SQLite Database |
| B) | MySQL Database |
| C) | Shared Memory |
| D) | File System |
| E) | Session Server |
The right answer is: D
Q-4: Which of the following data types cannot be directly manipulated by the client?
| A) | Cookie Data |
| B) | Session Data |
| C) | Remote IP Address |
| D) | User Agent |
Right answer: B
Q-5: What is the difference between isset() and other is_*() functions (is_alpha(), is_number(), etc.)?
| A) | isset() is a function call and is_*() are not function calls |
| B) | is_*() are language constructs and isset() is not a language construct |
| C) | isset() is a language construct and is_*() are not language constructs |
| D) | is_*() return a value whereas isset() does not |
Right answer: C
Q-6: What will be the value of $b after running the following code?
<?php
$a = array(‘c’, ‘b’, ‘a’);
$b = (array) $a;
| A) | TRUE |
| B) | array(‘c’, ‘b’, ‘a’) |
| C) | array(array(‘c’, ‘b’, ‘a’)) |
| D) | None of the above |
Right answer: B
Q-7: Which of the following function signatures is correct if you want to have classes automatically loaded?
| A) | function autoload($class_name) |
| B) | function __autoload($class_name, $file) |
| C) | function __autoload($class_name) |
| D) | function _autoload($class_name) |
| E) | function autoload($class_name, $file) |
Right answer: C
Q-8: What is the best way to run PHP 4 and PHP 5 side-by-side on the same Apache server?
| A) | Run one as an Apache module, the other as a CGI binary. |
| B) | Run both as a CGI binary. |
| C) | Just use .php4 for PHP 4, and .php for PHP 5. |
| D) | Use .php for both but use different document roots. |
Right answer: A
13 Responses to "Test your PHP skills"
selective and critical ( for me) question. thanks for sharing with us. special thanks for giving actual answer if u didn’t do it we might be faced with Google.
Шрифт трудновато читается у вас на блоге
По-больше бы таких статей.
Отличная статья, спасибо!
Думаю я у другого автора уже читал про данную тему
Кажысь я у другого автора уже читал про данную тему
your teaching skill is nice
I pray to the Allah for your success and go on.
HI bhaia!
I am xeina,studying CSE,1st year.I am really into these php mysql things,and I really wanna learn these stuff.I spend almost 12-13 hrs on my pc,trying to figure out the php .The only problem is,amar dharer kache 1000 mile er moddhe o kono gyani manush nai,je amake help korte parbe.So I was really frustrated,But janina kemne I found you today!
Thanks god!
Please bhaia,can you guide me through these stuff?Apnar ki kono training center ache?Ami apnar kache shikhte chai.
Please be my guide and I will be ever grateful to you.
Xeina.


December 6, 2008 at 3:05 pm
It’s nice to learn something from you. This will help to build up my knowledge. Keep it up I am waiting for the next one.
Thanks