Safcode | Code Your Ideas by Sir Safder
+923132835245
safcodeinstitute@gmail.com
Online Quiz
10000+ Questions!
Students Works
Ideas & Topics!
Live Coding
HTML & CSS
Home
(current)
About
Courses
CIT
Web Designing
Office Automation
Graphics Designing
Web Development
Software Development
Digital Marketing
App Development
Amazon Virtual Assistant
YouTube Earning
Tutorials
Softwares
Programming Notes
Contact
Test Your Programming Skills with Safcode!
Here is all important interview / exams questions.
Student doing practice apptitude test on safcode platform.
Instruction: "Total Number of Questions: 20
Each question carry 10 mark , no negative marking"
Quiz Start
1. What does PHP stand for?
Hypeetext pre-processor
Php pre processor
Personal Home Page
Private Home Page
View Answer
2. In Key value pairs, the value should contain validating keywords separated by the _______ symbol.
*
#
$
|
View Answer
3. Laravel uses the ________ design pattern.
CakePHP
Model-View-Controller
Wordpress
None of These
View Answer
4. 'd' later? $a = array( 'a', 3 => 'b', 1 => 'c', 'd' );
$a[4]
$a[2]
$a[1]
$a[3]
View Answer
5. In which variable is the users IP address stored?
$_ENV
$REMOTE_ADDR
$DOMAIN
$GLOBALS
View Answer
6. The Update operation is similar to the ______ operation.
Create
Update
Edit
None of Them
View Answer
7. What is the difference between echo and print?
Print is a function where as echo is not.
Echo can take multiple parameters where as print cannot
Print can take multiple parameters where as echo cannot
They both behave the same.
View Answer
8. Which of the following enables the user to add elements to the project that follow the Laravel convention?
Composer
Artisan Tool
Laravel Components
Convention
View Answer
9. How do I create PHP arrays in a HTML
?
< input MyArray[] />
< input name= MyArray[]/>
" required /> < input ="MyArray[]" />
" required /> < input name="MyArray[]" />
View Answer
10. What is the purpose of $_SESSION[]?
Used to register a global variable
Used to initialize a session.
none of the above
Used to store variables of the current session
View Answer
11. The main reason to use the query builder over writing SQL code manually is because _________.
It uses configuration mode for migration
It uses configuration mode for migration
It has few SQLite directives
It is rich in features
View Answer
12. _________ automatically assign routes to all functions that have been declared in the Resource.
Resource Routing
Yield
Requests
All of Them
View Answer
13. _________ help in organizing codes by grouping requests that handle the codes in a single route and class.
Application
Controllers
Views
Models
View Answer
14. What gets printed?
37
33
38
32
View Answer
15. Which of the following is the way to create comments in PHP?
/* commented code here */
// commented code to end of line
# commented code to end of line
all of the above
View Answer
16. What will be the value of $var?
0.5
0.2
0
1
View Answer
17. ____________ function in PHP Returns a list of response headers sent (or ready to send)
header()
headers_list()
header_sent()
Header_send()
View Answer
18. Which function is used to Strip whitespace (or other characters) from the beginning and end of a string?
trim_str
trim
strip_str
strip
View Answer
19. Which of the following is used to declare a constant?
const
constant
define
#pragma
View Answer
20. Functions that are defined in the model and that replace along chain with a simple one are called _____.
Model Events
Event Listener
None of Them
Eloquent ORM
View Answer