Phalcon is a PHP web framework that was released in 2012. It is based on the model–view–controller (MVC) pattern. Phalcon framework is an open-source framework and is licensed under the terms of the BSD License.
Phalcon Framework MCQs: This section contains multiple-choice questions and answers on the various topics of Phalcon Framework. Practice these MCQs to test and enhance your skills on Phalcon Framework.
List of Phalcon Framework MCQs
1. Phalcon is a ____ framework?
- Java
- C++
- PHP
- Python
- JavaScript
Answer: C) PHP
Explanation:
Phalcon is a PHP framework.
2. Is Phalcon a full-stack open-source framework?
- Yes
- No
Answer: A) Yes
Explanation:
Yes, Phalcon is a full-stack open-source framework.
3. Controller class names must have the suffix “____”?
- Control
- Controller
- Con
- Cont
Answer: B) Controller
Explanation:
Controller class names must have the suffix “controller”.
4. Does Phalcon support both relational and non-relational databases?
- Yes
- No
Answer: A) Yes
Explanation:
Yes, Phalcon supports both relational and non-relational databases.
5. Phalcon’s ORM is written entirely in ____?
- C
- C++
- Python
- Java
Answer: A) C
Explanation:
Phalcon’s ORM is written entirely in C.
6. The logic of the application is included in the ____ in MVC design?
- View
- Model
- Controller
Answer: B) Model
Explanation:
The logic of the application is included in the model in MVC design.
7. ____ are pieces of information that are shown to the end user?
- View
- Model
- Controller
Answer: A) View
Explanation:
Views are pieces of information that are shown to the end user.
8. Views in Phalcon are classified into how many types?
- 4
- 5
- 2
- 3
Answer: C) 2
Explanation:
Views in Phalcon are classified into two types −
- Volt
- phtml
9. Volt template is written in ____ language?
- Java
- Python
- C++
- C
Answer: D) C
Explanation:
The volt template is written in C language.
10. Volt is compiled to pure ____ code?
- C
- PHP
- C++
- Java
Answer: B) PHP
Explanation:
Volt is compiled into pure PHP code.
11. Phalcon views support ____ rendering?
- Hierarchical
- Default
- Linked
- All of the above
Answer: A) Hierarchical
Explanation:
Phalcon views support hierarchical rendering.
12. When the template engine is PHP, the extension. ____ is utilized?
- Volt
- .phtml
- Html
Answer: B) .phtml
Explanation:
When the template engine is PHP, the extension .phtml is utilized.
13. ____ cannot be used as a stand-alone component?
- Volt
- Html
- .phtml
Answer: C) .phtml
Explanation:
.phtml cannot be used as a stand-alone component.
14. Volt can be used as a stand-alone component? Yes or No
- Yes
- No
Answer: A) Yes
Explanation:
Yes, volt can be used as a stand-alone component.
15. Every web application router has how many modes?
- 5
- 4
- 2
- 3
Answer: C) 2
Explanation:
Every router in the web application has two modes:
- MVC mode
- Match-only mode
16. The ____ mode is best suited to dealing with MVC applications?
- MVC mode
- Match-only mode
Answer: A) MVC mode
Explanation:
The first mode is best suited to dealing with MVC applications.
17. ____ is a sort of code generation in which we direct it to a web application database, resulting in the creation of a simple CRUD (Create, Read, Update, Delete) application.
- Framing
- Constructor
- Scaffolding
- Bootstrap
Answer: C) Scaffolding
Explanation:
Scaffolding is a sort of code generation in which we direct it to a web application database, resulting in the creation of a simple CRUD (Create, Read, Update, Delete) application.
18. PHQL (Phalcon Query Language), sometimes known as ____?
- PhalconSQL
- PhalconQL
- PhalconSQLite
Answer: C) PhalconSQLite
Explanation:
PHQL (Phalcon Query Language), sometimes known as PhalconQL.
19. Tables are handled as ____ in the Phalcon query language?
- Models
- Attributes
- Class
- Frames
Answer: A) Models
Explanation:
Tables are handled as models in the Phalcon query language.
20. In the Phalcon query language columns are treated as ____?
- Frames attributes
- Query attributes
- class attributes
- Framing
Answer: C) class attributes
Explanation:
In the Phalcon query language and columns are treated as class attributes.
21. ____ aids in the movement of data across the various storage formats.
- Shifting
- Data Assets
- Data attributes
- Database migration
Answer: D) Database migration
Explanation:
Database migration aids in the movement of data across various storage formats.
22. Cookies are also known as ____.
- Search pies
- Browsers pies
- Browsers cookies
- Browsers Session
Answer: C) Browsers cookies
Explanation:
Cookies are also known as browser cookies.
23. How many types of cookies are there?
- 2
- 3
- 4
- 5
Answer: A) 2
Explanation:
There are two types of cookies:
- Session cookies
- Persistent cookies
24. Which of the following types of cookies remain on the browser and save the information until the browser is closed?
- Session cookies
- Persistent cookies
Answer: A) Session cookies
Explanation:
Session cookies remain on the browser and save the information until the browser is closed.
25. Which of the following cookies has a set lifespan and remains in the browser throughout that time?
- Session cookies
- Persistent cookies
Answer: B) Persistent cookies
Explanation:
Persistent cookies have a set lifespan and remain in the browser throughout that time.
26. ____ are server-side data storage that facilitates user interaction with a website or online application?
- Cookies
- Data
- Session
Answer: C) Session
Explanation:
Sessions are server-side data storage that facilitates user interaction with a website or online application.
27. Phalcon is based upon which of the following architecture?
- MVVM
- MVC
- Layered architecture
- Client-server architecture
Answer: B) MVC
Explanation:
Phalcon is based on MVC architecture.
28. What is ODM?
- Object data model
- Oriented data model
- Object document model
- Oriented data model
Answer: C) Object document model
Explanation:
ODM stands for object document model.
29. What is CSRF?
- Cross-system response forgery
- Cross-security request forgery
- Combine security response forgery
- Combine secure request forgery
Answer: B) Cross-security request forgery
Explanation:
CSRF stands for Cross security request forgery.
30. ____ is an attack that compels authorized web application users to undertake undesirable activities?
- CSRF
- Hashing
- Session loss
- Cookie damage
Answer: A) CSRF
Explanation:
CSRF is an attack that compels authorized web application users to undertake undesirable activities.
31. A ____ is a component in Phalcon that is in charge of loading classes and files depending on their namespaces or prefixes.
- Injector
- Launcher
- Per-loader
- Loader
Answer: D) Loader
Explanation:
A loader is a component in Phalcon that is in charge of loading classes and files depending on their namespaces or prefixes.
32. The ____ class provides access to the Phalcon loader?
- Phalcon/Loader
- PhalconLoad
- Phalcon/pre-Loader
Answer: A) Phalcon/Loader
Explanation:
The Phalcon/Loader class provides access to the Phalcon loader.
33. The autoloader is registered with the PHP SPL autoloader using which of the following method?
- Create()
- Linked()
- Register()
- Loaded()
Answer: C) Register()
Explanation:
The autoloader is registered with the PHP SPL autoloader using the register() method.
34. ____ is a portable, tiny platform for app development and deployment.
- Nanobox
- Framebox
- Nanocontainer
Answer: A) Nanobox
Explanation:
Nanobox is a portable, tiny platform for app development and deployment.
35. ____ is an object-oriented array?
- Phalcon\Array
- Phalcon\Collection
- Phalcon\Countables
- Phalcon\map
Answer: B) Phalcon\Collection
Explanation:
Phalcon\Collection is an object-oriented array.