PHP Flashcards
(7 cards)
1
Q
What is PHP?
A
PHP is a server-side scripting language used in web development. It is embedded in HTML and is used to create dynamic web pages, interact with databases, etc.
2
Q
What did PHP stand for? And What does it stand for today?
A
PHP orignally stood for Personal Home Page
now its stands for Hypertext Preprocessor.
3
Q
Who was the founder of PHP?
A
Rasmus Lerdorf
4
Q
Why should we use/learn PHP? Or what are the advantages of PHP?
A
- PHP is open source and free
- It is easy to learn and use
- It compatible with every os including windows, linux, and mac-os
- It has large community
- It supports a large amount of databases
- It has large ecosystem of framewords, CMS plarforsm and extensive liraries
5
Q
What are the disadvantages of PHP?
A
- It is less secure than other sever-side solutions, as it has been historically vulnerable to SQL injection
- It not suitable for large aplications unless used with a framework like laravel
- It is slower than other server-side solutions like node js, go, etc.
- It has poor error handling
6
Q
How do you create and access elements in a multi-dimensional array in PHP?
A
The same as in JS
7
Q
How do you create a key/value pair/associateve array in PHP?
A
$associativ_array_name = array(
“key” => value,
“key2” => value
);