Links

Interview Questions - PHP Programming Questions


<?php
$x = 'Sunil';
echo ‘Hello $x’;

?>

a. hello sunil
b. Parse error
c. hello $x

<?php
$x = 3;
switch ($x) {
case 2: echo 'line 1'; break;
case 3:
case 4: echo 'line 2'; break;
default: echo 'line 3';
}

The answer is 0 (Zero)

Important note

Everyone expected answer would be 4.But answer is zero.How it happened
only in php ?

<?php
$file_rimg = fopen("http://w3answers /image23.jpg",'rb');
$newfile_name_img = "/tmp/tutorial.file";

Yes it is

Using header("Expires: Mon, 26 Jul 2007 05:00:00 GMT");

<?php