title
PHP Interview Questions & Answers | PHP Programming Interview Questions | PHP Tutorial | Simplilearn

description
🔥 IITM Pravartak Professional Certificate Program In Full Stack Development - MERN (India Only): https://www.simplilearn.com/full-stack-developer-course-and-certification-iitm-pravartak?utm_campaign=SCE-FullstackIITM&utm_medium=DescriptionFF&utm_source=youtube 🔥Post Graduate Program In Full Stack Web Development: https://www.simplilearn.com/pgp-full-stack-web-development-certification-training-course?utm_campaign=PHPIQs-Z0oWOUbuD9k&utm_medium=Descriptionff&utm_source=youtube 🔥Caltech Coding Bootcamp (US Only): https://www.simplilearn.com/coding-bootcamp?utm_campaign=PHPIQs-Z0oWOUbuD9k&utm_medium=Descriptionff&utm_source=youtube 🔥Full Stack Java Developer (India Only) - https://www.simplilearn.com/java-full-stack-developer-certification-training-course?utm_campaign=PHPIQs-Z0oWOUbuD9k&utm_medium=Descriptionff&utm_source=youtube In this PHP Interview Questionsvideo, we will discuss the most frequently asked questions on PHP programming in job interviews. These questions have been categorized into two sections, beginner-level and advanced-level questions. They are a combination of conceptual, output-based, and programming questions. ✅Subscribe to our Channel to learn more about the top Technologies: https://bit.ly/2VT4WtH ⏩ Check out our PHP training videos playlist: https://www.youtube.com/watch?v=KBT2gmAfav4&list=PLEiEAq2VkUUIjP-QLfvICa1TvqTLFvn1b #PHPInterviewQuestions #PHPInterviewQuestionsAndAnswer #PHPProgrammingInterviewQuestions #PHPInterviewPreparation #PHPInterviewQuestionsForFreshers #AdvancedPHPInterviewQuestions #PHP #PHPForBeginners #PHPForBeginners #PHPTutorial #PHPTutorialForBeginners #Simplilearn Introduction to PHP: Despite being an old language, PHP still comprises 79.8% of all web applications that nearly translates to 20 million websites and 2 million web servers. According to zdnet.com, the demand for PHP developers has also massively increased to 834% since January 2020. PHP stands for Hypertext Preprocessor. It is an open-source server-side scripting language used for dynamic web development and can be embedded into HTML codes. ➡️ About Post Graduate Program In Full Stack Web Development This program will give you the foundation for building full-stack web apps using the Java programming language. You'll begin with the basics of JavaScript, and then venture into some of the more advanced concepts like Angular, Spring Boot, Hibernate, JSPs, and MVC. Now is the perfect time to get started on your career as a full-stack web developer! ✅ Key Features - Caltech CTME Post Graduate Certificate - Enrolment in Simplilearn’s JobAssist - Receive up to 25 CEUs from Caltech CTME - Simplilearn's JobAssist helps you get noticed by top hiring companies - Attend Masterclasses from Caltech CTME instructors - Live virtual classes led by industry experts, hands-on projects and integrated labs - Online Convocation by Caltech CTME Program Director - 20 lesson-end and 5 phase-end projects - Capstone Project in 4 domains - Caltech CTME Circle Membership - Build your own portfolio on GitHub ✅ Skills Covered - Agile - JAVA - Hibernate and JPA - Spring Core 50 - DevOps - HTML5 and CSS3 - AWS - JavaScript ES6 - Servlets - SOAP and REST - JSP To learn more about PHP, check our Full Stack Web Developer program: https://www.simplilearn.com/full-stack-web-developer-mean-stack-certification-training?utm_campaign=PHPIQs&utm_medium=Description&utm_source=youtube 🔥Explore our FREE Courses with a Completion Certificate: https://www.simplilearn.com/skillup-free-online-courses?utm_campaign=PHPIQs&utm_medium=Description&utm_source=youtube 🔥🔥 Interested in Attending Live Classes? Call Us: IN - 18002127688 / US - +18445327688

detail
{'title': 'PHP Interview Questions & Answers | PHP Programming Interview Questions | PHP Tutorial | Simplilearn', 'heatmap': [{'end': 325.069, 'start': 291.589, 'weight': 1}, {'end': 1101.394, 'start': 1075.013, 'weight': 0.728}], 'summary': 'Covers php interview faqs, language basics, function and global variables, applications, function overloading, exception and error handling, and function interaction, including topics like data types, session handling, php basics, and error handling methods.', 'chapters': [{'end': 94.273, 'segs': [{'end': 94.273, 'src': 'embed', 'start': 7.588, 'weight': 0, 'content': [{'end': 10.429, 'text': 'Hey guys and a very warm welcome to Simply Learn.', 'start': 7.588, 'duration': 2.841}, {'end': 16.412, 'text': "In this video, we'll discuss some of the frequently asked questions in PHP interviews.", 'start': 11.05, 'duration': 5.362}, {'end': 23.316, 'text': 'Now, the questions are categorized in two sections, beginner and advanced questions.', 'start': 17.153, 'duration': 6.163}, {'end': 28.579, 'text': 'So, without any further ado, let us get started with the beginner questions.', 'start': 23.916, 'duration': 4.663}, {'end': 37.243, 'text': 'Now, the most basic question is what is PHP? So, PHP stands for Hypertext Preprocessor.', 'start': 29.359, 'duration': 7.884}, {'end': 46.679, 'text': 'It is a server-side scripting language that is embedded into HTML and is generally used for dynamic web development.', 'start': 37.93, 'duration': 8.749}, {'end': 50.022, 'text': 'PHP is also a very compatible language.', 'start': 47.279, 'duration': 2.743}, {'end': 58.83, 'text': 'That is, it also works efficiently with almost 20 different databases such as MySQL, PostgreSQL, etc.', 'start': 50.222, 'duration': 8.608}, {'end': 62.474, 'text': 'Next question what is a session in PHP??', 'start': 59.531, 'duration': 2.943}, {'end': 73.728, 'text': 'now, sessions in php are used to store data for users under a unique id which can be then used across multiple web pages of a website.', 'start': 63.24, 'duration': 10.488}, {'end': 77.07, 'text': 'next, what is peer in php now?', 'start': 73.728, 'duration': 3.342}, {'end': 82.915, 'text': 'peer stands for php extension and application repository.', 'start': 77.07, 'duration': 5.845}, {'end': 87.158, 'text': 'it is a framework and repository for the reusable components.', 'start': 82.915, 'duration': 4.243}, {'end': 94.273, 'text': 'focus on reusable components of php containing code snippets and libraries.', 'start': 87.648, 'duration': 6.625}], 'summary': "Php interview faq: covers beginner & advanced questions, php's usage, and compatibility with 20+ databases.", 'duration': 86.685, 'max_score': 7.588, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/Z0oWOUbuD9k/pics/Z0oWOUbuD9k7588.jpg'}], 'start': 7.588, 'title': 'Php interview faqs', 'summary': 'Covers frequently asked beginner and advanced php interview questions, including the definition of php, its compatibility with various databases, and the purpose of sessions and pear in php.', 'chapters': [{'end': 94.273, 'start': 7.588, 'title': 'Php interview faqs: beginner and advanced', 'summary': 'Covers frequently asked beginner and advanced php interview questions, including the definition of php, its compatibility with various databases, and the purpose of sessions and pear in php.', 'duration': 86.685, 'highlights': ['The chapter covers frequently asked beginner and advanced PHP interview questions, including the definition of PHP, its compatibility with various databases, and the purpose of sessions and PEAR in PHP.', 'PHP is a server-side scripting language embedded into HTML, used for dynamic web development, and works efficiently with almost 20 different databases such as MySQL, PostgreSQL, etc.', 'Sessions in PHP are used to store data for users under a unique id which can be then used across multiple web pages of a website.', 'PEAR in PHP stands for PHP Extension and Application Repository, serving as a framework and repository for reusable components containing code snippets and libraries.']}], 'duration': 86.685, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/Z0oWOUbuD9k/pics/Z0oWOUbuD9k7588.jpg', 'highlights': ['PHP is a server-side scripting language embedded into HTML, used for dynamic web development, and works efficiently with almost 20 different databases such as MySQL, PostgreSQL, etc.', 'Sessions in PHP are used to store data for users under a unique id which can be then used across multiple web pages of a website.', 'PEAR in PHP stands for PHP Extension and Application Repository, serving as a framework and repository for reusable components containing code snippets and libraries.', 'The chapter covers frequently asked beginner and advanced PHP interview questions, including the definition of PHP, its compatibility with various databases, and the purpose of sessions and PEAR in PHP.']}, {'end': 508.268, 'segs': [{'end': 179.37, 'src': 'embed', 'start': 94.273, 'weight': 0, 'content': [{'end': 98.557, 'text': 'next, is php considered a case sensitive language?', 'start': 94.273, 'duration': 4.284}, {'end': 102.56, 'text': 'so this is a very often asked questions in interviews.', 'start': 98.557, 'duration': 4.003}, {'end': 112.408, 'text': 'so php is partially case sensitive, since variables in php are case sensitive, while functions and user defined functions are not.', 'start': 102.56, 'duration': 9.848}, {'end': 117.072, 'text': 'next, name different types of data types in php.', 'start': 112.408, 'duration': 4.664}, {'end': 129.08, 'text': 'So different data types in PHP include integer, float string, boolean array, object, null and finally resource.', 'start': 117.915, 'duration': 11.165}, {'end': 133.822, 'text': 'So there are total eight different data types that exist in PHP.', 'start': 129.4, 'duration': 4.422}, {'end': 135.062, 'text': 'Next question.', 'start': 134.422, 'duration': 0.64}, {'end': 143.066, 'text': 'How is echo different from print? Now echo, it can output multiple strings at a time.', 'start': 135.923, 'duration': 7.143}, {'end': 148.55, 'text': 'while in case of print it can output only a single string.', 'start': 143.644, 'duration': 4.906}, {'end': 153.495, 'text': 'now echo does not have a return value, while print always returns one.', 'start': 148.55, 'duration': 4.945}, {'end': 156.058, 'text': 'that is the reason that is.', 'start': 154.557, 'duration': 1.501}, {'end': 166.704, 'text': 'echo is faster because it does not have to return a value, while it is print is slower in comparison to echo because it always returns a value.', 'start': 156.058, 'duration': 10.646}, {'end': 174.928, 'text': 'now, as you can see, both of these commands, echo and print are used in the exact same way.', 'start': 166.704, 'duration': 8.224}, {'end': 179.37, 'text': 'next, what are the rules for naming a variable?', 'start': 174.928, 'duration': 4.442}], 'summary': 'Php is partially case sensitive, has 8 data types, and echo differs from print.', 'duration': 85.097, 'max_score': 94.273, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/Z0oWOUbuD9k/pics/Z0oWOUbuD9k94273.jpg'}, {'end': 265.203, 'src': 'embed', 'start': 233.816, 'weight': 4, 'content': [{'end': 239.958, 'text': 'You can also put a number in between or at the end while naming a variable, just not at the start.', 'start': 233.816, 'duration': 6.142}, {'end': 243.58, 'text': 'Next, name some popular PHP frameworks.', 'start': 240.579, 'duration': 3.001}, {'end': 252.162, 'text': 'So some of the popular PHP frameworks include Symphony, CodeIgniter, CakePHP and Laravel.', 'start': 244.16, 'duration': 8.002}, {'end': 253.503, 'text': 'Moving on.', 'start': 253.023, 'duration': 0.48}, {'end': 258.737, 'text': 'how to check if a defined variable is null or not.', 'start': 254.432, 'duration': 4.305}, {'end': 265.203, 'text': 'so is a thank function is used to check if the defined variable has any value or not.', 'start': 258.737, 'duration': 6.466}], 'summary': "Naming variables with numbers is allowed; popular php frameworks include symphony, codeigniter, cakephp, and laravel. 'isset' function checks if a variable is defined.", 'duration': 31.387, 'max_score': 233.816, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/Z0oWOUbuD9k/pics/Z0oWOUbuD9k233816.jpg'}, {'end': 325.069, 'src': 'heatmap', 'start': 291.589, 'weight': 1, 'content': [{'end': 303.96, 'text': 'since it is not null, it returns true and we can display echo, as variable x is not null, while in the case of variable y it is a null value,', 'start': 291.589, 'duration': 12.371}, {'end': 309.645, 'text': 'since so the if condition will be false and it will not display anything.', 'start': 303.96, 'duration': 5.685}, {'end': 313.803, 'text': 'next, how are objects in php passed?', 'start': 309.645, 'duration': 4.158}, {'end': 320.447, 'text': 'so objects in php are always passed by a value, not by a reference.', 'start': 313.803, 'duration': 6.644}, {'end': 325.069, 'text': 'next question how to display output directly to the browser.', 'start': 320.447, 'duration': 4.622}], 'summary': 'Php if statement checks null value; objects passed by value in php; display output directly to the browser.', 'duration': 33.48, 'max_score': 291.589, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/Z0oWOUbuD9k/pics/Z0oWOUbuD9k291589.jpg'}, {'end': 407.021, 'src': 'embed', 'start': 378.912, 'weight': 6, 'content': [{'end': 383.353, 'text': 'This is how you can use the define function to declare a constant.', 'start': 378.912, 'duration': 4.441}, {'end': 390.516, 'text': 'Suppose you want to declare the value of pi as 3.14 throughout your PHP code.', 'start': 383.394, 'duration': 7.122}, {'end': 392.978, 'text': 'and which cannot be changed.', 'start': 391.198, 'duration': 1.78}, {'end': 395.979, 'text': 'So we can use define for that.', 'start': 393.418, 'duration': 2.561}, {'end': 403.28, 'text': 'Next question is related to this question, since what is constant function and useful in PHP, then?', 'start': 396.639, 'duration': 6.641}, {'end': 407.021, 'text': 'So constant function returns the value of a constant.', 'start': 403.76, 'duration': 3.261}], 'summary': 'Using define function to declare constant pi as 3.14 in php, constant function returns the value of a constant.', 'duration': 28.109, 'max_score': 378.912, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/Z0oWOUbuD9k/pics/Z0oWOUbuD9k378912.jpg'}, {'end': 458.754, 'src': 'embed', 'start': 429.065, 'weight': 2, 'content': [{'end': 438.493, 'text': 'so php only supports single level inheritance, which means a class can be extended from only one class using the keyword extended.', 'start': 429.065, 'duration': 9.428}, {'end': 442.757, 'text': 'next, what are the different types of loops in php?', 'start': 438.493, 'duration': 4.264}, {'end': 450.803, 'text': 'so php consists of a while loop, a do while loop, a for loop and finally a for each loop.', 'start': 442.757, 'duration': 8.046}, {'end': 453.747, 'text': 'So PHP consists of total four loops.', 'start': 450.983, 'duration': 2.764}, {'end': 458.754, 'text': 'Next question how to concatenate two strings in PHP?', 'start': 454.428, 'duration': 4.326}], 'summary': 'Php supports single level inheritance. it has four types of loops. concatenate two strings in php.', 'duration': 29.689, 'max_score': 429.065, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/Z0oWOUbuD9k/pics/Z0oWOUbuD9k429065.jpg'}], 'start': 94.273, 'title': 'Php language and basics', 'summary': "Discusses php's case sensitivity, covering variables, functions, and user defined functions. it also explains the eight different data types in php and the difference between echo and print. additionally, it covers php basics, including naming variables, frameworks, loops, and defining constants.", 'chapters': [{'end': 148.55, 'start': 94.273, 'title': 'Php language: case sensitivity and data types', 'summary': "Discusses php's case sensitivity, stating that variables are case sensitive while functions and user defined functions are not. it also covers the different data types in php, including integer, float, string, boolean, array, object, null, and resource, totaling eight different data types. additionally, it explains the difference between echo and print, highlighting that echo can output multiple strings at a time, while print can output only a single string.", 'duration': 54.277, 'highlights': ['PHP has partial case sensitivity: variables are case sensitive, while functions and user defined functions are not.', 'PHP has eight different data types: integer, float, string, boolean, array, object, null, and resource.', 'Echo can output multiple strings at a time, while print can output only a single string.']}, {'end': 508.268, 'start': 148.55, 'title': 'Php basics and syntax', 'summary': 'Covers php basics including the difference between echo and print, rules for naming variables, popular php frameworks, checking for null variables, passing objects by value, and various php functions. it also discusses inheritance, types of loops, concatenating strings, and defining constants in php.', 'duration': 359.718, 'highlights': ['PHP consists of total four loops including while, do while, for, and for each loops. There are four types of loops in PHP: while loop, do while loop, for loop, and for each loop.', 'Echo does not have a return value, while print always returns one, making echo faster than print. Echo is faster than print as it does not have to return a value, unlike print which is slower due to always returning a value.', 'Popular PHP frameworks include Symphony, CodeIgniter, CakePHP, and Laravel. Some popular PHP frameworks are Symphony, CodeIgniter, CakePHP, and Laravel.', "PHP only supports single level inheritance, meaning a class can be extended from only one class using the 'extended' keyword. PHP supports single level inheritance, allowing a class to be extended from only one class using the 'extended' keyword.", 'Define function is used to declare a constant in PHP, and the constant function returns the value of a constant. The define function is used to declare a constant in PHP, while the constant function returns the value of a constant.']}], 'duration': 413.995, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/Z0oWOUbuD9k/pics/Z0oWOUbuD9k94273.jpg', 'highlights': ['PHP has eight different data types: integer, float, string, boolean, array, object, null, and resource.', 'Echo can output multiple strings at a time, while print can output only a single string.', 'PHP consists of total four loops including while, do while, for, and for each loops.', 'Echo does not have a return value, while print always returns one, making echo faster than print.', 'Popular PHP frameworks include Symphony, CodeIgniter, CakePHP, and Laravel.', "PHP only supports single level inheritance, meaning a class can be extended from only one class using the 'extended' keyword.", 'Define function is used to declare a constant in PHP, and the constant function returns the value of a constant.', 'PHP has partial case sensitivity: variables are case sensitive, while functions and user defined functions are not.']}, {'end': 715.052, 'segs': [{'end': 539.897, 'src': 'embed', 'start': 508.788, 'weight': 0, 'content': [{'end': 512.89, 'text': 'What is the use of function num AR arguments?', 'start': 508.788, 'duration': 4.102}, {'end': 520.561, 'text': 'now, this function, as you can see is, is used to return the number of arguments passed in a function.', 'start': 512.89, 'duration': 7.671}, {'end': 528.926, 'text': 'so suppose you pass a certain number of arguments in a function and want to know how many values or arguments were passed.', 'start': 520.561, 'duration': 8.365}, {'end': 530.847, 'text': 'you can use this function for that.', 'start': 528.926, 'duration': 1.921}, {'end': 539.897, 'text': 'so suppose in this sample code you want to know how many arguments were passed in this sample function.', 'start': 530.847, 'duration': 9.05}], 'summary': 'Function num ar arguments returns number of arguments in a function.', 'duration': 31.109, 'max_score': 508.788, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/Z0oWOUbuD9k/pics/Z0oWOUbuD9k508788.jpg'}, {'end': 590.315, 'src': 'embed', 'start': 562.526, 'weight': 1, 'content': [{'end': 573.43, 'text': 'Now, some predefined variables in PHP are known as super global variables because they are always accessible from any function, file or class,', 'start': 562.526, 'duration': 10.904}, {'end': 574.47, 'text': 'regardless of the scope.', 'start': 573.43, 'duration': 1.04}, {'end': 578.731, 'text': 'So in all in all they are globally accessible.', 'start': 574.91, 'duration': 3.821}, {'end': 584.133, 'text': 'So suppose you write a piece of code and you declare a variable inside it,', 'start': 579.191, 'duration': 4.942}, {'end': 590.315, 'text': 'it would be a local variable and could be accessed only in that part of the code.', 'start': 584.133, 'duration': 6.182}], 'summary': 'Php has super global variables accessible from any part of the code.', 'duration': 27.789, 'max_score': 562.526, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/Z0oWOUbuD9k/pics/Z0oWOUbuD9k562526.jpg'}, {'end': 684.893, 'src': 'embed', 'start': 618.294, 'weight': 2, 'content': [{'end': 630.2, 'text': 'While in case of multi-line comments, you can use this hash star and write your comments in multiple lines and enclose it with a star and slash.', 'start': 618.294, 'duration': 11.906}, {'end': 639.345, 'text': "What I'm going to do now is I am going to show you the use of these comments in actual VS code.", 'start': 630.941, 'duration': 8.404}, {'end': 642.738, 'text': 'Now let us take this block of code for example.', 'start': 639.995, 'duration': 2.743}, {'end': 648.663, 'text': 'Now suppose you want to add a single line comment after this variable.', 'start': 643.278, 'duration': 5.385}, {'end': 653.488, 'text': 'So what you will do is you can use this double slash.', 'start': 649.104, 'duration': 4.384}, {'end': 658.933, 'text': 'This is a variable.', 'start': 654.488, 'duration': 4.445}, {'end': 662.836, 'text': 'Also you can use slash.', 'start': 660.294, 'duration': 2.542}, {'end': 667.704, 'text': 'This is also a variable.', 'start': 663.997, 'duration': 3.707}, {'end': 670.426, 'text': 'so this is a single line comment.', 'start': 667.704, 'duration': 2.722}, {'end': 680.21, 'text': 'now, if you try to write something else after this in the next line, it will take it as part of the code, not part of the comment.', 'start': 670.426, 'duration': 9.784}, {'end': 684.893, 'text': 'so what do you do when you need to write multiple lines of comment?', 'start': 680.21, 'duration': 4.683}], 'summary': 'Demonstration of single and multi-line comments in vs code.', 'duration': 66.599, 'max_score': 618.294, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/Z0oWOUbuD9k/pics/Z0oWOUbuD9k618294.jpg'}], 'start': 508.788, 'title': 'Php function and global variables', 'summary': 'Covers the num ar arguments function in php, super global variables such as global, server, request, post, get, files, env, cookie, and session, and the invocation of single line and multi-line comments in php.', 'chapters': [{'end': 617.814, 'start': 508.788, 'title': 'Php function and global variables', 'summary': 'Explains the purpose of the num ar arguments function in php, which returns the number of arguments passed in a function, and the concept of super global variables in php, such as global, server, request, post, get, files, env, cookie, and session, which are accessible from any function, file or class. it also discusses how to invoke single line and multi line comments in php.', 'duration': 109.026, 'highlights': ['The function num AR arguments returns the number of arguments passed in a function, providing a way to determine the quantity of values or arguments passed. number of arguments passed, 3', 'Super global variables in PHP, including global, server, request, post, get, files, env, cookie, and session, are always accessible from any function, file or class, making them globally accessible. super global variables', 'Explanation of single line and multi line comments in PHP using hash or double slash for single line comments, and multi line comments using forward slash and asterisk. comment types in PHP']}, {'end': 715.052, 'start': 618.294, 'title': 'Commenting in vs code', 'summary': 'Explains the use of single-line and multi-line comments in vs code, including the syntax for each, and their impact on the code structure and readability.', 'duration': 96.758, 'highlights': ['The use of single-line comments in VS code by using double slash for commenting after a variable.', 'The impact of adding a new line after a single-line comment, which is treated as part of the code, not the comment.', 'The process of writing multi-line comments in VS code by using slash star to begin and star slash to end, and its impact on code readability.']}], 'duration': 206.264, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/Z0oWOUbuD9k/pics/Z0oWOUbuD9k508788.jpg', 'highlights': ['The function num AR arguments returns the number of arguments passed in a function, providing a way to determine the quantity of values or arguments passed. number of arguments passed, 3', 'Super global variables in PHP, including global, server, request, post, get, files, env, cookie, and session, are always accessible from any function, file or class, making them globally accessible. super global variables', 'Explanation of single line and multi line comments in PHP using hash or double slash for single line comments, and multi line comments using forward slash and asterisk. comment types in PHP', 'The use of single-line comments in VS code by using double slash for commenting after a variable.', 'The impact of adding a new line after a single-line comment, which is treated as part of the code, not the comment.', 'The process of writing multi-line comments in VS code by using slash star to begin and star slash to end, and its impact on code readability.']}, {'end': 1060.668, 'segs': [{'end': 767.741, 'src': 'embed', 'start': 715.052, 'weight': 0, 'content': [{'end': 721.836, 'text': "now let's move on to the next question, that is, name some common applications of php.", 'start': 715.052, 'duration': 6.784}, {'end': 729.079, 'text': 'so some of the most commonly used php applications are system functions, firm handling.', 'start': 721.836, 'duration': 7.243}, {'end': 739.982, 'text': 'so php is very commonly used to handle the forms that you see on the web pages crud tasks now crud tasks are create, read, update and delete.', 'start': 729.079, 'duration': 10.903}, {'end': 747.064, 'text': 'so when you will be working with databases, this is a very important part of using databases.', 'start': 739.982, 'duration': 7.082}, {'end': 751.105, 'text': 'that is crud, and php is used very commonly in that.', 'start': 747.064, 'duration': 4.041}, {'end': 757.474, 'text': 'next, accessing cookies, variables and set keys and finally, data encryption.', 'start': 751.75, 'duration': 5.724}, {'end': 767.741, 'text': 'php provides security through some of its frameworks, which can be used and is used very commonly throughout a lot of websites.', 'start': 757.474, 'duration': 10.267}], 'summary': 'Common php applications include form handling, crud tasks, database operations, cookie access, and data encryption for website security.', 'duration': 52.689, 'max_score': 715.052, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/Z0oWOUbuD9k/pics/Z0oWOUbuD9k715052.jpg'}, {'end': 847.047, 'src': 'embed', 'start': 793.108, 'weight': 5, 'content': [{'end': 801.272, 'text': 'and inside the command line you have to specify the name of the script or name of the PHP file that you want to run.', 'start': 793.108, 'duration': 8.164}, {'end': 806.174, 'text': 'Suppose you want to run a php underscore script, dot php.', 'start': 801.852, 'duration': 4.322}, {'end': 816.092, 'text': 'so you type in the name The PHP script that you want to run and that particular PHP script will be executed.', 'start': 806.174, 'duration': 9.918}, {'end': 821.094, 'text': 'next, Differentiate between a dollar variable and double dollar variable.', 'start': 816.092, 'duration': 5.002}, {'end': 824.475, 'text': 'So what is the difference between the two?', 'start': 821.574, 'duration': 2.901}, {'end': 832.777, 'text': 'now, in case of a Single dollar variable, is, it is a simple variable that is simply used to store data.', 'start': 824.475, 'duration': 8.302}, {'end': 841.281, 'text': 'so, as we discussed earlier, It is a variable that we define to store different data types, that is, integer, float strings, etc.', 'start': 832.777, 'duration': 8.504}, {'end': 847.047, 'text': 'While a double dollar variable is a reference variable of variable.', 'start': 841.941, 'duration': 5.106}], 'summary': 'Specify php script name in command line and differentiate between single and double dollar variables.', 'duration': 53.939, 'max_score': 793.108, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/Z0oWOUbuD9k/pics/Z0oWOUbuD9k793108.jpg'}, {'end': 973.79, 'src': 'embed', 'start': 941.443, 'weight': 3, 'content': [{'end': 950.313, 'text': 'so the difference between them is get method sends data as part of php page url sorry,', 'start': 941.443, 'duration': 8.87}, {'end': 956.239, 'text': 'web page url while a post method sends data through http header.', 'start': 950.313, 'duration': 5.926}, {'end': 962.607, 'text': 'get the data, since the data has been sent through the URL.', 'start': 957.605, 'duration': 5.002}, {'end': 973.79, 'text': 'it is displayed in the URL of the web page, so it is not secure, while in case of post method it is a secure form of data transfer.', 'start': 962.607, 'duration': 11.183}], 'summary': 'Get method sends data in url, insecure; post method sends data through http header, secure.', 'duration': 32.347, 'max_score': 941.443, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/Z0oWOUbuD9k/pics/Z0oWOUbuD9k941443.jpg'}, {'end': 1030.983, 'src': 'embed', 'start': 1004.62, 'weight': 4, 'content': [{'end': 1012.33, 'text': 'What we need to do is we will create three different variables, that is, server name, username and password.', 'start': 1004.62, 'duration': 7.71}, {'end': 1022.598, 'text': "now what we're going to do is we will create another variable, con, that will be used to connect it, and then we'll use the mysqli functions,", 'start': 1012.33, 'duration': 10.268}, {'end': 1027.622, 'text': 'which will then pass these variables, to create a connection.', 'start': 1022.598, 'duration': 5.024}, {'end': 1030.983, 'text': 'so these variable values are localhost, username, password.', 'start': 1027.622, 'duration': 3.361}], 'summary': 'Creating three variables for server name, username, and password, then using mysqli functions to connect with values localhost, username, password.', 'duration': 26.363, 'max_score': 1004.62, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/Z0oWOUbuD9k/pics/Z0oWOUbuD9k1004620.jpg'}], 'start': 715.052, 'title': 'Php applications and interview questions', 'summary': 'Discusses common php applications such as system functions, form handling, crud tasks, and data encryption, widely used in web development and database management. it also covers advanced php interview questions including executing scripts from the command line, variable differentiation, and database connectivity.', 'chapters': [{'end': 767.741, 'start': 715.052, 'title': 'Common php applications', 'summary': 'Discusses the common applications of php, including system functions, form handling, crud tasks, accessing cookies and variables, setting keys, and data encryption, which are widely used in web development and database management.', 'duration': 52.689, 'highlights': ['PHP provides security through its frameworks, widely used in various websites.', 'PHP is commonly used for CRUD tasks, including create, read, update, and delete operations when working with databases.', 'PHP is commonly used for form handling on web pages.']}, {'end': 1060.668, 'start': 767.741, 'title': 'Advanced php interview questions', 'summary': 'Covers advanced php interview questions including executing a php script from the command line, differentiating between dollar and double dollar variables, differentiating between get and post methods, and connecting to a database using a php script.', 'duration': 292.927, 'highlights': ['Differentiating between get and post methods The get method sends data as part of the web page URL while the post method sends data through the HTTP header, making it a secure form of data transfer.', 'Connecting to a database using a PHP script Creating variables for server name, username, and password, using mysqli functions to establish a connection, and checking the connection status using an if condition.', 'Executing a PHP script from the command line Executing a PHP script by specifying the script name inside the command line, with a demonstration of running a PHP script.', 'Differentiating between a dollar variable and double dollar variable Explaining the difference between a single dollar variable used to store data and a double dollar variable used as a reference variable of a variable.']}], 'duration': 345.616, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/Z0oWOUbuD9k/pics/Z0oWOUbuD9k715052.jpg', 'highlights': ['PHP is commonly used for CRUD tasks, including create, read, update, and delete operations when working with databases.', 'PHP is commonly used for form handling on web pages.', 'PHP provides security through its frameworks, widely used in various websites.', 'Differentiating between get and post methods The get method sends data as part of the web page URL while the post method sends data through the HTTP header, making it a secure form of data transfer.', 'Connecting to a database using a PHP script Creating variables for server name, username, and password, using mysqli functions to establish a connection, and checking the connection status using an if condition.', 'Executing a PHP script from the command line Executing a PHP script by specifying the script name inside the command line, with a demonstration of running a PHP script.', 'Differentiating between a dollar variable and double dollar variable Explaining the difference between a single dollar variable used to store data and a double dollar variable used as a reference variable of a variable.']}, {'end': 1343.75, 'segs': [{'end': 1110.862, 'src': 'heatmap', 'start': 1060.828, 'weight': 0, 'content': [{'end': 1064.209, 'text': 'I have used localhost username and password for the default values.', 'start': 1060.828, 'duration': 3.381}, {'end': 1068.171, 'text': "You can use the name of the database that you're trying to connect your PHP script to.", 'start': 1064.229, 'duration': 3.942}, {'end': 1074.273, 'text': 'Next up, what does final class and final method mean in PHP?', 'start': 1068.911, 'duration': 5.362}, {'end': 1084.197, 'text': 'Now, a final class in PHP means that the class cannot be extended, while a final method means that it cannot be overridden.', 'start': 1075.013, 'duration': 9.184}, {'end': 1094.429, 'text': 'now, as you can see in this block of code, we have used the final keyword for a class and the final keyword for a function.', 'start': 1084.961, 'duration': 9.468}, {'end': 1101.394, 'text': 'now suppose this final class is being inherited by this child class.', 'start': 1094.429, 'duration': 6.965}, {'end': 1110.862, 'text': 'what the program will return is an error, because once you use this final keyword, this class cannot be inherited.', 'start': 1101.394, 'duration': 9.468}], 'summary': 'Using default localhost credentials, discussing final class and method in php.', 'duration': 50.034, 'max_score': 1060.828, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/Z0oWOUbuD9k/pics/Z0oWOUbuD9k1060828.jpg'}, {'end': 1226.412, 'src': 'embed', 'start': 1174.005, 'weight': 1, 'content': [{'end': 1179.528, 'text': 'now, if you want to use the same name of the function for a different purpose,', 'start': 1174.005, 'duration': 5.523}, {'end': 1184.63, 'text': 'what you can do is you can increase or change the number of parameters inside the function.', 'start': 1179.528, 'duration': 5.102}, {'end': 1187.392, 'text': 'that is, it now contains two parameters.', 'start': 1184.63, 'duration': 2.762}, {'end': 1196.376, 'text': 'so when this same function is called using two parameters, it will function differently and display function overloading.', 'start': 1187.392, 'duration': 8.984}, {'end': 1199.258, 'text': 'so this is how function overloading works.', 'start': 1196.376, 'duration': 2.882}, {'end': 1203.976, 'text': 'next, From this piece of code we can understand function overriding.', 'start': 1199.258, 'duration': 4.718}, {'end': 1214.584, 'text': 'Suppose you display a function demo in a base class and you want to override this demo function inside the derived class.', 'start': 1204.256, 'duration': 10.328}, {'end': 1223.07, 'text': 'so what you do is you make another function with the same name inside the derived class, with some different properties.', 'start': 1214.584, 'duration': 8.486}, {'end': 1226.412, 'text': 'as you can see, it displays something different.', 'start': 1223.07, 'duration': 3.342}], 'summary': 'Function overloading: using different parameters for the same function. function overriding: creating a function with the same name but different properties in the derived class.', 'duration': 52.407, 'max_score': 1174.005, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/Z0oWOUbuD9k/pics/Z0oWOUbuD9k1174005.jpg'}, {'end': 1315.63, 'src': 'embed', 'start': 1282.428, 'weight': 2, 'content': [{'end': 1292.01, 'text': 'It is generally used in case of conditional statements, while a triple equals to operator performs a type safe comparison,', 'start': 1282.428, 'duration': 9.582}, {'end': 1299.512, 'text': 'which means that it will only return true if both operands have the same type and the same value.', 'start': 1292.01, 'duration': 7.502}, {'end': 1304.265, 'text': 'you can understand this more with this piece of code.', 'start': 1301.004, 'duration': 3.261}, {'end': 1315.63, 'text': 'so suppose, in this case, since they both are equal, it will return true, while in this case they both have the same type.', 'start': 1304.265, 'duration': 11.365}], 'summary': 'Triple equals operator ensures type-safe comparison, returning true only if both operands have the same type and value.', 'duration': 33.202, 'max_score': 1282.428, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/Z0oWOUbuD9k/pics/Z0oWOUbuD9k1282428.jpg'}], 'start': 1060.828, 'title': 'Php function overloading and overriding', 'summary': 'Delves into the usage of the final keyword in php for preventing extension and overriding, along with explaining function overloading and overriding, including differentiation and examples, and comparison of double equal and triple equal operators.', 'chapters': [{'end': 1144.833, 'start': 1060.828, 'title': 'Php final keyword and function overloading vs overriding', 'summary': 'Discusses the usage of the final keyword in php to prevent extension and overriding of classes and methods, along with the differentiation between function overloading and overriding.', 'duration': 84.005, 'highlights': ['The final keyword in PHP can be used for classes and methods to prevent extension and overriding, ensuring that the class cannot be extended and the method cannot be overridden.', 'Function overloading in PHP refers to using the same function for different purposes based on the number of arguments, while function overriding involves using the same name and arguments to override a method.']}, {'end': 1343.75, 'start': 1144.833, 'title': 'Php function overloading and overriding', 'summary': 'Explains function overloading and overriding in php, showcasing the difference with an example and differentiating between double equal and triple equal operators.', 'duration': 198.917, 'highlights': ['Function Overloading allows using the same function name with different parameters, altering its behavior. Demonstrates how a function named show title can behave differently based on the number of parameters, showcasing function overloading.', 'Function Overriding involves creating a function with the same name in the derived class, with different properties, overriding the base class function. Explains the concept of function overriding, where a function named demo in the base class is overridden in the derived class, showcasing the use of different properties.', 'Differentiates between double equal and triple equal operators, explaining their use cases and behavior. Clarifies the difference between the double equal and triple equal operators, highlighting their use in checking value equality and type safe comparison.']}], 'duration': 282.922, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/Z0oWOUbuD9k/pics/Z0oWOUbuD9k1060828.jpg', 'highlights': ['The final keyword in PHP can be used for classes and methods to prevent extension and overriding, ensuring that the class cannot be extended and the method cannot be overridden.', 'Function Overriding involves creating a function with the same name in the derived class, with different properties, overriding the base class function. Explains the concept of function overriding, where a function named demo in the base class is overridden in the derived class, showcasing the use of different properties.', 'Differentiates between double equal and triple equal operators, explaining their use cases and behavior. Clarifies the difference between the double equal and triple equal operators, highlighting their use in checking value equality and type safe comparison.', 'Function Overloading allows using the same function name with different parameters, altering its behavior. Demonstrates how a function named show title can behave differently based on the number of parameters, showcasing function overloading.']}, {'end': 1658.265, 'segs': [{'end': 1452.316, 'src': 'embed', 'start': 1370.399, 'weight': 0, 'content': [{'end': 1375.861, 'text': 'with an uncaught exception, an exception can be thrown and caught within php.', 'start': 1370.399, 'duration': 5.462}, {'end': 1385.704, 'text': 'so what we do is we use this try and catch method to try the code and if an error occurs, we can catch.', 'start': 1375.861, 'duration': 9.843}, {'end': 1397.438, 'text': 'If an exception occurs, we can throw it and the catch function will catch the exception, and if we do not include the catch function,', 'start': 1386.485, 'duration': 10.953}, {'end': 1399.46, 'text': 'it will result in a fatal error.', 'start': 1397.438, 'duration': 2.022}, {'end': 1404.086, 'text': 'Next up, differentiate between require and include.', 'start': 1400.321, 'duration': 3.765}, {'end': 1406.011, 'text': 'now require.', 'start': 1404.75, 'duration': 1.261}, {'end': 1416.239, 'text': 'if a required file is not found, it will throw a fatal error and stop the code execution, while in case of include, if an essential file is not found,', 'start': 1406.011, 'duration': 10.228}, {'end': 1420.483, 'text': 'it will produce a warning and still execute the remaining scripts.', 'start': 1416.239, 'duration': 4.244}, {'end': 1424.306, 'text': 'so, as you can see, both of these include and require.', 'start': 1420.483, 'duration': 3.823}, {'end': 1429.69, 'text': 'i use in the exam same way, with different functions next up.', 'start': 1424.306, 'duration': 5.384}, {'end': 1432.192, 'text': 'explain different types of errors in php.', 'start': 1429.69, 'duration': 2.502}, {'end': 1436.073, 'text': 'Now, PHP consists of mainly three errors.', 'start': 1433.012, 'duration': 3.061}, {'end': 1439.473, 'text': 'Notice, warning and a fatal error.', 'start': 1436.473, 'duration': 3}, {'end': 1449.735, 'text': "Now notice is a non-critical error which means that something minor went wrong during execution and a lot of times you just don't pay attention to it.", 'start': 1440.073, 'duration': 9.662}, {'end': 1452.316, 'text': 'A warning is a critical error.', 'start': 1450.455, 'duration': 1.861}], 'summary': 'Using try and catch in php to handle exceptions, differentiate require and include, and explain types of errors in php.', 'duration': 81.917, 'max_score': 1370.399, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/Z0oWOUbuD9k/pics/Z0oWOUbuD9k1370399.jpg'}, {'end': 1531.038, 'src': 'embed', 'start': 1499.89, 'weight': 7, 'content': [{'end': 1506.614, 'text': 'Now in case of reference, the actual value is modified if the value passed inside the function is also modified.', 'start': 1499.89, 'duration': 6.724}, {'end': 1513.118, 'text': 'While in case of value, the value of the original value does not change.', 'start': 1507.094, 'duration': 6.024}, {'end': 1520.582, 'text': 'So this piece of code here is an example of how you can call a function by reference.', 'start': 1513.138, 'duration': 7.444}, {'end': 1531.038, 'text': 'Here as you can see this ampersand sign will call this function by reference and any changes made in the variables here will affect the original ones.', 'start': 1521.147, 'duration': 9.891}], 'summary': 'Calling a function by reference allows for modification of original values.', 'duration': 31.148, 'max_score': 1499.89, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/Z0oWOUbuD9k/pics/Z0oWOUbuD9k1499890.jpg'}, {'end': 1569.631, 'src': 'embed', 'start': 1543.147, 'weight': 5, 'content': [{'end': 1551.93, 'text': 'now, a singleton class in php is a class that can have only one object and hence provides only a single point of access.', 'start': 1543.147, 'duration': 8.783}, {'end': 1554.371, 'text': 'so in generally generally in class,', 'start': 1551.93, 'duration': 2.441}, {'end': 1563.575, 'text': 'you can create as many objects as you want and it will in turn create different access points into that block of code.', 'start': 1554.371, 'duration': 9.204}, {'end': 1569.631, 'text': 'so in a singleton class you can only create a single object, hence singleton.', 'start': 1563.575, 'duration': 6.056}], 'summary': 'Singleton class in php allows only one object for single point of access.', 'duration': 26.484, 'max_score': 1543.147, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/Z0oWOUbuD9k/pics/Z0oWOUbuD9k1543147.jpg'}, {'end': 1628.849, 'src': 'embed', 'start': 1600.856, 'weight': 6, 'content': [{'end': 1605.661, 'text': 'next question how to encrypt a password using php?', 'start': 1600.856, 'duration': 4.805}, {'end': 1609.946, 'text': 'so php can be used for encryption techniques.', 'start': 1605.661, 'duration': 4.285}, {'end': 1617.494, 'text': 'now, the password underscore hash function creates a hash password from the password string using hashing algorithm.', 'start': 1609.946, 'duration': 7.548}, {'end': 1626.647, 'text': 'So suppose you create a password string and enter your password as password at the rate 1, 2, 3 and you put it inside.', 'start': 1618.143, 'duration': 8.504}, {'end': 1628.849, 'text': 'the password has hash function.', 'start': 1626.647, 'duration': 2.202}], 'summary': 'Php can be used to encrypt passwords using the password_hash function.', 'duration': 27.993, 'max_score': 1600.856, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/Z0oWOUbuD9k/pics/Z0oWOUbuD9k1600856.jpg'}], 'start': 1343.75, 'title': 'Php exception & error handling', 'summary': 'Explains php exception handling with the try-catch method, highlighting the consequences of uncaught exceptions, and covers php error handling, singleton class creation, and password encryption, offering insights into their functionalities.', 'chapters': [{'end': 1399.46, 'start': 1343.75, 'title': 'Php exception handling', 'summary': 'Explains how exception handling works in php, highlighting the try-catch method and the consequences of uncaught exceptions, where an uncaught exception results in a php fatal error.', 'duration': 55.71, 'highlights': ['When an exception is thrown, code following the statement will not be executed and PHP will attempt to find the first matching catch block.', 'An uncaught exception results in a PHP fatal error.', 'Using the try and catch method allows for trying the code and catching errors, and not including the catch function results in a fatal error.']}, {'end': 1658.265, 'start': 1400.321, 'title': 'Php error handling & singleton class', 'summary': 'Covers the difference between require and include, types of errors in php, calling a function by reference, creating a singleton class in php, and encrypting a password using php, providing insights into their functionalities and implementations.', 'duration': 257.944, 'highlights': ['Difference between require and include Require throws a fatal error and stops code execution if the file is not found, while include produces a warning and continues execution, with potential impacts on code functionality.', 'Types of errors in PHP PHP consists of three main errors: Notice (non-critical), Warning (critical), and Fatal Error (results in termination of the code), each serving different purposes and requiring specific attention during code execution.', 'Calling a function by reference Using the ampersand sign, a function can be called by reference, allowing modifications to affect original variables, providing a mechanism for altering values within functions.', 'Creating a singleton class in PHP A singleton class in PHP restricts the creation of only one object, ensuring a single access point to the class, achieved by making the constructor function private and controlling the creation and access of instances.', 'Encrypting a password using PHP The password_hash function uses a hashing algorithm to create a secure, encrypted password, ensuring data security by generating a unique hash for each password and providing a mechanism for storing passwords in a secure manner.']}], 'duration': 314.515, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/Z0oWOUbuD9k/pics/Z0oWOUbuD9k1343750.jpg', 'highlights': ['An uncaught exception results in a PHP fatal error.', 'When an exception is thrown, code following the statement will not be executed and PHP will attempt to find the first matching catch block.', 'Using the try and catch method allows for trying the code and catching errors, and not including the catch function results in a fatal error.', 'Difference between require and include Require throws a fatal error and stops code execution if the file is not found, while include produces a warning and continues execution, with potential impacts on code functionality.', 'Types of errors in PHP PHP consists of three main errors: Notice (non-critical), Warning (critical), and Fatal Error (results in termination of the code), each serving different purposes and requiring specific attention during code execution.', 'Creating a singleton class in PHP A singleton class in PHP restricts the creation of only one object, ensuring a single access point to the class, achieved by making the constructor function private and controlling the creation and access of instances.', 'Encrypting a password using PHP The password_hash function uses a hashing algorithm to create a secure, encrypted password, ensuring data security by generating a unique hash for each password and providing a mechanism for storing passwords in a secure manner.', 'Calling a function by reference Using the ampersand sign, a function can be called by reference, allowing modifications to affect original variables, providing a mechanism for altering values within functions.']}, {'end': 2152.848, 'segs': [{'end': 1785.336, 'src': 'embed', 'start': 1659.105, 'weight': 4, 'content': [{'end': 1662.607, 'text': 'Mention different sorting functions for arrays in PHP.', 'start': 1659.105, 'duration': 3.502}, {'end': 1665.909, 'text': 'Now let us understand this question in the VS Code.', 'start': 1662.907, 'duration': 3.002}, {'end': 1674.126, 'text': 'So PHP consists of different sorting functions which you can use to sort an given array automatically.', 'start': 1666.44, 'duration': 7.686}, {'end': 1681.491, 'text': 'So if you want to sort an array in ascending order what you need to do is use this sort function.', 'start': 1674.586, 'duration': 6.905}, {'end': 1684.874, 'text': 'So it will sort this array in ascending order.', 'start': 1681.992, 'duration': 2.882}, {'end': 1690.238, 'text': 'Now if you want to sort it in descending order use rsort that is reverse sort.', 'start': 1685.374, 'duration': 4.864}, {'end': 1700.505, 'text': 'Similarly, suppose you want to sort an array in terms of value in ascending order, so you need to use a sort function.', 'start': 1690.978, 'duration': 9.527}, {'end': 1701.845, 'text': 'that is this.', 'start': 1700.505, 'duration': 1.34}, {'end': 1710.269, 'text': 'so, in terms of value, what in terms of value means is suppose, in a given array there are keys and values.', 'start': 1701.845, 'duration': 8.424}, {'end': 1716.892, 'text': 'so it will sort the array based on the values, that is this 22, 27 and 37.', 'start': 1710.269, 'duration': 6.623}, {'end': 1722.374, 'text': 'so the array will be the same, since the values are already sorted.', 'start': 1716.892, 'duration': 5.482}, {'end': 1735.199, 'text': 'now, if you want to sort the array in according to key, that is this you can use k sort, that is key sort function that is provided in php.', 'start': 1723.015, 'duration': 12.184}, {'end': 1742.381, 'text': 'so in case of key sort, what it does is it will sort the array in key.', 'start': 1735.199, 'duration': 7.182}, {'end': 1743.242, 'text': 'that is.', 'start': 1742.381, 'duration': 0.861}, {'end': 1750.764, 'text': 'the first one would be d, that is duke, second m map, and the third r, that is raw.', 'start': 1743.242, 'duration': 7.522}, {'end': 1763.45, 'text': 'Now, if you want to sort this array in descending order in terms of value, you use instead of a sort, you use a reverse sort.', 'start': 1751.562, 'duration': 11.888}, {'end': 1775.057, 'text': 'Similarly, if you want to sort an array in terms of key in descending, you use k instead of k sort, kr sort, that is k reverse sort.', 'start': 1764.05, 'duration': 11.007}, {'end': 1779.82, 'text': 'So, these are the different sorting functions that are inbuilt into PHP.', 'start': 1775.457, 'duration': 4.363}, {'end': 1780.881, 'text': 'Moving on.', 'start': 1780.441, 'duration': 0.44}, {'end': 1785.336, 'text': 'what will be the output of the following code?', 'start': 1781.994, 'duration': 3.342}], 'summary': 'The transcript discusses sorting functions for arrays in php, including sort, rsort, ksort, and krsort.', 'duration': 126.231, 'max_score': 1659.105, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/Z0oWOUbuD9k/pics/Z0oWOUbuD9k1659105.jpg'}, {'end': 1863.921, 'src': 'embed', 'start': 1840.615, 'weight': 2, 'content': [{'end': 1847.956, 'text': 'that is the value here, and again, since the value of b is already 2 1, it will again display 2 1.', 'start': 1840.615, 'duration': 7.341}, {'end': 1852.417, 'text': 'moving on, what are construct function and destruct function in php?', 'start': 1847.956, 'duration': 4.461}, {'end': 1863.921, 'text': 'So a constructor or construct function is automatically invoked when a new object of a class is created and then can be used to initialize value in class.', 'start': 1853.092, 'duration': 10.829}], 'summary': 'Value of b is 2 1, construct function initializes class values in php.', 'duration': 23.306, 'max_score': 1840.615, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/Z0oWOUbuD9k/pics/Z0oWOUbuD9k1840615.jpg'}, {'end': 1944.38, 'src': 'embed', 'start': 1920.948, 'weight': 3, 'content': [{'end': 1927.577, 'text': 'Now, PHP and JavaScript cannot directly interact with each other, since PHP is a server-side scripting language,', 'start': 1920.948, 'duration': 6.629}, {'end': 1930.301, 'text': 'while JavaScript is a client-side language.', 'start': 1927.577, 'duration': 2.724}, {'end': 1936.554, 'text': 'But there is a way that these two wonderful languages can interact with each other.', 'start': 1930.982, 'duration': 5.572}, {'end': 1944.38, 'text': 'So we can swap variables since PHP can produce JavaScript code to be implemented by the browser.', 'start': 1936.954, 'duration': 7.426}], 'summary': 'Php and javascript can interact by swapping variables and generating javascript code in php.', 'duration': 23.432, 'max_score': 1920.948, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/Z0oWOUbuD9k/pics/Z0oWOUbuD9k1920948.jpg'}, {'end': 1999.337, 'src': 'embed', 'start': 1974.273, 'weight': 1, 'content': [{'end': 1981.659, 'text': 'Now, during a function call, suppose, if arguments does not match the expected data type, the runtime will display an error,', 'start': 1974.273, 'duration': 7.386}, {'end': 1985.843, 'text': 'and that is a fatal error and the program will then terminate.', 'start': 1981.659, 'duration': 4.184}, {'end': 1990.947, 'text': 'Now in this code here what we are doing is we are type hinting.', 'start': 1986.403, 'duration': 4.544}, {'end': 1999.337, 'text': 'So this is, this code is for string type hinting and this code is for integer type hinting.', 'start': 1991.573, 'duration': 7.764}], 'summary': 'Type hinting in the code for string and integer data types to avoid fatal errors.', 'duration': 25.064, 'max_score': 1974.273, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/Z0oWOUbuD9k/pics/Z0oWOUbuD9k1974273.jpg'}, {'end': 2054.212, 'src': 'embed', 'start': 2029.035, 'weight': 0, 'content': [{'end': 2034.378, 'text': "So what you need to do is you need to write a class to solve the following question, which I'm going to say.", 'start': 2029.035, 'duration': 5.343}, {'end': 2037.7, 'text': 'So implement a class named basketball.', 'start': 2034.959, 'duration': 2.741}, {'end': 2039.501, 'text': 'We all like basketball, right?', 'start': 2038.281, 'duration': 1.22}, {'end': 2044.629, 'text': 'So implement a class named basketball with an attribute named baskets.', 'start': 2039.862, 'duration': 4.767}, {'end': 2054.212, 'text': 'so you have to create an attribute named baskets and initialize it to zero as the starting position, and then create a method named score.', 'start': 2044.629, 'duration': 9.583}], 'summary': "Write a class 'basketball' with attribute 'baskets' initialized to zero and method 'score'.", 'duration': 25.177, 'max_score': 2029.035, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/Z0oWOUbuD9k/pics/Z0oWOUbuD9k2029035.jpg'}], 'start': 1659.105, 'title': 'Php functions and interaction', 'summary': 'Covers sorting functions like sort, rsort, ksort, and krsort in php, along with php and javascript interaction, type hinting, and practical implementation of a basketball class.', 'chapters': [{'end': 1785.336, 'start': 1659.105, 'title': 'Sorting functions in php', 'summary': 'Explains different sorting functions in php including sort, rsort, ksort, and krsort to automatically sort arrays in ascending, descending order based on values and keys.', 'duration': 126.231, 'highlights': ['PHP consists of different sorting functions including sort, rsort, ksort, and krsort to automatically sort an array.', 'The sort function is used to sort an array in ascending order.', 'The rsort function is used to sort an array in descending order.', 'The ksort function is used to sort an array in ascending order based on values.', 'The krsort function is used to sort an array in descending order based on keys.']}, {'end': 2152.848, 'start': 1785.336, 'title': 'Php and javascript interaction', 'summary': 'Discusses the output of a given code, constructor and destructor functions in php, type hinting in php, and php and javascript interaction. it also provides an assignment to implement a basketball class.', 'duration': 367.512, 'highlights': ['The chapter explains how PHP and JavaScript can interact by producing JavaScript code from PHP, passing variables back to PHP via a URL, and the limitations due to PHP being a server-side and JavaScript being a client-side language.', 'The chapter details the constructor function in PHP, which is automatically invoked when a new object of a class is created, and the destruct function, which is automatically invoked when an object of a class is destructed, providing insights into their functionalities and usage.', 'The chapter provides information on type hinting in PHP, explaining its purpose to specify expected data types for function arguments, the consequence of mismatched data types, and examples of string and integer type hinting.', 'The chapter presents an assignment to write a class in PHP, specifically a basketball class, with an attribute named baskets and a method named score, explaining the process of initializing default properties using the construct function and increasing the number of baskets with the score method.']}], 'duration': 493.743, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/Z0oWOUbuD9k/pics/Z0oWOUbuD9k1659105.jpg', 'highlights': ['The chapter presents an assignment to write a class in PHP, specifically a basketball class, with an attribute named baskets and a method named score, explaining the process of initializing default properties using the construct function and increasing the number of baskets with the score method.', 'The chapter provides information on type hinting in PHP, explaining its purpose to specify expected data types for function arguments, the consequence of mismatched data types, and examples of string and integer type hinting.', 'The chapter details the constructor function in PHP, which is automatically invoked when a new object of a class is created, and the destruct function, which is automatically invoked when an object of a class is destructed, providing insights into their functionalities and usage.', 'The chapter explains how PHP and JavaScript can interact by producing JavaScript code from PHP, passing variables back to PHP via a URL, and the limitations due to PHP being a server-side and JavaScript being a client-side language.', 'PHP consists of different sorting functions including sort, rsort, ksort, and krsort to automatically sort an array.', 'The krsort function is used to sort an array in descending order based on keys.', 'The ksort function is used to sort an array in ascending order based on values.', 'The rsort function is used to sort an array in descending order.', 'The sort function is used to sort an array in ascending order.']}], 'highlights': ['PHP is a server-side scripting language embedded into HTML, used for dynamic web development, and works efficiently with almost 20 different databases such as MySQL, PostgreSQL, etc.', 'Sessions in PHP are used to store data for users under a unique id which can be then used across multiple web pages of a website.', 'PEAR in PHP stands for PHP Extension and Application Repository, serving as a framework and repository for reusable components containing code snippets and libraries.', 'The chapter covers frequently asked beginner and advanced PHP interview questions, including the definition of PHP, its compatibility with various databases, and the purpose of sessions and PEAR in PHP.', 'PHP has eight different data types: integer, float, string, boolean, array, object, null, and resource.', 'Echo can output multiple strings at a time, while print can output only a single string.', 'PHP consists of total four loops including while, do while, for, and for each loops.', 'Echo does not have a return value, while print always returns one, making echo faster than print.', 'Popular PHP frameworks include Symphony, CodeIgniter, CakePHP, and Laravel.', "PHP only supports single level inheritance, meaning a class can be extended from only one class using the 'extended' keyword.", 'The function num AR arguments returns the number of arguments passed in a function, providing a way to determine the quantity of values or arguments passed. number of arguments passed, 3', 'Super global variables in PHP, including global, server, request, post, get, files, env, cookie, and session, are always accessible from any function, file or class, making them globally accessible. super global variables', 'Explanation of single line and multi line comments in PHP using hash or double slash for single line comments, and multi line comments using forward slash and asterisk. comment types in PHP', 'The use of single-line comments in VS code by using double slash for commenting after a variable.', 'The impact of adding a new line after a single-line comment, which is treated as part of the code, not the comment.', 'The process of writing multi-line comments in VS code by using slash star to begin and star slash to end, and its impact on code readability.', 'PHP is commonly used for CRUD tasks, including create, read, update, and delete operations when working with databases.', 'PHP is commonly used for form handling on web pages.', 'PHP provides security through its frameworks, widely used in various websites.', 'Differentiating between get and post methods The get method sends data as part of the web page URL while the post method sends data through the HTTP header, making it a secure form of data transfer.', 'Connecting to a database using a PHP script Creating variables for server name, username, and password, using mysqli functions to establish a connection, and checking the connection status using an if condition.', 'Executing a PHP script from the command line Executing a PHP script by specifying the script name inside the command line, with a demonstration of running a PHP script.', 'Differentiating between a dollar variable and double dollar variable Explaining the difference between a single dollar variable used to store data and a double dollar variable used as a reference variable of a variable.', 'The final keyword in PHP can be used for classes and methods to prevent extension and overriding, ensuring that the class cannot be extended and the method cannot be overridden.', 'Function Overriding involves creating a function with the same name in the derived class, with different properties, overriding the base class function. Explains the concept of function overriding, where a function named demo in the base class is overridden in the derived class, showcasing the use of different properties.', 'Differentiates between double equal and triple equal operators, explaining their use cases and behavior. Clarifies the difference between the double equal and triple equal operators, highlighting their use in checking value equality and type safe comparison.', 'Function Overloading allows using the same function name with different parameters, altering its behavior. Demonstrates how a function named show title can behave differently based on the number of parameters, showcasing function overloading.', 'An uncaught exception results in a PHP fatal error.', 'When an exception is thrown, code following the statement will not be executed and PHP will attempt to find the first matching catch block.', 'Using the try and catch method allows for trying the code and catching errors, and not including the catch function results in a fatal error.', 'Difference between require and include Require throws a fatal error and stops code execution if the file is not found, while include produces a warning and continues execution, with potential impacts on code functionality.', 'Types of errors in PHP PHP consists of three main errors: Notice (non-critical), Warning (critical), and Fatal Error (results in termination of the code), each serving different purposes and requiring specific attention during code execution.', 'Creating a singleton class in PHP A singleton class in PHP restricts the creation of only one object, ensuring a single access point to the class, achieved by making the constructor function private and controlling the creation and access of instances.', 'Encrypting a password using PHP The password_hash function uses a hashing algorithm to create a secure, encrypted password, ensuring data security by generating a unique hash for each password and providing a mechanism for storing passwords in a secure manner.', 'Calling a function by reference Using the ampersand sign, a function can be called by reference, allowing modifications to affect original variables, providing a mechanism for altering values within functions.', 'The chapter presents an assignment to write a class in PHP, specifically a basketball class, with an attribute named baskets and a method named score, explaining the process of initializing default properties using the construct function and increasing the number of baskets with the score method.', 'The chapter provides information on type hinting in PHP, explaining its purpose to specify expected data types for function arguments, the consequence of mismatched data types, and examples of string and integer type hinting.', 'The chapter details the constructor function in PHP, which is automatically invoked when a new object of a class is created, and the destruct function, which is automatically invoked when an object of a class is destructed, providing insights into their functionalities and usage.', 'The chapter explains how PHP and JavaScript can interact by producing JavaScript code from PHP, passing variables back to PHP via a URL, and the limitations due to PHP being a server-side and JavaScript being a client-side language.', 'PHP consists of different sorting functions including sort, rsort, ksort, and krsort to automatically sort an array.', 'The krsort function is used to sort an array in descending order based on keys.', 'The ksort function is used to sort an array in ascending order based on values.', 'The rsort function is used to sort an array in descending order.', 'The sort function is used to sort an array in ascending order.']}