Q.
What will be the output of the following PHP code?
<?php
class Constants
{
define('MIN_VALUE', '0.0');
define('MAX_VALUE', '1.0');
public static function getMinValue()
{
return self::MIN_VALUE;
}
public static function getMaxValue()
{
return self::MAX_VALUE;
}
}
echo Constants::getMinValue();
echo Constants::getMaxValue();
?> Similar Questions
1.
What will be the output of the following PHP code?
<?php
echo "Hello world </br> I am learning PHP";
?> 2.
What will be the output of the following PHP code?
<?php
echo "Hello world <strong>I am learning PHP</strong>"
?> 3.
What will be the output of the following PHP code?
<?php
echo "This", "was", "a", "bad", "idea";
?> 4.
What will be the output of the following PHP code?
<?php
echo "This"."was"."a"."bad"."idea";
?> 5.
What will be the output of the following PHP code?
<?php
echo "This","was"|"a","bad"."idea";
?> 6.
What will be the output of the following PHP code?
<?php
$one = "Hello";
$two = "World";
echo $one, $two;
?> 7.
What will be the output of the following PHP code?
<?php
$one = "Hello";
$two = "World";
echo "$one$two";
?> 8.
What will be the output of the following PHP code?
<?php
$one = "Hello";
$two = "World";
echo "$one"+"$two";
?> 9.
What will be the output of the following PHP code?
<?php
echo "This is <i>India</i>";
?> 10.
What will be the output of the following PHP code?
<?php
$cars = array("Volvo", "BMW", "Toyota");
echo "My car is a {$cars[0]}";
?>
PHP TOPICS