SlideShare a Scribd company logo
PHP Quiz
Tuesday 13th
of March 2013 @AFUP_Toulouse
thomas@gasc.fr @methylbro
1. What is the output of the following
code?
$a = 1;
++$a;
$a *= $a;
echo $a--;
a. 4
b. 3
c. 5
d. 0
2. Which of the following will
generate an E_NOTICE error
assuming the following code?
<?php
$array = array(
array(
1, 2
),
'a' => array(
'b' => 1,
'c'
)
);
a. $array[] = 1;
b. echo $array[5][2];
c. echo $array[5][2] = 2;
d. isset($array[7][3][1]);
3. Which of the following error types
cannot be caught by setting up a
custom error handler?
a. E_WARNING
b. E_ERROR
c. E_USER_ERROR
d. E_PARSE
e. E_NOTICE
4. When PHP is running on a
command line, what super-global
will contain the command line
arguments specified?
a. $_SERVER
b. $_ENV
c. $GLOBALS
d. $_POST
e. $_ARGV
Function world() is defined in the namespace myapputilshello. Your
code is in the namespace myapp.
5. What is the correct way to import
the hello namespace so you can use
the world() function?
a. use hello
b. use utilshello
c. use myapputilshello
d. use myapputilshelloworld
6. Which interface can be used to
allow an object to be executed in a
foreach loop?
a. ArrayObject
b. Iterator
c. ArrayList
d. Hashtable
7. What is the output of the following
script?
<?php
function fibonacci ($x1, $x2)
{
return $x1 + $x2;
}
$x1 = 0;
$x2 = 1;
for ($i = 0; $i<10; $i++) {
echo fibonacci(
$x1, $x2
).',';
}
a. 1,2,3,4,5,6,7,8,9
b. 1,2,3,4,5,6,7,8,9,10,
c. 1,2,3,5,8,13,21,34,55,89,
d. 1,1,1,1,1,1,1,1,1,1,
8. Which PHP functions may be used
to find out which PHP extensions are
available in the system? (Choose 2)
a. extension_loaded()
b. get_extension_funcs()
c. get_loaded_extensions()
d. phpinfo()
9. What is the name of the error level
constant that is used to designate
PHP code that will not work in future
versions?
E_???????
Your PHP script is repeatedly parsing 50KB of data
returned from a remote web service into browser-
readable HTML.
Users complain that the script takes a long time to run.
10. Wich of the following measures
usually leads to the best results? (Choose 2)
a. Install a bytecode cache
b. Install an SSD drive on the server
c. Cache the data returned by the web service
locally
d. Upgrade to the lastest version of PHP
11. What the following code
produce?
<?php
define('CONSTANT', 1);
define('_CONSTANT', 0);
define('EMPTY', '');
if (!empty(EMPTY)) {
if (!((bool) _CONSTANT)) {
print "One";
}
} elseif (constant('CONSTANT')==1)
{
print "Two":
}
a. One
b. Two
c. Syntax error
12. Which of the following functions
reads the entire contents of a file?
a. fgets()
b. file_get_contents()
c. fread()
d. readfile()
e. file()
Consider the following PHP script, which reads a file, line-by-line, from a text file.
13. Which function call should be inserted in place of
the question marks in order for the script to function
correctly?
<?php
$file = fopen("test", "r");
while(!feof($file)) {
echo ????????????;
}
fclose($file);
a. file_get_contents($file)
b. file($file)
c. read_file($file)
d. fgets($file)
e. fread($file)
14. Which of the following function
calls will cause a file pointer to be
returned to the beginning of the file?
a. reset()
b. fseek(-1)
c. fseek(0, SEEK_END)
d. fseek(0, SEEK_SET)
e. fseek(0, SEEK_CUR)
15. How will the following script be
displayed if called directly from a
browser?
<?php
header ("Content-type:
image/jpeg");
?>
<?php
readfile ("image.jpg");
?>
a. As a JPEG image
b. As a binary file for display within
the browser
c. As a binary file for download
d. As a JPEG file for download
e. As a broken image
16. Which of the following is not a
valid PHP file wrapper resource?
a. serverpathfilename
b. http://www.example.com/index.php
c. myfile.txt
d. compress.zlib://myfile.txt
e. They all are valid
17. Which of the following are valid
PHP stream transports? (Choose 2)
a. http
b. STDIO
c. ftp
d. STDOUT
e. stream
18. What does an opcode cache do?
a. It compiles scripts into binary objects to make them run
faster
b. It replaces the Zend Engine to provide a faster
interpreter
c. It caches a script’s output to improve its performance
d. It improves performance by caching the intermediate
code produced by the parser
e. It caches a script in memory, thus eliminating the need
for reloading it from disk at every iteration
19. Who can spell the name of the
Scope Resolution Operator?
_ _ _ M _ _ _ M _ _ _ _ _ _ _ _ _ _ M
www.afup.org
French Association of PHP Users
Join

More Related Content

What's hot

Lean Php Presentation
Lean Php PresentationLean Php Presentation
Lean Php Presentation
Alan Pinstein
 
Databases and MySQL
Databases and MySQLDatabases and MySQL
Databases and MySQL
Things Lab
 
Avaliação ad1 de php e mysql
Avaliação ad1 de php e mysqlAvaliação ad1 de php e mysql
Avaliação ad1 de php e mysql
Helder Ricardo Silva
 
Php Env Var
Php Env VarPhp Env Var
Php Env Var
arvind34
 
Php vulnerability presentation
Php vulnerability presentationPhp vulnerability presentation
Php vulnerability presentation
Sqa Enthusiast
 
MySQL Presentation
MySQL PresentationMySQL Presentation
MySQL Presentation
Manish Bothra
 
Writing php extensions in golang
Writing php extensions in golangWriting php extensions in golang
Writing php extensions in golang
do_aki
 
Ruby Projects and Libraries
Ruby Projects and LibrariesRuby Projects and Libraries
Ruby Projects and Libraries
Vorleak Chy
 
جلسه پنجم پایتون برای هکر های قانونی دوره مقدماتی پاییز ۹۲- ارائه ۲
جلسه پنجم پایتون برای هکر های قانونی دوره مقدماتی پاییز ۹۲- ارائه ۲جلسه پنجم پایتون برای هکر های قانونی دوره مقدماتی پاییز ۹۲- ارائه ۲
جلسه پنجم پایتون برای هکر های قانونی دوره مقدماتی پاییز ۹۲- ارائه ۲
Mohammad Reza Kamalifard
 
Beginners PHP Tutorial
Beginners PHP TutorialBeginners PHP Tutorial
Beginners PHP Tutorial
alexjones89
 
PHP Function
PHP Function PHP Function
PHP Function
Reber Novanta
 
PHP Tutorials
PHP TutorialsPHP Tutorials
PHP Tutorials
Yuriy Krapivko
 
Rest API using Flask & SqlAlchemy
Rest API using Flask & SqlAlchemyRest API using Flask & SqlAlchemy
Rest API using Flask & SqlAlchemy
Alessandro Cucci
 
A History of PHP
A History of PHPA History of PHP
A History of PHP
Xinchen Hui
 
PHP in one presentation
PHP in one presentationPHP in one presentation
PHP in one presentation
Milad Rahimi
 
Flask Basics
Flask BasicsFlask Basics
Flask Basics
Eueung Mulyana
 
PHP 7 Crash Course - php[world] 2015
PHP 7 Crash Course - php[world] 2015PHP 7 Crash Course - php[world] 2015
PHP 7 Crash Course - php[world] 2015
Colin O'Dell
 
Php.ppt
Php.pptPhp.ppt
PHP - History, Introduction, Summary, Extensions and Frameworks
PHP - History, Introduction, Summary, Extensions and FrameworksPHP - History, Introduction, Summary, Extensions and Frameworks
PHP - History, Introduction, Summary, Extensions and Frameworks
Royston Olivera
 
Отладка в GDB
Отладка в GDBОтладка в GDB
Отладка в GDB
Anthony Shoumikhin
 

What's hot (20)

Lean Php Presentation
Lean Php PresentationLean Php Presentation
Lean Php Presentation
 
Databases and MySQL
Databases and MySQLDatabases and MySQL
Databases and MySQL
 
Avaliação ad1 de php e mysql
Avaliação ad1 de php e mysqlAvaliação ad1 de php e mysql
Avaliação ad1 de php e mysql
 
Php Env Var
Php Env VarPhp Env Var
Php Env Var
 
Php vulnerability presentation
Php vulnerability presentationPhp vulnerability presentation
Php vulnerability presentation
 
MySQL Presentation
MySQL PresentationMySQL Presentation
MySQL Presentation
 
Writing php extensions in golang
Writing php extensions in golangWriting php extensions in golang
Writing php extensions in golang
 
Ruby Projects and Libraries
Ruby Projects and LibrariesRuby Projects and Libraries
Ruby Projects and Libraries
 
جلسه پنجم پایتون برای هکر های قانونی دوره مقدماتی پاییز ۹۲- ارائه ۲
جلسه پنجم پایتون برای هکر های قانونی دوره مقدماتی پاییز ۹۲- ارائه ۲جلسه پنجم پایتون برای هکر های قانونی دوره مقدماتی پاییز ۹۲- ارائه ۲
جلسه پنجم پایتون برای هکر های قانونی دوره مقدماتی پاییز ۹۲- ارائه ۲
 
Beginners PHP Tutorial
Beginners PHP TutorialBeginners PHP Tutorial
Beginners PHP Tutorial
 
PHP Function
PHP Function PHP Function
PHP Function
 
PHP Tutorials
PHP TutorialsPHP Tutorials
PHP Tutorials
 
Rest API using Flask & SqlAlchemy
Rest API using Flask & SqlAlchemyRest API using Flask & SqlAlchemy
Rest API using Flask & SqlAlchemy
 
A History of PHP
A History of PHPA History of PHP
A History of PHP
 
PHP in one presentation
PHP in one presentationPHP in one presentation
PHP in one presentation
 
Flask Basics
Flask BasicsFlask Basics
Flask Basics
 
PHP 7 Crash Course - php[world] 2015
PHP 7 Crash Course - php[world] 2015PHP 7 Crash Course - php[world] 2015
PHP 7 Crash Course - php[world] 2015
 
Php.ppt
Php.pptPhp.ppt
Php.ppt
 
PHP - History, Introduction, Summary, Extensions and Frameworks
PHP - History, Introduction, Summary, Extensions and FrameworksPHP - History, Introduction, Summary, Extensions and Frameworks
PHP - History, Introduction, Summary, Extensions and Frameworks
 
Отладка в GDB
Отладка в GDBОтладка в GDB
Отладка в GDB
 

Viewers also liked

Php code for online quiz
Php code for online quizPhp code for online quiz
Php code for online quiz
hnyb1002
 
Online quiz system
Online quiz systemOnline quiz system
Online quiz system
Satyaki Mitra
 
Online Quiz System Project PPT
Online Quiz System Project PPTOnline Quiz System Project PPT
Online Quiz System Project PPT
Shanthan Reddy
 
Online quiz by danish & sudhanshu techlites
Online quiz by danish & sudhanshu techlitesOnline quiz by danish & sudhanshu techlites
Online quiz by danish & sudhanshu techlites
Danish Anwar
 
Online examination system
Online examination systemOnline examination system
Online examination system
Aj Maurya
 
Online examination documentation
Online examination documentationOnline examination documentation
Online examination documentation
Wakimul Alam
 
Online examination system project ppt
Online examination system project pptOnline examination system project ppt
Online examination system project ppt
Mohit Gupta
 
Online Examination System Project report
Online Examination System Project report Online Examination System Project report
Online Examination System Project report
SARASWATENDRA SINGH
 
Practice exam php
Practice exam phpPractice exam php
Practice exam php
Yesenia Sánchez Sosa
 
PHP Technical Questions
PHP Technical QuestionsPHP Technical Questions
PHP Technical Questions
Pankaj Jha
 
Top 100 PHP Interview Questions and Answers
Top 100 PHP Interview Questions and AnswersTop 100 PHP Interview Questions and Answers
Top 100 PHP Interview Questions and Answers
Vineet Kumar Saini
 
14.project online eamination system
14.project online eamination system14.project online eamination system
14.project online eamination system
jbpatel7290
 
Online quiz
Online quizOnline quiz
Online quiz
Shashikant Vaishnav
 
quiz half ppt
quiz half pptquiz half ppt
quiz half ppt
mohit91
 
Online Quiz 2
Online Quiz 2Online Quiz 2
Online Quiz 2
Abhishek Mishra
 
Quiz managment system
Quiz managment systemQuiz managment system
Quiz managment system
tamourk2
 
online examination management system
online examination management systemonline examination management system
online examination management system
Praveen Patel
 
Android Beat the-quiz application
Android Beat the-quiz applicationAndroid Beat the-quiz application
Android Beat the-quiz application
Ayush Singh
 
Online examination system
Online examination systemOnline examination system
Online examination system
Mr. Vikram Singh Slathia
 
Examination Hall Allocation
Examination Hall Allocation Examination Hall Allocation
Examination Hall Allocation
Martina Thampan
 

Viewers also liked (20)

Php code for online quiz
Php code for online quizPhp code for online quiz
Php code for online quiz
 
Online quiz system
Online quiz systemOnline quiz system
Online quiz system
 
Online Quiz System Project PPT
Online Quiz System Project PPTOnline Quiz System Project PPT
Online Quiz System Project PPT
 
Online quiz by danish & sudhanshu techlites
Online quiz by danish & sudhanshu techlitesOnline quiz by danish & sudhanshu techlites
Online quiz by danish & sudhanshu techlites
 
Online examination system
Online examination systemOnline examination system
Online examination system
 
Online examination documentation
Online examination documentationOnline examination documentation
Online examination documentation
 
Online examination system project ppt
Online examination system project pptOnline examination system project ppt
Online examination system project ppt
 
Online Examination System Project report
Online Examination System Project report Online Examination System Project report
Online Examination System Project report
 
Practice exam php
Practice exam phpPractice exam php
Practice exam php
 
PHP Technical Questions
PHP Technical QuestionsPHP Technical Questions
PHP Technical Questions
 
Top 100 PHP Interview Questions and Answers
Top 100 PHP Interview Questions and AnswersTop 100 PHP Interview Questions and Answers
Top 100 PHP Interview Questions and Answers
 
14.project online eamination system
14.project online eamination system14.project online eamination system
14.project online eamination system
 
Online quiz
Online quizOnline quiz
Online quiz
 
quiz half ppt
quiz half pptquiz half ppt
quiz half ppt
 
Online Quiz 2
Online Quiz 2Online Quiz 2
Online Quiz 2
 
Quiz managment system
Quiz managment systemQuiz managment system
Quiz managment system
 
online examination management system
online examination management systemonline examination management system
online examination management system
 
Android Beat the-quiz application
Android Beat the-quiz applicationAndroid Beat the-quiz application
Android Beat the-quiz application
 
Online examination system
Online examination systemOnline examination system
Online examination system
 
Examination Hall Allocation
Examination Hall Allocation Examination Hall Allocation
Examination Hall Allocation
 

Similar to PHP Quiz

PHP Technical Question
PHP Technical QuestionPHP Technical Question
PHP Technical Question
Global Codester
 
Php5 certification mock exams
Php5 certification mock examsPhp5 certification mock exams
Php5 certification mock exams
echo liu
 
Web backdoors attacks, evasion, detection
Web backdoors   attacks, evasion, detectionWeb backdoors   attacks, evasion, detection
Web backdoors attacks, evasion, detection
n|u - The Open Security Community
 
Php interview questions
Php interview questionsPhp interview questions
Php interview questions
subash01
 
The why and how of moving to php 8
The why and how of moving to php 8The why and how of moving to php 8
The why and how of moving to php 8
Wim Godden
 
The why and how of moving to PHP 5.5/5.6
The why and how of moving to PHP 5.5/5.6The why and how of moving to PHP 5.5/5.6
The why and how of moving to PHP 5.5/5.6
Wim Godden
 
501 - PHP MYSQL.pdf
501 - PHP MYSQL.pdf501 - PHP MYSQL.pdf
501 - PHP MYSQL.pdf
AkashGohil10
 
PHP Session - Mcq ppt
PHP Session - Mcq ppt PHP Session - Mcq ppt
PHP Session - Mcq ppt
Shaheen Shaikh
 
Web Server and Web Technology Exam paper
Web Server and Web Technology Exam paperWeb Server and Web Technology Exam paper
Web Server and Web Technology Exam paper
Zairul Nizam
 
Php interview-questions and answers
Php interview-questions and answersPhp interview-questions and answers
Php interview-questions and answers
sheibansari
 
What To Expect From PHP7
What To Expect From PHP7What To Expect From PHP7
What To Expect From PHP7
Codemotion
 
Php questions and answers
Php questions and answersPhp questions and answers
Php questions and answers
Deepika joshi
 
Php Presentation
Php PresentationPhp Presentation
Php Presentation
Manish Bothra
 
Prepare for PHP Test Fest 2009
Prepare for PHP Test Fest 2009Prepare for PHP Test Fest 2009
Prepare for PHP Test Fest 2009
PHPBelgium
 
FNT Software Solutions Pvt Ltd Placement Papers - PHP Technologies
FNT Software Solutions Pvt Ltd Placement Papers - PHP TechnologiesFNT Software Solutions Pvt Ltd Placement Papers - PHP Technologies
FNT Software Solutions Pvt Ltd Placement Papers - PHP Technologies
fntsofttech
 
Is your code ready for PHP 7 ?
Is your code ready for PHP 7 ?Is your code ready for PHP 7 ?
Is your code ready for PHP 7 ?
Wim Godden
 
The why and how of moving to php 7
The why and how of moving to php 7The why and how of moving to php 7
The why and how of moving to php 7
Wim Godden
 
Lca05
Lca05Lca05
Starting with PHP and Web devepolment
Starting with PHP and Web devepolmentStarting with PHP and Web devepolment
Starting with PHP and Web devepolment
Rajib Ahmed
 
Exakat for PHP : smart code reviewing engine
Exakat for PHP : smart code reviewing engineExakat for PHP : smart code reviewing engine
Exakat for PHP : smart code reviewing engine
Damien Seguy
 

Similar to PHP Quiz (20)

PHP Technical Question
PHP Technical QuestionPHP Technical Question
PHP Technical Question
 
Php5 certification mock exams
Php5 certification mock examsPhp5 certification mock exams
Php5 certification mock exams
 
Web backdoors attacks, evasion, detection
Web backdoors   attacks, evasion, detectionWeb backdoors   attacks, evasion, detection
Web backdoors attacks, evasion, detection
 
Php interview questions
Php interview questionsPhp interview questions
Php interview questions
 
The why and how of moving to php 8
The why and how of moving to php 8The why and how of moving to php 8
The why and how of moving to php 8
 
The why and how of moving to PHP 5.5/5.6
The why and how of moving to PHP 5.5/5.6The why and how of moving to PHP 5.5/5.6
The why and how of moving to PHP 5.5/5.6
 
501 - PHP MYSQL.pdf
501 - PHP MYSQL.pdf501 - PHP MYSQL.pdf
501 - PHP MYSQL.pdf
 
PHP Session - Mcq ppt
PHP Session - Mcq ppt PHP Session - Mcq ppt
PHP Session - Mcq ppt
 
Web Server and Web Technology Exam paper
Web Server and Web Technology Exam paperWeb Server and Web Technology Exam paper
Web Server and Web Technology Exam paper
 
Php interview-questions and answers
Php interview-questions and answersPhp interview-questions and answers
Php interview-questions and answers
 
What To Expect From PHP7
What To Expect From PHP7What To Expect From PHP7
What To Expect From PHP7
 
Php questions and answers
Php questions and answersPhp questions and answers
Php questions and answers
 
Php Presentation
Php PresentationPhp Presentation
Php Presentation
 
Prepare for PHP Test Fest 2009
Prepare for PHP Test Fest 2009Prepare for PHP Test Fest 2009
Prepare for PHP Test Fest 2009
 
FNT Software Solutions Pvt Ltd Placement Papers - PHP Technologies
FNT Software Solutions Pvt Ltd Placement Papers - PHP TechnologiesFNT Software Solutions Pvt Ltd Placement Papers - PHP Technologies
FNT Software Solutions Pvt Ltd Placement Papers - PHP Technologies
 
Is your code ready for PHP 7 ?
Is your code ready for PHP 7 ?Is your code ready for PHP 7 ?
Is your code ready for PHP 7 ?
 
The why and how of moving to php 7
The why and how of moving to php 7The why and how of moving to php 7
The why and how of moving to php 7
 
Lca05
Lca05Lca05
Lca05
 
Starting with PHP and Web devepolment
Starting with PHP and Web devepolmentStarting with PHP and Web devepolment
Starting with PHP and Web devepolment
 
Exakat for PHP : smart code reviewing engine
Exakat for PHP : smart code reviewing engineExakat for PHP : smart code reviewing engine
Exakat for PHP : smart code reviewing engine
 

Recently uploaded

Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024
Jason Packer
 
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdfMonitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Tosin Akinosho
 
Project Management Semester Long Project - Acuity
Project Management Semester Long Project - AcuityProject Management Semester Long Project - Acuity
Project Management Semester Long Project - Acuity
jpupo2018
 
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial IntelligenceAI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
IndexBug
 
Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
Zilliz
 
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdfHow to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
Chart Kalyan
 
Choosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptxChoosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptx
Brandon Minnick, MBA
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
Octavian Nadolu
 
OpenID AuthZEN Interop Read Out - Authorization
OpenID AuthZEN Interop Read Out - AuthorizationOpenID AuthZEN Interop Read Out - Authorization
OpenID AuthZEN Interop Read Out - Authorization
David Brossard
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Malak Abu Hammad
 
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
Edge AI and Vision Alliance
 
Nordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptxNordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptx
MichaelKnudsen27
 
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development ProvidersYour One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
akankshawande
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
panagenda
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
shyamraj55
 
Best 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERPBest 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERP
Pixlogix Infotech
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
tolgahangng
 
Taking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdfTaking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdf
ssuserfac0301
 
Digital Marketing Trends in 2024 | Guide for Staying Ahead
Digital Marketing Trends in 2024 | Guide for Staying AheadDigital Marketing Trends in 2024 | Guide for Staying Ahead
Digital Marketing Trends in 2024 | Guide for Staying Ahead
Wask
 
5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides
DanBrown980551
 

Recently uploaded (20)

Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024
 
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdfMonitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdf
 
Project Management Semester Long Project - Acuity
Project Management Semester Long Project - AcuityProject Management Semester Long Project - Acuity
Project Management Semester Long Project - Acuity
 
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial IntelligenceAI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
 
Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
 
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdfHow to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
 
Choosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptxChoosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptx
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
 
OpenID AuthZEN Interop Read Out - Authorization
OpenID AuthZEN Interop Read Out - AuthorizationOpenID AuthZEN Interop Read Out - Authorization
OpenID AuthZEN Interop Read Out - Authorization
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
 
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
 
Nordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptxNordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptx
 
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development ProvidersYour One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
 
Best 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERPBest 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERP
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
 
Taking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdfTaking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdf
 
Digital Marketing Trends in 2024 | Guide for Staying Ahead
Digital Marketing Trends in 2024 | Guide for Staying AheadDigital Marketing Trends in 2024 | Guide for Staying Ahead
Digital Marketing Trends in 2024 | Guide for Staying Ahead
 
5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides
 

PHP Quiz

  • 1. PHP Quiz Tuesday 13th of March 2013 @AFUP_Toulouse thomas@gasc.fr @methylbro
  • 2. 1. What is the output of the following code? $a = 1; ++$a; $a *= $a; echo $a--; a. 4 b. 3 c. 5 d. 0
  • 3. 2. Which of the following will generate an E_NOTICE error assuming the following code? <?php $array = array( array( 1, 2 ), 'a' => array( 'b' => 1, 'c' ) ); a. $array[] = 1; b. echo $array[5][2]; c. echo $array[5][2] = 2; d. isset($array[7][3][1]);
  • 4. 3. Which of the following error types cannot be caught by setting up a custom error handler? a. E_WARNING b. E_ERROR c. E_USER_ERROR d. E_PARSE e. E_NOTICE
  • 5. 4. When PHP is running on a command line, what super-global will contain the command line arguments specified? a. $_SERVER b. $_ENV c. $GLOBALS d. $_POST e. $_ARGV
  • 6. Function world() is defined in the namespace myapputilshello. Your code is in the namespace myapp. 5. What is the correct way to import the hello namespace so you can use the world() function? a. use hello b. use utilshello c. use myapputilshello d. use myapputilshelloworld
  • 7. 6. Which interface can be used to allow an object to be executed in a foreach loop? a. ArrayObject b. Iterator c. ArrayList d. Hashtable
  • 8. 7. What is the output of the following script? <?php function fibonacci ($x1, $x2) { return $x1 + $x2; } $x1 = 0; $x2 = 1; for ($i = 0; $i<10; $i++) { echo fibonacci( $x1, $x2 ).','; } a. 1,2,3,4,5,6,7,8,9 b. 1,2,3,4,5,6,7,8,9,10, c. 1,2,3,5,8,13,21,34,55,89, d. 1,1,1,1,1,1,1,1,1,1,
  • 9. 8. Which PHP functions may be used to find out which PHP extensions are available in the system? (Choose 2) a. extension_loaded() b. get_extension_funcs() c. get_loaded_extensions() d. phpinfo()
  • 10. 9. What is the name of the error level constant that is used to designate PHP code that will not work in future versions? E_???????
  • 11. Your PHP script is repeatedly parsing 50KB of data returned from a remote web service into browser- readable HTML. Users complain that the script takes a long time to run. 10. Wich of the following measures usually leads to the best results? (Choose 2) a. Install a bytecode cache b. Install an SSD drive on the server c. Cache the data returned by the web service locally d. Upgrade to the lastest version of PHP
  • 12. 11. What the following code produce? <?php define('CONSTANT', 1); define('_CONSTANT', 0); define('EMPTY', ''); if (!empty(EMPTY)) { if (!((bool) _CONSTANT)) { print "One"; } } elseif (constant('CONSTANT')==1) { print "Two": } a. One b. Two c. Syntax error
  • 13. 12. Which of the following functions reads the entire contents of a file? a. fgets() b. file_get_contents() c. fread() d. readfile() e. file()
  • 14. Consider the following PHP script, which reads a file, line-by-line, from a text file. 13. Which function call should be inserted in place of the question marks in order for the script to function correctly? <?php $file = fopen("test", "r"); while(!feof($file)) { echo ????????????; } fclose($file); a. file_get_contents($file) b. file($file) c. read_file($file) d. fgets($file) e. fread($file)
  • 15. 14. Which of the following function calls will cause a file pointer to be returned to the beginning of the file? a. reset() b. fseek(-1) c. fseek(0, SEEK_END) d. fseek(0, SEEK_SET) e. fseek(0, SEEK_CUR)
  • 16. 15. How will the following script be displayed if called directly from a browser? <?php header ("Content-type: image/jpeg"); ?> <?php readfile ("image.jpg"); ?> a. As a JPEG image b. As a binary file for display within the browser c. As a binary file for download d. As a JPEG file for download e. As a broken image
  • 17. 16. Which of the following is not a valid PHP file wrapper resource? a. serverpathfilename b. http://www.example.com/index.php c. myfile.txt d. compress.zlib://myfile.txt e. They all are valid
  • 18. 17. Which of the following are valid PHP stream transports? (Choose 2) a. http b. STDIO c. ftp d. STDOUT e. stream
  • 19. 18. What does an opcode cache do? a. It compiles scripts into binary objects to make them run faster b. It replaces the Zend Engine to provide a faster interpreter c. It caches a script’s output to improve its performance d. It improves performance by caching the intermediate code produced by the parser e. It caches a script in memory, thus eliminating the need for reloading it from disk at every iteration
  • 20. 19. Who can spell the name of the Scope Resolution Operator? _ _ _ M _ _ _ M _ _ _ _ _ _ _ _ _ _ M