SlideShare ist ein Scribd-Unternehmen logo
1 von 6
Downloaden Sie, um offline zu lesen
This copy is registered to Núria Torrescasana (nuria3pyx@iespana.es) - Manresa (Barcelona), 08242, Spain




                                          Practice Exam Questions


                 1. Which of the following strings are not valid modes for the       fopen()   function?
                     A. a+b
                     B. b+a
                       C.    at
                        D.   w
                        E.   x+

                 2. Consider the following piece of code:
                        <?php
                        $arr = array(3 => “First”, 2=>“Second“, 1=>“Third“);
                        list (, $result) = $arr;
                        ?>

                     After running it, the value of $result would be
                       A. First
                       B. Second
                       C. Third
                       D. This piece of code will not run, but fail with a parse error.

                 3. In standard SQL-92, which of these situations do not require or cannot be handled
                    through the use of an aggregate SQL function? (Choose 2)
                      A. Calculating the sum of all the values in a column.
                      B. Determining the minimum value in a result set.
                      C. Grouping the results of a query by one or more fields.
                      D. Calculating the sum of all values in a column and retrieving all the values of
                          another column that is not part of an aggregate function or GROUP BY clause.
                      E. Determining the mean average of a column in a group of rows.

                 4. Multidimensional arrays can be sorted using the ______ function.
This copy is registered to N&uacute;ria Torrescasana (nuria3pyx@iespana.es) - Manresa (Barcelona), 08242, Spain


    210       Practice Exam Questions


                 5. When using the default session handler files for using sessions, PHP stores
                    session information on the harddrive of the webserver.When are those session
                    files cleaned up?
                       A. PHP will delete the associated session file when session_destroy() is
                            called from within a script.
                       B. When the function session_cleanup() is called, PHP will iterate over all
                            session files, and delete them if they exceeded the session timeout limit.
                       C. When the function session_start() is called, PHP will iterate over all
                            session files, and delete them if they exceeded the session timeout limit.
                       D. When the function session_start() is called, PHP will sometimes iterate
                            over all session files, and delete them if they exceeded the session timeout
                            limit.
                       E. Session files are never removed from the filesystem, you need to use an auto-
                            mated script (such as a cronjob) to do this.

                 6. What is the order of parameters in the mail() function?
                     A. subject, to address, extra headers, body
                     B. to address, subject, extra headers, body
                     C. to address, subject, body, extra headers
                     D. subject, to address, body, extra headers

                 7. Which of the following statements are correct? (Choose 3)
                     A. sprintf() does not output the generated string.
                     B. printf(“%2s%1s“, “ab“, “c“) outputs the string abc.
                       C. vprintf() takes at least one parameter; the first parameter is the formatting
                          string and the following parameters are the arguments for the ‘%’
                          placeholders.
                       D. printf(“%c“, “64“) will output @ and not 6.
                       E. sprintf(“%3.4f“, $x) outputs more than 7 characters.
                       F. number_format() inserts thousands of separators and decimal points differ-
                          ent from (,) and (.) respectively, while printf() like functions always use
                          (.) as decimal point.
This copy is registered to N&uacute;ria Torrescasana (nuria3pyx@iespana.es) - Manresa (Barcelona), 08242, Spain


                                                                                      Practice Exam Questions     211


                 8. The requirement is to return true for the case in which a string $str contains
                    another string $substr after the first character of $str? Which of the following
                    will return true when string $str contains string $substr, but only after the first
                    character of $str?
                    I.
                           <?php
                                     function test($str, $substr) {
                                             return strpos(substr($str,1), $substr) >= 0;
                                     }
                           ?>

                     II.
                           <?php
                                     function test($str, $substr) {
                                             return strrchr($str, $substr) !== false;
                                     }
                           ?>

                     III.
                           <?php
                                     function test($str, $substr) {
                                             return strpos($str, $substr) > 0;
                                     }
                           ?>

                       A.       I only
                       B.       II only
                       C.       III only
                       D.       I and II
                       E.       I and III
                       F.       II and III

                 9. Which of the features listed below do not exist in PHP4? (Choose 2)
                     A. Exceptions
                     B. Preprocessor instructions
                     C. Control structures
                        D. Classes and objects
                        E. Constants
This copy is registered to N&uacute;ria Torrescasana (nuria3pyx@iespana.es) - Manresa (Barcelona), 08242, Spain


    212       Practice Exam Questions


               10. What is the output of the following code snippet?
                            <?php
                               class Vehicle {
                               }

                                 class Car extends Vehicle {
                                 }

                                 class Ferrari extends Car {
                                 }

                                 var_dump(get_parent_class(“Ferrari”));
                            ?>

                       A.   string(7) “Vehicle“
                       B.   string(3) “Car“
                       C.   array(2) {
                                             [0]=>
                                             string(7) “vehicle“
                                             [1]=>
                                             string(3) “car“
                                        }

               11. The following PHP script is designed to subtract two indexed arrays of numbers.
                   Which statement is correct?
                            <?php

                                 $a = array(5, 2, 2, 3);
                                 $b = array(5, 8, 1, 5);

                                 var_dump(subArrays($a, $b));

                                 function
                                 subArrays($arr1,
                                          $arr2)
                                 {
                                          $c = count($arr1);
                                          if
                                          ($c != count($arr2))
                                          return
                                 null;
This copy is registered to N&uacute;ria Torrescasana (nuria3pyx@iespana.es) - Manresa (Barcelona), 08242, Spain


                                                                                      Practice Exam Questions     213


                                 for($i = 0;
                                         $i < $c;
                                         $i++)

                                         $res[$i]
                                         $arr1[$i] - $arr2[$i];

                                 return $res;

                                 }
                            ?>

                       A.   The script is valid.
                       B.   Assignments must be made on a single line.
                       C.   It has too many linefeed characters between statements.
                       D.   No, the script is missing curly braces.
                       E.   Yes it is valid, but the script will not work as expected.

                12. What is the purpose of the escapeshellarg() function?
                     A. Removing malicious characters.
                     B. Escaping malicious characters.
                     C. Creating an array of arguments for a shell command.
                     D. Preparing data to be used as a single argument in a shell command.
                     E. None of the above.

                13. The _________ function can be used to determine if the contents of a string can
                    be interpreted as a number.
                14. Assume $comment contains a string.Which PHP statement prints out the first 20
                    characters of $comment followed by three dots (.)?
                      A. print substr($comment, 20) . ‘...‘;
                      B. print substr_replace($comment, ‘...‘, 20);
                      C. print substr($comment, 20, strlen($comment)) . ‘...‘;
                      D. print substr_replace($comment, 20, ‘...‘);

                15. What is the name of the function that you should use to put uploaded files into a
                    permanent location on your server?
                16. If you have a file handle for an opened file, use the __________ function to send
                    all data remaining to be read from that file handle to the output buffer.
This copy is registered to N&uacute;ria Torrescasana (nuria3pyx@iespana.es) - Manresa (Barcelona), 08242, Spain


    214       Practice Exam Questions


               17. Which of the following sentences are not true? (Choose 2)
                    A. strpos() allows searching for a substring in another string.
                    B. strrpos() allows searching for a substring in another string.
                    C. strpos() and strrchr() return -1 if the second parameter is not a sub-
                       string of the first parameter.
                         D. strpos() and strrpos() can return a value that is different from an integer.
                         E. The second parameter to substr() is the length of the substring to extract.
                         F. strstr() returns false if the substring specified by its second parameter is
                            not found in the first parameter.

               18. Which of the following sentences are correct? (Choose 2)
                    A. time() + 60*60*100 returns the current date and time plus one hour.
                    B. time() + 24*60*60 returns the current date and time plus one day.
                    C. time() + 24*60*60*100 returns the current date and time plus one day


              Answers
                1.   B
                2.   C
                3.   C and D
                4.   array_multisort      or   array_multisort()
                5.   D
                6.   C
                7.   A, D, and F
                8.   C
                9.   A and B
               10.   A
               11.   B
               12.   D
               13.   is_numeric    or   is_numeric()
               14.   B
               15. move_uploaded_file or move_uploaded_file()
               16. fpassthru or fpassthru()
               17. C and E
               18. B

Weitere ähnliche Inhalte

Was ist angesagt?

Php Reusing Code And Writing Functions
Php Reusing Code And Writing FunctionsPhp Reusing Code And Writing Functions
Php Reusing Code And Writing Functionsmussawir20
 
Design & development of job portal system using joomla & its online reputatio...
Design & development of job portal system using joomla & its online reputatio...Design & development of job portal system using joomla & its online reputatio...
Design & development of job portal system using joomla & its online reputatio...Dinesh Babu Pugalenthi
 
Soap web service
Soap web serviceSoap web service
Soap web serviceNITT, KAMK
 
Online shopping with shopping cart ppt 1
Online shopping with shopping cart ppt 1Online shopping with shopping cart ppt 1
Online shopping with shopping cart ppt 1anitha ratnam
 
Beginners PHP Tutorial
Beginners PHP TutorialBeginners PHP Tutorial
Beginners PHP Tutorialalexjones89
 
Onlineline shopping Yash Bazaar.com
Onlineline shopping Yash Bazaar.comOnlineline shopping Yash Bazaar.com
Onlineline shopping Yash Bazaar.comTmu
 
How To be a Backend developer
How To be a Backend developer    How To be a Backend developer
How To be a Backend developer Ramy Hakam
 
Introduction à JavaScript
Introduction à JavaScriptIntroduction à JavaScript
Introduction à JavaScriptAbdoulaye Dieng
 
online-shopping-documentation-srs for TYBSCIT sem 6
 online-shopping-documentation-srs for TYBSCIT sem 6 online-shopping-documentation-srs for TYBSCIT sem 6
online-shopping-documentation-srs for TYBSCIT sem 6YogeshDhamke2
 
Css Complete Notes
Css Complete NotesCss Complete Notes
Css Complete NotesEPAM Systems
 
Complaint management system
Complaint management systemComplaint management system
Complaint management systemnamanbiltiwala
 
Les web services
Les web servicesLes web services
Les web servicesdihiaselma
 

Was ist angesagt? (20)

Php Reusing Code And Writing Functions
Php Reusing Code And Writing FunctionsPhp Reusing Code And Writing Functions
Php Reusing Code And Writing Functions
 
PHP NOTES FOR BEGGINERS
PHP NOTES FOR BEGGINERSPHP NOTES FOR BEGGINERS
PHP NOTES FOR BEGGINERS
 
Php.ppt
Php.pptPhp.ppt
Php.ppt
 
Design & development of job portal system using joomla & its online reputatio...
Design & development of job portal system using joomla & its online reputatio...Design & development of job portal system using joomla & its online reputatio...
Design & development of job portal system using joomla & its online reputatio...
 
Soap web service
Soap web serviceSoap web service
Soap web service
 
Online shopping with shopping cart ppt 1
Online shopping with shopping cart ppt 1Online shopping with shopping cart ppt 1
Online shopping with shopping cart ppt 1
 
Beginners PHP Tutorial
Beginners PHP TutorialBeginners PHP Tutorial
Beginners PHP Tutorial
 
PHP - Web Development
PHP - Web DevelopmentPHP - Web Development
PHP - Web Development
 
Php technical presentation
Php technical presentationPhp technical presentation
Php technical presentation
 
PHP and Mysql
PHP and MysqlPHP and Mysql
PHP and Mysql
 
Onlineline shopping Yash Bazaar.com
Onlineline shopping Yash Bazaar.comOnlineline shopping Yash Bazaar.com
Onlineline shopping Yash Bazaar.com
 
Basics of the Web Platform
Basics of the Web PlatformBasics of the Web Platform
Basics of the Web Platform
 
Software Development with PHP & Laravel
Software Development  with PHP & LaravelSoftware Development  with PHP & Laravel
Software Development with PHP & Laravel
 
Web application architecture
Web application architectureWeb application architecture
Web application architecture
 
How To be a Backend developer
How To be a Backend developer    How To be a Backend developer
How To be a Backend developer
 
Introduction à JavaScript
Introduction à JavaScriptIntroduction à JavaScript
Introduction à JavaScript
 
online-shopping-documentation-srs for TYBSCIT sem 6
 online-shopping-documentation-srs for TYBSCIT sem 6 online-shopping-documentation-srs for TYBSCIT sem 6
online-shopping-documentation-srs for TYBSCIT sem 6
 
Css Complete Notes
Css Complete NotesCss Complete Notes
Css Complete Notes
 
Complaint management system
Complaint management systemComplaint management system
Complaint management system
 
Les web services
Les web servicesLes web services
Les web services
 

Andere mochten auch

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 AnswersVineet Kumar Saini
 
PHP Technical Questions
PHP Technical QuestionsPHP Technical Questions
PHP Technical QuestionsPankaj Jha
 
Zend PHP 5.3 Demo Certification Test
Zend PHP 5.3 Demo Certification TestZend PHP 5.3 Demo Certification Test
Zend PHP 5.3 Demo Certification TestCarlos Buenosvinos
 
25 php interview questions – codementor
25 php interview questions – codementor25 php interview questions – codementor
25 php interview questions – codementorArc & Codementor
 
Zend Php Certification Study Guide
Zend Php Certification Study GuideZend Php Certification Study Guide
Zend Php Certification Study GuideKamalika Guha Roy
 
Questions and answers regarding white card
Questions and answers regarding white cardQuestions and answers regarding white card
Questions and answers regarding white cardrazzor56
 
Top 100 PHP Questions and Answers
Top 100 PHP Questions and AnswersTop 100 PHP Questions and Answers
Top 100 PHP Questions and Answersiimjobs and hirist
 
Useful functions for arrays in php
Useful functions for arrays in phpUseful functions for arrays in php
Useful functions for arrays in phpChetan Patel
 
Zend Certification Preparation Tutorial
Zend Certification Preparation TutorialZend Certification Preparation Tutorial
Zend Certification Preparation TutorialLorna Mitchell
 
Curso HTML5 - Temario
Curso HTML5 - TemarioCurso HTML5 - Temario
Curso HTML5 - Temariopastilla5
 
Top 100 .Net Interview Questions and Answer
Top 100 .Net Interview Questions and AnswerTop 100 .Net Interview Questions and Answer
Top 100 .Net Interview Questions and AnswerVineet Kumar Saini
 
Zend Certification PHP 5 Sample Questions
Zend Certification PHP 5 Sample QuestionsZend Certification PHP 5 Sample Questions
Zend Certification PHP 5 Sample QuestionsJagat Kothari
 
Your first 5 PHP design patterns - ThatConference 2012
Your first 5 PHP design patterns - ThatConference 2012Your first 5 PHP design patterns - ThatConference 2012
Your first 5 PHP design patterns - ThatConference 2012Aaron Saray
 
Introducción a HTML5 y CSS3 AWGR
Introducción a HTML5 y CSS3 AWGRIntroducción a HTML5 y CSS3 AWGR
Introducción a HTML5 y CSS3 AWGRvalgreens
 
Manual css3 DesarrolloWeb
Manual css3 DesarrolloWebManual css3 DesarrolloWeb
Manual css3 DesarrolloWebWalter Carmona
 
HTML5 & CSS3 in Drupal (on the Bayou)
HTML5 & CSS3 in Drupal (on the Bayou)HTML5 & CSS3 in Drupal (on the Bayou)
HTML5 & CSS3 in Drupal (on the Bayou)Mediacurrent
 

Andere mochten auch (20)

1000+ php questions
1000+ php questions1000+ php questions
1000+ php 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
 
PHP Technical Questions
PHP Technical QuestionsPHP Technical Questions
PHP Technical Questions
 
Zend PHP 5.3 Demo Certification Test
Zend PHP 5.3 Demo Certification TestZend PHP 5.3 Demo Certification Test
Zend PHP 5.3 Demo Certification Test
 
25 php interview questions – codementor
25 php interview questions – codementor25 php interview questions – codementor
25 php interview questions – codementor
 
Zend Php Certification Study Guide
Zend Php Certification Study GuideZend Php Certification Study Guide
Zend Php Certification Study Guide
 
Questions and answers regarding white card
Questions and answers regarding white cardQuestions and answers regarding white card
Questions and answers regarding white card
 
Top 100 PHP Questions and Answers
Top 100 PHP Questions and AnswersTop 100 PHP Questions and Answers
Top 100 PHP Questions and Answers
 
Useful functions for arrays in php
Useful functions for arrays in phpUseful functions for arrays in php
Useful functions for arrays in php
 
Zend Certification Preparation Tutorial
Zend Certification Preparation TutorialZend Certification Preparation Tutorial
Zend Certification Preparation Tutorial
 
Curso HTML5 - Temario
Curso HTML5 - TemarioCurso HTML5 - Temario
Curso HTML5 - Temario
 
PHP Quiz
PHP QuizPHP Quiz
PHP Quiz
 
Top 100 .Net Interview Questions and Answer
Top 100 .Net Interview Questions and AnswerTop 100 .Net Interview Questions and Answer
Top 100 .Net Interview Questions and Answer
 
Php mysql ppt
Php mysql pptPhp mysql ppt
Php mysql ppt
 
Zend Certification PHP 5 Sample Questions
Zend Certification PHP 5 Sample QuestionsZend Certification PHP 5 Sample Questions
Zend Certification PHP 5 Sample Questions
 
Your first 5 PHP design patterns - ThatConference 2012
Your first 5 PHP design patterns - ThatConference 2012Your first 5 PHP design patterns - ThatConference 2012
Your first 5 PHP design patterns - ThatConference 2012
 
Introducción a HTML5 y CSS3 AWGR
Introducción a HTML5 y CSS3 AWGRIntroducción a HTML5 y CSS3 AWGR
Introducción a HTML5 y CSS3 AWGR
 
Manual css3 DesarrolloWeb
Manual css3 DesarrolloWebManual css3 DesarrolloWeb
Manual css3 DesarrolloWeb
 
HTML5 & CSS3 in Drupal (on the Bayou)
HTML5 & CSS3 in Drupal (on the Bayou)HTML5 & CSS3 in Drupal (on the Bayou)
HTML5 & CSS3 in Drupal (on the Bayou)
 
Browser information in PHP
Browser information in PHPBrowser information in PHP
Browser information in PHP
 

Ähnlich wie Practice exam php

C++ Programming Homework Help
C++ Programming Homework HelpC++ Programming Homework Help
C++ Programming Homework HelpC++ Homework Help
 
Data Analysis with R (combined slides)
Data Analysis with R (combined slides)Data Analysis with R (combined slides)
Data Analysis with R (combined slides)Guy Lebanon
 
Regular expressions, Session and Cookies by Dr.C.R.Dhivyaa Kongu Engineering ...
Regular expressions, Session and Cookies by Dr.C.R.Dhivyaa Kongu Engineering ...Regular expressions, Session and Cookies by Dr.C.R.Dhivyaa Kongu Engineering ...
Regular expressions, Session and Cookies by Dr.C.R.Dhivyaa Kongu Engineering ...Dhivyaa C.R
 
Comp 328 final guide
Comp 328 final guideComp 328 final guide
Comp 328 final guidekrtioplal
 
JavaScript(Es5) Interview Questions & Answers
JavaScript(Es5)  Interview Questions & AnswersJavaScript(Es5)  Interview Questions & Answers
JavaScript(Es5) Interview Questions & AnswersRatnala Charan kumar
 
Advanced Web Technology ass.pdf
Advanced Web Technology ass.pdfAdvanced Web Technology ass.pdf
Advanced Web Technology ass.pdfsimenehanmut
 
Arrays and function basic c programming notes
Arrays and function basic c programming notesArrays and function basic c programming notes
Arrays and function basic c programming notesGOKULKANNANMMECLECTC
 
Programming in C (part 2)
Programming in C (part 2)Programming in C (part 2)
Programming in C (part 2)SURBHI SAROHA
 
Java Questions
Java QuestionsJava Questions
Java Questionsbindur87
 

Ähnlich wie Practice exam php (20)

Mcq ppt Php- array
Mcq ppt Php- array Mcq ppt Php- array
Mcq ppt Php- array
 
lab4_php
lab4_phplab4_php
lab4_php
 
lab4_php
lab4_phplab4_php
lab4_php
 
Java 8 Workshop
Java 8 WorkshopJava 8 Workshop
Java 8 Workshop
 
C++ Programming Homework Help
C++ Programming Homework HelpC++ Programming Homework Help
C++ Programming Homework Help
 
Ds lab handouts
Ds lab handoutsDs lab handouts
Ds lab handouts
 
Data Analysis with R (combined slides)
Data Analysis with R (combined slides)Data Analysis with R (combined slides)
Data Analysis with R (combined slides)
 
Chapter 2 wbp.pptx
Chapter 2 wbp.pptxChapter 2 wbp.pptx
Chapter 2 wbp.pptx
 
What is new in Java 8
What is new in Java 8What is new in Java 8
What is new in Java 8
 
cp05.pptx
cp05.pptxcp05.pptx
cp05.pptx
 
Regular expressions, Session and Cookies by Dr.C.R.Dhivyaa Kongu Engineering ...
Regular expressions, Session and Cookies by Dr.C.R.Dhivyaa Kongu Engineering ...Regular expressions, Session and Cookies by Dr.C.R.Dhivyaa Kongu Engineering ...
Regular expressions, Session and Cookies by Dr.C.R.Dhivyaa Kongu Engineering ...
 
UNIT IV (4).pptx
UNIT IV (4).pptxUNIT IV (4).pptx
UNIT IV (4).pptx
 
Comp 328 final guide
Comp 328 final guideComp 328 final guide
Comp 328 final guide
 
JavaScript(Es5) Interview Questions & Answers
JavaScript(Es5)  Interview Questions & AnswersJavaScript(Es5)  Interview Questions & Answers
JavaScript(Es5) Interview Questions & Answers
 
Advanced Web Technology ass.pdf
Advanced Web Technology ass.pdfAdvanced Web Technology ass.pdf
Advanced Web Technology ass.pdf
 
Java script arrays
Java script arraysJava script arrays
Java script arrays
 
Java script arrays
Java script arraysJava script arrays
Java script arrays
 
Arrays and function basic c programming notes
Arrays and function basic c programming notesArrays and function basic c programming notes
Arrays and function basic c programming notes
 
Programming in C (part 2)
Programming in C (part 2)Programming in C (part 2)
Programming in C (part 2)
 
Java Questions
Java QuestionsJava Questions
Java Questions
 

Kürzlich hochgeladen

Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 

Kürzlich hochgeladen (20)

Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 

Practice exam php

  • 1. This copy is registered to N&uacute;ria Torrescasana (nuria3pyx@iespana.es) - Manresa (Barcelona), 08242, Spain Practice Exam Questions 1. Which of the following strings are not valid modes for the fopen() function? A. a+b B. b+a C. at D. w E. x+ 2. Consider the following piece of code: <?php $arr = array(3 => “First”, 2=>“Second“, 1=>“Third“); list (, $result) = $arr; ?> After running it, the value of $result would be A. First B. Second C. Third D. This piece of code will not run, but fail with a parse error. 3. In standard SQL-92, which of these situations do not require or cannot be handled through the use of an aggregate SQL function? (Choose 2) A. Calculating the sum of all the values in a column. B. Determining the minimum value in a result set. C. Grouping the results of a query by one or more fields. D. Calculating the sum of all values in a column and retrieving all the values of another column that is not part of an aggregate function or GROUP BY clause. E. Determining the mean average of a column in a group of rows. 4. Multidimensional arrays can be sorted using the ______ function.
  • 2. This copy is registered to N&uacute;ria Torrescasana (nuria3pyx@iespana.es) - Manresa (Barcelona), 08242, Spain 210 Practice Exam Questions 5. When using the default session handler files for using sessions, PHP stores session information on the harddrive of the webserver.When are those session files cleaned up? A. PHP will delete the associated session file when session_destroy() is called from within a script. B. When the function session_cleanup() is called, PHP will iterate over all session files, and delete them if they exceeded the session timeout limit. C. When the function session_start() is called, PHP will iterate over all session files, and delete them if they exceeded the session timeout limit. D. When the function session_start() is called, PHP will sometimes iterate over all session files, and delete them if they exceeded the session timeout limit. E. Session files are never removed from the filesystem, you need to use an auto- mated script (such as a cronjob) to do this. 6. What is the order of parameters in the mail() function? A. subject, to address, extra headers, body B. to address, subject, extra headers, body C. to address, subject, body, extra headers D. subject, to address, body, extra headers 7. Which of the following statements are correct? (Choose 3) A. sprintf() does not output the generated string. B. printf(“%2s%1s“, “ab“, “c“) outputs the string abc. C. vprintf() takes at least one parameter; the first parameter is the formatting string and the following parameters are the arguments for the ‘%’ placeholders. D. printf(“%c“, “64“) will output @ and not 6. E. sprintf(“%3.4f“, $x) outputs more than 7 characters. F. number_format() inserts thousands of separators and decimal points differ- ent from (,) and (.) respectively, while printf() like functions always use (.) as decimal point.
  • 3. This copy is registered to N&uacute;ria Torrescasana (nuria3pyx@iespana.es) - Manresa (Barcelona), 08242, Spain Practice Exam Questions 211 8. The requirement is to return true for the case in which a string $str contains another string $substr after the first character of $str? Which of the following will return true when string $str contains string $substr, but only after the first character of $str? I. <?php function test($str, $substr) { return strpos(substr($str,1), $substr) >= 0; } ?> II. <?php function test($str, $substr) { return strrchr($str, $substr) !== false; } ?> III. <?php function test($str, $substr) { return strpos($str, $substr) > 0; } ?> A. I only B. II only C. III only D. I and II E. I and III F. II and III 9. Which of the features listed below do not exist in PHP4? (Choose 2) A. Exceptions B. Preprocessor instructions C. Control structures D. Classes and objects E. Constants
  • 4. This copy is registered to N&uacute;ria Torrescasana (nuria3pyx@iespana.es) - Manresa (Barcelona), 08242, Spain 212 Practice Exam Questions 10. What is the output of the following code snippet? <?php class Vehicle { } class Car extends Vehicle { } class Ferrari extends Car { } var_dump(get_parent_class(“Ferrari”)); ?> A. string(7) “Vehicle“ B. string(3) “Car“ C. array(2) { [0]=> string(7) “vehicle“ [1]=> string(3) “car“ } 11. The following PHP script is designed to subtract two indexed arrays of numbers. Which statement is correct? <?php $a = array(5, 2, 2, 3); $b = array(5, 8, 1, 5); var_dump(subArrays($a, $b)); function subArrays($arr1, $arr2) { $c = count($arr1); if ($c != count($arr2)) return null;
  • 5. This copy is registered to N&uacute;ria Torrescasana (nuria3pyx@iespana.es) - Manresa (Barcelona), 08242, Spain Practice Exam Questions 213 for($i = 0; $i < $c; $i++) $res[$i] $arr1[$i] - $arr2[$i]; return $res; } ?> A. The script is valid. B. Assignments must be made on a single line. C. It has too many linefeed characters between statements. D. No, the script is missing curly braces. E. Yes it is valid, but the script will not work as expected. 12. What is the purpose of the escapeshellarg() function? A. Removing malicious characters. B. Escaping malicious characters. C. Creating an array of arguments for a shell command. D. Preparing data to be used as a single argument in a shell command. E. None of the above. 13. The _________ function can be used to determine if the contents of a string can be interpreted as a number. 14. Assume $comment contains a string.Which PHP statement prints out the first 20 characters of $comment followed by three dots (.)? A. print substr($comment, 20) . ‘...‘; B. print substr_replace($comment, ‘...‘, 20); C. print substr($comment, 20, strlen($comment)) . ‘...‘; D. print substr_replace($comment, 20, ‘...‘); 15. What is the name of the function that you should use to put uploaded files into a permanent location on your server? 16. If you have a file handle for an opened file, use the __________ function to send all data remaining to be read from that file handle to the output buffer.
  • 6. This copy is registered to N&uacute;ria Torrescasana (nuria3pyx@iespana.es) - Manresa (Barcelona), 08242, Spain 214 Practice Exam Questions 17. Which of the following sentences are not true? (Choose 2) A. strpos() allows searching for a substring in another string. B. strrpos() allows searching for a substring in another string. C. strpos() and strrchr() return -1 if the second parameter is not a sub- string of the first parameter. D. strpos() and strrpos() can return a value that is different from an integer. E. The second parameter to substr() is the length of the substring to extract. F. strstr() returns false if the substring specified by its second parameter is not found in the first parameter. 18. Which of the following sentences are correct? (Choose 2) A. time() + 60*60*100 returns the current date and time plus one hour. B. time() + 24*60*60 returns the current date and time plus one day. C. time() + 24*60*60*100 returns the current date and time plus one day Answers 1. B 2. C 3. C and D 4. array_multisort or array_multisort() 5. D 6. C 7. A, D, and F 8. C 9. A and B 10. A 11. B 12. D 13. is_numeric or is_numeric() 14. B 15. move_uploaded_file or move_uploaded_file() 16. fpassthru or fpassthru() 17. C and E 18. B