|
Posted by Toby A Inkster on 04/18/07 07:21
tasteless wrote:
> I need really hard questions (about 10) about PHP programming (some of
> elements OOP as well, but no MySQL questions - this is different part),
> this questions needs to be very hard, but the experienced senior PHP
> developer should answered on it.
Question 1:
<?php
$i = 5;
$i = 5 + $i++;
echo $i; // What does this print?
?>
Question 2:
Which of the following is wrong? (There may be more than one
which are wrong.)
* in_array($needle, $haystack);
* stristr($needle, $haystack);
* strpos($needle, $haystack);
* preg_match($needle, $haystack);
Question 3:
Describe the output of this code:
<?php
function print_defined_vars ()
{
print_r(get_defined_vars());
}
$a = 1;
$b = 2;
print_defined_vars();
?>
--
Toby A Inkster BSc (Hons) ARCS
http://tobyinkster.co.uk/
Geek of ~ HTML/SQL/Perl/PHP/Python*/Apache/Linux
* = I'm getting there!
Navigation:
[Reply to this message]
|