Doubtly
@Doubtly · Joined Feb 2021
- Answers
- 3,792
- Questions
- 4,963
- Upvotes received
- 429
- The sum of the two numbers is 25 and the difference between them is 15. Find the two numbers. Let's solve the problem step by step: Let the two numbers be 'x' and 'y'. Given information: The sum of the two numbers is 25: x + y = 25. T... 1
- The sum of two numbers is 40 and the greater number is thrice the smaller number. Find the numbers. Let's solve the problem step by step: Let the smaller number be 'x' and the greater number be 'y'. Given information: The sum of two numbers... 1
- Suresh scored 15 marks more than Ramesh in Mathematics. If the sum of their marks in Mathematics is 275, Let the marks obtained by Ramesh in Mathematics be 'R' and the marks obtained by Suresh be 'S'. Given information: Suresh scored 15 marks mo... 1
- What is the main difference between require() and require_once()? require(), and require_once() perform the same task except that the second function checks if the PHP script is already included or not befo... 1
- How failures in execution are handled with include() and require() functions? If the function require() cannot access the file then it ends with a fatal error. However, the include() function gives a warning, and the P... 1
- What are the functions to be used to get the image’s properties (size, width, and height)? The functions are getimagesize() for size, imagesx() for width and imagesy() for height. 1
- What is the use of the function ‘imagetypes()’? imagetypes() gives the image format and types supported by the current version of GD-PHP. 1
- What is needed to be able to use image function? GD library is needed to execute image functions. 2
- How can PHP and Javascript interact? PHP and Javascript cannot directly interact since PHP is a server side language and Javascript is a client-side language. However, we can ex... 1
- What type of operation is needed when passing values through a form or an URL? If we would like to pass values through a form or an URL, then we need to encode and to decode them using htmlspecialchars() and urlencode()... 1
- How can PHP and HTML interact? It is possible to generate HTML through PHP scripts, and it is possible to pass pieces of information from HTML to PHP. 1
- How is the comparison of objects done in PHP? We use the operator ‘==’ to test is two objects are instanced from the same class and have same attributes and equal values. We can test if... 1
- What is the meaning of a final class and a final method? ‘final’ is introduced in PHP5. Final class means that this class cannot be extended and a final method cannot be overridden. 1
- Is multiple inheritance supported in PHP? PHP supports only single inheritance; it means that a class can be extended from only one single class using the keyword ‘extended’. 1
- What is the main difference between PHP 4 and PHP 5? PHP 5 presents many additional OOP (Object Oriented Programming) features. 1
- How can we display the output directly to the browser? To be able to display the output directly to the browser, we have to use the special tags <?= and ?>. 1
- What is the correct and the most two common way to start and finish a PHP block of code? The two most common ways to start and finish a PHP script are: <?php [ --- PHP code---- ] ?> and <? [--- PHP code ---] ?> 1
- How to run the interactive PHP shell from the command line interface? Just use the PHP CLI program with the option -a as follows: php -a 1