1. Question: What will be the output of the following PHP code? <?php function fn(&$var) { $var = $var - ($var/l0*5); return $var; ) echo fn(100); ?>

    A
    100

    B
    50

    C
    500

    D
    Error message

    Note: Not available
    1. Report
  2. Question: What will be the output of the following PHP code? <?php echo 30 * 5.7 ?>

    A
    150.7

    B
    1507

    C
    error will occur

    D
    171

    Note: Not available
    1. Report
  3. Question: The setrawcookie() method of setting cookies is different from PHP standard method of cookie setting as:

    A
    It does not allow expiry time to be set

    B
    It does not allow expiry time to be set

    C
    It does not URL-ENCODE the value on its own

    D
    It does not allow domain setting

    Note: Not available
    1. Report
  4. Question: You need to keep an eye on the existing number of objects of a given class without introducing a non-class variable. which of the following makes this happen?

    A
    Add a member variable that gets incremented in the default constructor and decremented the destructor.

    B
    Add a local variable that gets incremented in each constructor and decremented in the destructor

    C
    Add a static member variable that gets incremented in each constructor and decremented in the destructor

    D
    This cannot be accomplished since the creation of objects is being done dynamically via “new”

    Note: Not available
    1. Report
  5. Question: Which of the following variable declaration within a class is invalid in PHP5?

    A
    private $type = "moderate";

    B
    var $term = 3;

    C
    public $amn = "500";

    D
    protected $name = ‘Quantes Private Limited’;

    Note: Not available
    1. Report
  6. Question: What is the output of the following code?
    $a = 3;
    
    $b = 2;
    
    echo (int)$a/(int)$b;

    A
    1

    B
    1.5

    C
    2

    D
    3

    E
    Error

    Note: Not available
    1. Report
  7. Question: Which one is correct?

    A
    $s = fwrite ("a string here");

    B
    $s = fwrite ($fp,"a string here");

    C
    $s = fwrite ("a string here",$fp);

    D
    None

    Note: Not available
    1. Report
  8. Question: Default value of register global in PHP is

    A
    Off

    B
    No

    Note: Not available
    1. Report
  9. Question: If you want to pass a value to a function by reference, the correct way is:

    A
    function ModifyReport(&$Rptfile){}

    B
    function ModifyReport($Rptfile){}

    C
    function ModifyReport(ByRef $Rptfile){}

    D
    function ModifyReport(&Rptfile){}

    Note: Not available
    1. Report
  10. Question: You have two strings, which you want to concatenate
    $str1 = 'Have a';
    $str2 = 'Nice Day';
    The fastest way would be

    A
    $str1.Concat($str2);

    B
    $str1.$str2;

    C
    "$str1$str2";

    D
    None

    Note: Not available
    1. Report
Copyright © 2024. Powered by Intellect Software Ltd