The document contains a 14 page questionnaire about PHP basics and fundamentals. It includes multiple choice and explanation questions about PHP syntax, variables, data types, operators, functions, arrays and more.
The first part contains 25 multiple choice questions testing knowledge of PHP basics like tags, syntax, variables, operators, functions, conditional and loop statements. The second part has 7 additional multiple choice questions focusing on built-in functions, arrays, filters and regular expressions. The third part asks to explain two tricky PHP code examples.
In summary, the document is a comprehensive skills assessment covering PHP fundamentals through multiple choice and explanation questions. It tests a wide range of PHP concepts and features to evaluate proficiency with the language.
KNX and zigbee presentation for IOT relpssusereadde9
The KNX Association was formed in 1999 through the merger of three European standards bodies promoting intelligent home and building systems. KNX uses a decentralized, OSI-compliant architecture to allow nodes to communicate without a central coordinator using the TP-1 twisted pair physical layer. Devices are defined by functional blocks and exchange data through group objects and service requests at the application layer, allowing for configuration and control of lighting, HVAC, security, and other building systems.
The document discusses GUI technologies in Python. It covers Tkinter, which is the standard GUI library in Python. Tkinter can be used to create desktop applications and provides widgets like labels, buttons, entries and frames. It also discusses how to create windows, add widgets, handle events and create a simple calculator application as an example.
HTML (Hypertext Markup Language) is used to create web pages. It uses tags to define headings, paragraphs, lists, links and other elements. Some key HTML tags are <html> <head> <title> <body> <h1>-<h6> <p> <ul> <ol> <li> <a> <img>. HTML pages can be written using a basic text editor and have the .html file extension. The browser interprets the HTML tags to display the structured page content.
FTP (File Transfer Protocol) is a standard network protocol used to transfer computer files between a client and server over a TCP/IP network. FTP uses TCP/IP to transfer files and allows users to exchange files between accounts, transfer files between accounts and desktop computers, or access online software archives. When transferring files, FTP facilitates either uploading files from a personal computer to a server or downloading files from a server to a personal computer.
This document discusses server-side scripting and provides examples using PHP. It introduces server-side scripting languages like PHP, ASP, and JSP that generate dynamic web pages using scripts interpreted by applications on the web server. It also describes basic PHP syntax including variables, conditional statements, loops and communicating with databases to store and retrieve information.
The document discusses the benefits and advantages of the Python programming language. Python is described as a high-level, easy to use language that can be used for general programming as well as mobile and web development. It has many advantages, such as being easy to learn and use, having a large standard library, and being cross-platform. Some disadvantages are that it requires more memory than languages like C/C++ and has limited database access.
Python Foundation – A programmer's introduction to Python concepts & styleKevlin Henney
This document provides an overview of a Python Foundation course that introduces Python concepts and programming style. The course covers Python history and culture, multi-paradigm programming in Python including procedural, modular, scripting, object-oriented and functional styles. It also covers Python syntax, logic and flow control, built-in data types, classes and objects. The course includes coding experiments, programming labs and homework assignments.
The document discusses HTML image syntax and attributes. It explains that the <img> tag is used to define images and contains attributes but no closing tag. The src attribute specifies the image URL and the alt attribute provides alternate text for images that cannot be displayed. It also discusses using the width, height, and style attributes or CSS properties to set the image size. Additional topics covered include image maps, background images, storing images in other folders, using images as links, and the <picture> element for different device images.
KNX and zigbee presentation for IOT relpssusereadde9
The KNX Association was formed in 1999 through the merger of three European standards bodies promoting intelligent home and building systems. KNX uses a decentralized, OSI-compliant architecture to allow nodes to communicate without a central coordinator using the TP-1 twisted pair physical layer. Devices are defined by functional blocks and exchange data through group objects and service requests at the application layer, allowing for configuration and control of lighting, HVAC, security, and other building systems.
The document discusses GUI technologies in Python. It covers Tkinter, which is the standard GUI library in Python. Tkinter can be used to create desktop applications and provides widgets like labels, buttons, entries and frames. It also discusses how to create windows, add widgets, handle events and create a simple calculator application as an example.
HTML (Hypertext Markup Language) is used to create web pages. It uses tags to define headings, paragraphs, lists, links and other elements. Some key HTML tags are <html> <head> <title> <body> <h1>-<h6> <p> <ul> <ol> <li> <a> <img>. HTML pages can be written using a basic text editor and have the .html file extension. The browser interprets the HTML tags to display the structured page content.
FTP (File Transfer Protocol) is a standard network protocol used to transfer computer files between a client and server over a TCP/IP network. FTP uses TCP/IP to transfer files and allows users to exchange files between accounts, transfer files between accounts and desktop computers, or access online software archives. When transferring files, FTP facilitates either uploading files from a personal computer to a server or downloading files from a server to a personal computer.
This document discusses server-side scripting and provides examples using PHP. It introduces server-side scripting languages like PHP, ASP, and JSP that generate dynamic web pages using scripts interpreted by applications on the web server. It also describes basic PHP syntax including variables, conditional statements, loops and communicating with databases to store and retrieve information.
The document discusses the benefits and advantages of the Python programming language. Python is described as a high-level, easy to use language that can be used for general programming as well as mobile and web development. It has many advantages, such as being easy to learn and use, having a large standard library, and being cross-platform. Some disadvantages are that it requires more memory than languages like C/C++ and has limited database access.
Python Foundation – A programmer's introduction to Python concepts & styleKevlin Henney
This document provides an overview of a Python Foundation course that introduces Python concepts and programming style. The course covers Python history and culture, multi-paradigm programming in Python including procedural, modular, scripting, object-oriented and functional styles. It also covers Python syntax, logic and flow control, built-in data types, classes and objects. The course includes coding experiments, programming labs and homework assignments.
The document discusses HTML image syntax and attributes. It explains that the <img> tag is used to define images and contains attributes but no closing tag. The src attribute specifies the image URL and the alt attribute provides alternate text for images that cannot be displayed. It also discusses using the width, height, and style attributes or CSS properties to set the image size. Additional topics covered include image maps, background images, storing images in other folders, using images as links, and the <picture> element for different device images.
Std 12 Computer Chapter 1 Creating Html Forms Using KompoZerNuzhat Memon
This document provides information on creating HTML forms using the KompoZer IDE. It discusses the key elements of forms such as the <form>, <input>, <textarea>, and <select> tags. It also describes common input field types like text, password, radio buttons, and checkboxes. Additionally, it outlines the interface and features of the KompoZer IDE for designing and laying out forms, including its toolbars, panes, and editing modes. Finally, it notes how background colors can be customized for forms created in KompoZer.
This presentation educates you about Python - GUI Programming(Tkinter), Tkinter Programming with syntaxe example, Tkinter Widgets with Operator & Description, Standard attributes.
For more topics stay tuned with learnbay.
Looking into the past - feature extraction from historic maps using Python, O...James Crone
Tutorial presentation providing an overview of extracting geospatial features from scanned historic maps in an automated fashion using Python, OpenCV and PostGIS.
This document discusses various topics related to computer networking including protocols, sockets, IP addresses, URLs, reading web page source code, downloading files from the internet, TCP/IP and UDP servers and clients, file servers and clients, two-way communication between servers and clients, and sending simple emails. It provides information on networking hardware and software, protocols like TCP/IP and UDP, socket programming, parsing URLs, creating servers and clients, and sending/receiving data over networks.
The document discusses code generation and register allocation techniques. It begins by describing register allocation and assignment approaches and their advantages and disadvantages. It then discusses various issues in register allocation like which values reside in registers and which register. It describes register allocation as an NP-hard problem and common heuristics like graph coloring. The rest of the document discusses specific strategies for register allocation like global register allocation, usage counts, and register allocation via graph coloring and interference graphs. It also discusses techniques like register spilling when there are not enough registers.
This slide consists of a short introduction to three address code generation, different types of three address code generation such as assignment statements, assignment instructions, copy statements, Unconditional, Conditional, param x call p, n, indexed and address & pointer assignment statements.
For visual animation is so funny wee may think its so easy to discover but it includes lot of difficulties. From this presentation the little part of animation which is also held in computer graphics and multimedia subject shows the types and ways in which animation performs.
This document provides a list of 20 frequently asked Python interview questions and their answers. Some of the key topics covered include what Python is, its advantages like being free and open source, PEP 8 coding style guidelines, memory management in Python using a private heap and garbage collector, namespaces, iterators, generators, slicing, dictionaries, and differences between Python 2.x and 3.x.
PHP is an open-source server-side scripting language used for web development. It was created by Rasmus Lerdorf in 1994. Some key points:
- PHP scripts are embedded into HTML pages and executed on the server side, with the output sent to the client. This allows PHP to generate dynamic web page content.
- PHP is free to use and runs on many platforms including Windows, Linux, and Mac. It is compatible with many databases like MySQL.
- The language syntax is loosely based on C and Java. Key constructs include variables, strings, arrays, functions, loops, conditional statements, and object-oriented capabilities.
- PHP files use .php extensions and code
What is Server? (Web Server vs Application Server)Amit Nirala
What is Server?
Primary functions of Computer Server?
Difference between Web Server And Application Server?
Web Server vs Application Server.
Why Application server is a superior Server?
Functions of Application Server?
Application Server in 3-tier Application Architecture?
Functions of Web Server?
Enterprise applications runs on Application Server or Web Server?
This document provides instructions for installing and using Code::Blocks, a free open source C++ IDE. It discusses downloading and installing Code::Blocks on Windows, Linux and Mac operating systems. It then demonstrates how to create and build a basic C++ console application project within Code::Blocks, edit and run the code, and debug programs using the integrated debugger. The document also provides tips on sharing projects between computers and includes an appendix with more detailed Linux and Mac installation instructions.
Python is an interpreted, object-oriented, high-level programming language with dynamic semantics. Its high-level built in data structures, combined with dynamic typing and dynamic binding, make it very attractive for Rapid Application Development, as well as for use as a scripting or glue language to connect existing components together. Python's simple, easy to learn syntax emphasizes readability and therefore reduces the cost of program maintenance. Python supports modules and packages, which encourages program modularity and code reuse. The Python interpreter and the extensive standard library are available in source or binary form without charge for all major platforms, and can be freely distributed.
This document describes a project to display rotating effects on a teapot using keyboard and mouse input in OpenGL. It includes:
1) An introduction describing the purpose of understanding rotation in OpenGL and the scope of modifying the rotation system without complications.
2) Details of the hardware and software requirements to run the program, including a Pentium 3 processor, OpenGL libraries, and Windows XP.
3) The implementation code in C++ that defines functions for drawing objects like walls and tables, and handles mouse/keyboard input to rotate the teapot and change the camera view.
4) Snapshots of the output showing the default view and perspective views along the X-axis obtained by using keyboard keys to
The document provides information about the Apache HTTP Server software. It discusses that Apache is notable for playing a key role in the growth of the World Wide Web. It is the most popular web server software, serving over half of all websites. The document then covers Apache's features, uses, performance capabilities, and how to install and configure it in Linux.
System software includes operating systems and utility programs. Operating systems control and manage computer hardware and allow other programs to run. They provide user interfaces like graphical user interfaces and perform functions like booting the computer and managing memory. Utility programs help maintain the computer by performing tasks like antivirus scanning. Application software helps users perform tasks and solve problems using programs like word processors and graphics software.
Cs8092 computer graphics and multimedia unit 5SIMONTHOMAS S
This document discusses multimedia authoring tools and techniques. It covers several topics:
1. Types of multimedia authoring tools including card/page based tools, icon based tools, and time based tools. Popular examples are discussed.
2. Key features and capabilities of authoring tools including editing, programming, interactivity, playback, delivery, and project organization.
3. Authoring system metaphors like hierarchical, flow control, and different technologies focused on like hypermedia.
4. Considerations for multimedia production, presentation, and automatic authoring. Professional development tools are also outlined.
The document discusses conditional statements in Java programming. It covers if statements, if-else statements, logical operators, and nested if statements. It explains how conditional statements allow programmers to make decisions in code based on boolean expressions evaluating to true or false. Examples are provided to demonstrate if statements, if-else statements, logical operators like && and ||, and the use of block statements with conditional logic.
This presentation introduces Java Applet and Java Graphics in detail with examples and finally using the concept of both applet and graphics code the analog clock project to depict how to use them in real life challenges and applications.
Std 12 Computer Chapter 1 Creating Html Forms Using KompoZerNuzhat Memon
This document provides information on creating HTML forms using the KompoZer IDE. It discusses the key elements of forms such as the <form>, <input>, <textarea>, and <select> tags. It also describes common input field types like text, password, radio buttons, and checkboxes. Additionally, it outlines the interface and features of the KompoZer IDE for designing and laying out forms, including its toolbars, panes, and editing modes. Finally, it notes how background colors can be customized for forms created in KompoZer.
This presentation educates you about Python - GUI Programming(Tkinter), Tkinter Programming with syntaxe example, Tkinter Widgets with Operator & Description, Standard attributes.
For more topics stay tuned with learnbay.
Looking into the past - feature extraction from historic maps using Python, O...James Crone
Tutorial presentation providing an overview of extracting geospatial features from scanned historic maps in an automated fashion using Python, OpenCV and PostGIS.
This document discusses various topics related to computer networking including protocols, sockets, IP addresses, URLs, reading web page source code, downloading files from the internet, TCP/IP and UDP servers and clients, file servers and clients, two-way communication between servers and clients, and sending simple emails. It provides information on networking hardware and software, protocols like TCP/IP and UDP, socket programming, parsing URLs, creating servers and clients, and sending/receiving data over networks.
The document discusses code generation and register allocation techniques. It begins by describing register allocation and assignment approaches and their advantages and disadvantages. It then discusses various issues in register allocation like which values reside in registers and which register. It describes register allocation as an NP-hard problem and common heuristics like graph coloring. The rest of the document discusses specific strategies for register allocation like global register allocation, usage counts, and register allocation via graph coloring and interference graphs. It also discusses techniques like register spilling when there are not enough registers.
This slide consists of a short introduction to three address code generation, different types of three address code generation such as assignment statements, assignment instructions, copy statements, Unconditional, Conditional, param x call p, n, indexed and address & pointer assignment statements.
For visual animation is so funny wee may think its so easy to discover but it includes lot of difficulties. From this presentation the little part of animation which is also held in computer graphics and multimedia subject shows the types and ways in which animation performs.
This document provides a list of 20 frequently asked Python interview questions and their answers. Some of the key topics covered include what Python is, its advantages like being free and open source, PEP 8 coding style guidelines, memory management in Python using a private heap and garbage collector, namespaces, iterators, generators, slicing, dictionaries, and differences between Python 2.x and 3.x.
PHP is an open-source server-side scripting language used for web development. It was created by Rasmus Lerdorf in 1994. Some key points:
- PHP scripts are embedded into HTML pages and executed on the server side, with the output sent to the client. This allows PHP to generate dynamic web page content.
- PHP is free to use and runs on many platforms including Windows, Linux, and Mac. It is compatible with many databases like MySQL.
- The language syntax is loosely based on C and Java. Key constructs include variables, strings, arrays, functions, loops, conditional statements, and object-oriented capabilities.
- PHP files use .php extensions and code
What is Server? (Web Server vs Application Server)Amit Nirala
What is Server?
Primary functions of Computer Server?
Difference between Web Server And Application Server?
Web Server vs Application Server.
Why Application server is a superior Server?
Functions of Application Server?
Application Server in 3-tier Application Architecture?
Functions of Web Server?
Enterprise applications runs on Application Server or Web Server?
This document provides instructions for installing and using Code::Blocks, a free open source C++ IDE. It discusses downloading and installing Code::Blocks on Windows, Linux and Mac operating systems. It then demonstrates how to create and build a basic C++ console application project within Code::Blocks, edit and run the code, and debug programs using the integrated debugger. The document also provides tips on sharing projects between computers and includes an appendix with more detailed Linux and Mac installation instructions.
Python is an interpreted, object-oriented, high-level programming language with dynamic semantics. Its high-level built in data structures, combined with dynamic typing and dynamic binding, make it very attractive for Rapid Application Development, as well as for use as a scripting or glue language to connect existing components together. Python's simple, easy to learn syntax emphasizes readability and therefore reduces the cost of program maintenance. Python supports modules and packages, which encourages program modularity and code reuse. The Python interpreter and the extensive standard library are available in source or binary form without charge for all major platforms, and can be freely distributed.
This document describes a project to display rotating effects on a teapot using keyboard and mouse input in OpenGL. It includes:
1) An introduction describing the purpose of understanding rotation in OpenGL and the scope of modifying the rotation system without complications.
2) Details of the hardware and software requirements to run the program, including a Pentium 3 processor, OpenGL libraries, and Windows XP.
3) The implementation code in C++ that defines functions for drawing objects like walls and tables, and handles mouse/keyboard input to rotate the teapot and change the camera view.
4) Snapshots of the output showing the default view and perspective views along the X-axis obtained by using keyboard keys to
The document provides information about the Apache HTTP Server software. It discusses that Apache is notable for playing a key role in the growth of the World Wide Web. It is the most popular web server software, serving over half of all websites. The document then covers Apache's features, uses, performance capabilities, and how to install and configure it in Linux.
System software includes operating systems and utility programs. Operating systems control and manage computer hardware and allow other programs to run. They provide user interfaces like graphical user interfaces and perform functions like booting the computer and managing memory. Utility programs help maintain the computer by performing tasks like antivirus scanning. Application software helps users perform tasks and solve problems using programs like word processors and graphics software.
Cs8092 computer graphics and multimedia unit 5SIMONTHOMAS S
This document discusses multimedia authoring tools and techniques. It covers several topics:
1. Types of multimedia authoring tools including card/page based tools, icon based tools, and time based tools. Popular examples are discussed.
2. Key features and capabilities of authoring tools including editing, programming, interactivity, playback, delivery, and project organization.
3. Authoring system metaphors like hierarchical, flow control, and different technologies focused on like hypermedia.
4. Considerations for multimedia production, presentation, and automatic authoring. Professional development tools are also outlined.
The document discusses conditional statements in Java programming. It covers if statements, if-else statements, logical operators, and nested if statements. It explains how conditional statements allow programmers to make decisions in code based on boolean expressions evaluating to true or false. Examples are provided to demonstrate if statements, if-else statements, logical operators like && and ||, and the use of block statements with conditional logic.
This presentation introduces Java Applet and Java Graphics in detail with examples and finally using the concept of both applet and graphics code the analog clock project to depict how to use them in real life challenges and applications.
TKP Java Notes for Teaching Kids ProgrammingLynn Langit
Java programming concepts covered in the document include:
- Declaring and assigning variables such as strings and integers
- Incrementing and decrementing variable values using shortcuts like += and ++
- Using for and foreach loops to repeat actions
- Defining getter and setter methods to access and change variable values
- Creating and calling methods to organize code into reusable blocks
- Using conditionals like if/else statements to check conditions
- Storing and accessing values in data structures like arrays, arraylists, and hashmaps
- Implementing event listeners to handle user interactions like mouse clicks
- Defining a main method that kicks off the program execution
Fal-e-Hafez (Omens of Hafez) Cards in Persian using JavaOXUS 20
This document describes an application called "Omens of Hafez Cards in Persian Using JAVA" that generates random quotes from the poems of Hafez. It discusses the concepts of File I/O, random number generation, and component orientation used to build the application interface. Code examples are provided to demonstrate reading and writing files, generating random numbers, reading input from the keyboard and files using Scanner, and setting component orientation. The application is implemented using classes like File, Random, Scanner and adjusts orientation using ComponentOrientation.
This document discusses object-oriented programming concepts like classes, objects, encapsulation, inheritance, polymorphism. It provides examples using a BankAccount class to demonstrate these concepts. A class defines attributes and behaviors for objects. Objects are instances of a class. Encapsulation hides implementation details and inheritance allows derived classes to extend existing classes. Polymorphism allows objects to take on different forms through inheritance. The instanceof operator is used to check an object's specific type.
Regular Expressions (Regex) is powerful and convenient to use for string manipulation i.e. matching and validation, extracting and capturing, modifying and substitution, etc. This presentation covers Regular Expression with real world examples and demos.
With Unicode you can program and accomplish many funny, cool and useful programs and tools as for instance, Abjad Calculator calculating the numerical value of letters derived from the Arabic alphabet through the use of the Abjad writing system, Bubble Text Generator to write letters in circle, Flip Text Generator to write letters upside down, Google Transliteration to convert English names to Persian/Arabic, etc.
Java Virtual Keyboard Using Robot, Toolkit and JToggleButton ClassesOXUS 20
A Virtual Keyboard is considered to be a component to use on computers without a real keyboard e.g. Touch Screen Computers and Smart Phones; where a mouse can utilize the keyboard functionalities and features.
In addition, Virtual Keyboard used for the following subjects: Foreign Character Sets, Touchscreen, Bypass Key Loggers, etc.
The document discusses various validation techniques using regular expressions in Java, including username validation, password validation, password strength checking, email validation, and image file extension validation. Regular expressions are used to validate inputs match common patterns for things like usernames containing 3-15 characters, passwords being a minimum length and containing uppercase, lowercase, numbers and symbols, email addresses having the correct format, and image file extensions being formats like jpg, png, etc. Code examples and demonstrations are provided for each validation technique.
Object Oriented Concept Static vs. Non StaticOXUS 20
Static is not the true intend of Object Oriented Design and Concept.
For instance, we turn a LAMP "off" it does not suppose to turn the LAMPS of the entire world goes "off".
To review computer basics, programs, and operating systems
To explore the relationship between Java and the World Wide Web
To distinguish the terms API, IDE, and JDK
To write a simple Java program
To display output on the console
To explain the basic syntax of a Java program
To create, compile, and run Java programs
(GUI) To display output using the JOptionPane output dialog boxes
This tutorial explains step by step writing a simple guessing game where the player guess the number selected by the computer and the goal is to introduce the power and usage of RANDOM as well as the how to benefit CURRENTTIMEMILLIS method of the System class in order to check how much it took the player guessing the correct number.
Web Design and Development Life Cycle and TechnologiesOXUS 20
This presentation is an introduction to the design, creation, and maintenance of web design and development life cycle and web technologies. With it, you will learn about the web technologies, the life cycle of developing an efficient website and web application and finally some web essentials questions will be provided and reviewed.
Create Splash Screen with Java Step by StepOXUS 20
This presentation guide you how to make a custom Splash Screen step by step using Java Programming. In addition, you will learn the concept and usage of Java Timer, Java Progress Bar and Window ...
This document discusses how to set up remote debugging of a Java application from Eclipse. It explains that the debugee (Java application) needs to be run with JDWP options to enable debugging, including suspending the application at startup. The debugger (Eclipse) then connects to the debug port to inspect and control the debugee. An example Java application is provided that toggles a button color when clicked, which can be remotely debugged from Eclipse.
Everything about Database JOINS and RelationshipsOXUS 20
Today, we continue our journey into the world of RDBMS (relational database management systems) and SQL (Structured Query Language).
In this presentation, you will understand about some key definitions and then you will learn how to work with multiple tables that have relationships with each other.
First, we will go covering some core concepts and key definitions, and then will begin working with JOINs queries in SQL.
The document discusses the final keyword in Java and provides examples of using final with variables, methods, and classes. It then summarizes abstract classes and interfaces in Java, including how to declare abstract classes and methods and how interfaces are used to achieve abstraction and multiple inheritance. The document also covers packages, access modifiers, encapsulation, and arrays in Java.
Java Virtual Keyboard Using Robot, Toolkit and JToggleButton ClassesAbdul Rahman Sherzad
A Virtual Keyboard is considered to be a component to use on computers without a real keyboard e.g. Touch Screen Computers and Smart Phones; where a mouse can utilize the keyboard functionalities and features.
In addition, Virtual Keyboard used for the following subjects: Foreign Character Sets, Touchscreen, Bypass Key Loggers, etc.
With Unicode you can program and accomplish many funny, cool and useful programs and tools as for instance, Abjad Calculator, Bubble Text Generator to write letters in circle, Flip Text Generator to write letters upside down, Google Transliteration to convert English names to Persian/Arabic, etc...
Jdbc Complete Notes by Java Training Center (Som Sir)Som Prakash Rai
This Jdbc (Java Database Connectivity) notes contains the complete indepth Explanation of JDBC by Som Prakash Rai Sir. This is the Running notes of java Training center ,(J.T.C Noida), www.jtcindia.org
This document discusses server-side web programming basics. It explains that web servers run programs and return their output in response to web requests. Server-side pages are written using languages like PHP, Java, Ruby, and Python. These languages allow pages to be dynamically generated based on user input or data queries. The document provides an overview of PHP syntax and features like variables, data types, operators, and control structures like if/else statements and loops.
The document provides an introduction and overview of PHP, including:
- PHP is a server-side scripting language used for web development and can be embedded into HTML. It is commonly used to manage dynamic content, databases, sessions, and build ecommerce sites.
- Common uses of PHP include handling forms, accessing and modifying database elements, setting and accessing cookies, and restricting user access to website pages.
- The document then covers PHP syntax, variables, operators, conditional statements, loops, and arrays to provide the basic building blocks of the language.
This document contains 20 questions and answers related to PHP interview questions. It covers topics like the differences between include and require, using constants, passing variables by reference, using object constructors, string formatting functions, and cryptographic hash functions like md5(), crc32(), and sha1(). The questions and answers provide explanations of PHP concepts and best practices.
The document discusses various PHP concepts like operators, comments, if/else statements, loops, functions etc. It provides code examples for each concept. Some key points covered are:
- PHP operators are used to perform operations on operands and can be categorized into arithmetic, bitwise, logical etc.
- Comments can be used to describe code or hide code and PHP supports single line and multi line comments.
- Control structures like if/else, switch are used to execute code conditionally based on tests.
- Loops like for, foreach, while, do-while are used to repeat code.
- Functions allow code reusability and can take arguments to pass input and return output. Functions can also use
This document provides an overview of PHP including:
- Basic PHP syntax like variables, data types, operators, and control structures
- Functions - both built-in and user-defined, including arguments and return values
- Loops - while, do-while, for, foreach
- Object-oriented concepts like classes, objects, constructors, inheritance
- Arrays - indexed, associative, and multidimensional
- Strings and math functions
- An introduction to abstraction and object-oriented programming principles in PHP
The document discusses various PHP programming concepts like variables, data types, operators, control structures, and functions. It provides code examples to demonstrate how to work with variables, different data types, operators, conditional statements, loops, and functions in PHP. Various PHP concepts covered include strings, arrays, objects, constants, arithmetic operators, comparison operators, if/else statements, switch statements, while loops, for loops, and functions.
The document provides an introduction to PHP, including:
- PHP is a scripting language originally designed for web pages and runs on most operating systems.
- PHP syntax is quite easy if familiar with C-type languages, and it is designed to output to browsers but can also create CLI apps.
- Variables, constants, naming conventions, data types, and basic control structures like if/else, while loops and foreach loops are discussed.
- Combining PHP with XHTML is covered, recommending using functions and an object-oriented approach.
- User input via forms is mentioned, linking to a resource on processing forms with PHP.
PHP is one of the simplest server-side languages out there, and it was designed primarily for web development. Learning PHP is good not only because it adds ...
This document discusses PHP functions and arrays. It defines PHP functions as reusable pieces of code that can take arguments and return values. There are built-in and user-defined functions. Arrays allow storing multiple values in a single variable. PHP supports indexed, associative, and multidimensional arrays. Indexed arrays use numeric indexes while associative arrays use named keys. Multidimensional arrays store arrays within other arrays, allowing representation of tabular data. Functions and arrays are fundamental PHP concepts that improve code reuse and organization.
This document provides an introduction to PHP, including an overview of server-side scripting, the basic PHP syntax, variables, operators, control structures like conditional statements and loops, and how PHP code is processed. It explains what PHP is, how it is widely used for building dynamic websites, and the basic components needed to develop PHP applications including a web server, PHP, and a database.
Php i basic chapter 3 (syahir chaer's conflicted copy 2013-04-22)Muhamad Al Imran
This document provides an introduction to PHP, including an overview of server-side scripting, how PHP code is processed, basic PHP syntax, variables, operators, control structures like conditional statements and loops, and other key PHP concepts. It explains what PHP is, how it is used to create dynamic web content, and some of the basic building blocks needed to get started with PHP programming.
Php i basic chapter 3 (afifah rosli's conflicted copy 2013-04-23)Muhamad Al Imran
This document provides an introduction to PHP, including an overview of server-side scripting, how PHP code is processed, basic PHP syntax, variables, operators, control structures like conditional statements and loops, and other key PHP concepts. It explains what PHP is, how it is used to create dynamic web content, and some of the basic building blocks needed to get started with PHP programming.
PHP Basics
This document provides an overview of PHP basics including comments, constants, data types, variables, output functions, superglobals, here documents, operators, and references. It discusses the syntax and usage of PHP comments, defines constants, lists the main data types, explains how to declare variables, compares print and echo output functions, outlines common superglobal variables, demonstrates here documents, and covers unary, arithmetic, assignment, comparison, logical, and ternary operators as well as references.
The document provides an introduction and tutorial on PHP (Hypertext Preprocessor), a programming language used for web development. It discusses what PHP is and what it can do, including generating dynamic page content and interacting with databases. It then covers PHP syntax, variables, data types, strings, arrays, operators, decision making with if/else statements, loops, functions, and collecting form data with the $_GET variable. The tutorial is intended to help readers build a base of fundamental PHP concepts and skills.
This document provides an introduction to PHP (Hypertext Preprocessor), which is a server-side scripting language used for web development. It discusses three-tiered websites, server-side scripting, and some key aspects of PHP including its history, basic syntax, variables, data types, functions, and conditional statements. PHP allows for dynamic content generation, computational processing, database access, and more on the server side to create interactive websites and web applications.
This document contains sample questions for the Zend Certification PHP 5 exam. It includes multiple choice questions testing PHP 5 language features and best practices related to topics like XML processing, database access, regular expressions, and security. The questions cover syntax, functions, patterns and other PHP concepts that could appear on the certification exam.
This document contains questions and answers about PHP. It discusses PHP variable names, data types, functions like include(), require(), echo and print, arrays, object oriented concepts like inheritance and constants. It also covers regular expressions, error handling, strings, files and directories.
This document provides instructions for Lab 4 of an information systems design course. The lab aims to build experience with fundamental PHP functions related to arrays, strings, and regular expressions. Students will modify PHP code snippets to work with multi-dimensional arrays, define and call functions, and perform string operations like searching and replacing text. The lab consists of 4 steps involving PHP code to demonstrate various PHP features and concepts.
This document provides instructions for Lab 4 of an information systems design course. The lab aims to build experience with fundamental PHP functions related to arrays, strings, and regular expressions. Students will modify PHP code snippets to work with multi-dimensional arrays, define and call functions, and perform string operations like searching and replacing text. The lab consists of 4 steps involving PHP code to demonstrate various language features like joining strings, defining functions, and using regular expressions.
This document contains 23 multiple choice questions related to C programming language concepts like variables, operators, loops, functions etc. Each question is followed by an explanation of the answer. Some key questions covered are:
- Variable scope and precedence of local vs global variables
- Pre-increment and post-increment operators
- Logical AND and OR operators
- Use of continue and break statements
- Maximum range of integer variables
- Output of programs using if-else, switch case and while loops
The document tests fundamental C programming concepts and provides explanations that help in understanding the underlying logic behind each question. It can be used to assess knowledge of basic C programming principles.
Similar to PHP Basic and Fundamental Questions and Answers with Detail Explanation (20)
Array Basics
Copying Arrays
Passing Arrays to Methods
Returning an Array from a Method
(Optional) Variable-Length Argument Lists
The Arrays Class
Two-Dimensional Arrays
(Optional) Multidimensional Arrays
The document discusses Java methods, including creating and calling methods, passing parameters, overloading methods, and method abstraction. It provides examples of void and non-void methods. Key points covered include defining method headers and bodies, passing arguments by value, variable scope, and using built-in Math class methods like random, min, max, and trigonometric functions.
Fundamentals of Database Systems Questions and AnswersOXUS 20
Fundamentals of Database Systems questions and answers with explanation for fresher's and experienced for interview, competitive examination and entrance test.
The document discusses GUI event handling in Java. It explains that window-based Java programs are event-driven, meaning they wait for and respond to user-initiated events like button clicks or key presses. When an event occurs, an event object is passed to a listener object that handles the event. Listeners implement interfaces that correspond to different event types, like ActionListener for button clicks. The delegation event model in Java handles event passing from components to listeners.
Java GUI PART II is the continues of JAVA GUI PART I covering and discussing the GUI components as well as the different available Layout Managers which is available in JAVA and you can find dedicated example for each Layout Managers …
A Graphical User Interface (GUI) is a user interface based on graphics i.e. icons, pictures, menus, etc. instead of just plain text, it uses a mouse as well as a keyboard as an input device.
GUI applications enable the users (especially naive ones) to interact with a system easily and friendly. This presentation is meant for the individual who has little or no experience in Java GUI programming.
JAVA Programming Questions and Answers PART IIIOXUS 20
Oxus20 is a non-profit organization aimed at improving education by providing training and assistance to IT and computer science professionals. The name Oxus20 comes from the Amu Darya river, the largest river in Central Asia, which represents the hidden talents that the organization aims to develop. The organization seeks to create an environment conducive to nurturing talent and creativity among students and researchers, institutionalize extra-curricular scientific activities, identify gifted individuals to involve in advancing the scientific community, and produce specialized publications to disseminate modern science and technology in society.
This presentation was provided by Rebecca Benner, Ph.D., of the American Society of Anesthesiologists, for the second session of NISO's 2024 Training Series "DEIA in the Scholarly Landscape." Session Two: 'Expanding Pathways to Publishing Careers,' was held June 13, 2024.
Walmart Business+ and Spark Good for Nonprofits.pdfTechSoup
"Learn about all the ways Walmart supports nonprofit organizations.
You will hear from Liz Willett, the Head of Nonprofits, and hear about what Walmart is doing to help nonprofits, including Walmart Business and Spark Good. Walmart Business+ is a new offer for nonprofits that offers discounts and also streamlines nonprofits order and expense tracking, saving time and money.
The webinar may also give some examples on how nonprofits can best leverage Walmart Business+.
The event will cover the following::
Walmart Business + (https://business.walmart.com/plus) is a new shopping experience for nonprofits, schools, and local business customers that connects an exclusive online shopping experience to stores. Benefits include free delivery and shipping, a 'Spend Analytics” feature, special discounts, deals and tax-exempt shopping.
Special TechSoup offer for a free 180 days membership, and up to $150 in discounts on eligible orders.
Spark Good (walmart.com/sparkgood) is a charitable platform that enables nonprofits to receive donations directly from customers and associates.
Answers about how you can do more with Walmart!"
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UPRAHUL
This Dissertation explores the particular circumstances of Mirzapur, a region located in the
core of India. Mirzapur, with its varied terrains and abundant biodiversity, offers an optimal
environment for investigating the changes in vegetation cover dynamics. Our study utilizes
advanced technologies such as GIS (Geographic Information Systems) and Remote sensing to
analyze the transformations that have taken place over the course of a decade.
The complex relationship between human activities and the environment has been the focus
of extensive research and worry. As the global community grapples with swift urbanization,
population expansion, and economic progress, the effects on natural ecosystems are becoming
more evident. A crucial element of this impact is the alteration of vegetation cover, which plays a
significant role in maintaining the ecological equilibrium of our planet.Land serves as the foundation for all human activities and provides the necessary materials for
these activities. As the most crucial natural resource, its utilization by humans results in different
'Land uses,' which are determined by both human activities and the physical characteristics of the
land.
The utilization of land is impacted by human needs and environmental factors. In countries
like India, rapid population growth and the emphasis on extensive resource exploitation can lead
to significant land degradation, adversely affecting the region's land cover.
Therefore, human intervention has significantly influenced land use patterns over many
centuries, evolving its structure over time and space. In the present era, these changes have
accelerated due to factors such as agriculture and urbanization. Information regarding land use and
cover is essential for various planning and management tasks related to the Earth's surface,
providing crucial environmental data for scientific, resource management, policy purposes, and
diverse human activities.
Accurate understanding of land use and cover is imperative for the development planning
of any area. Consequently, a wide range of professionals, including earth system scientists, land
and water managers, and urban planners, are interested in obtaining data on land use and cover
changes, conversion trends, and other related patterns. The spatial dimensions of land use and
cover support policymakers and scientists in making well-informed decisions, as alterations in
these patterns indicate shifts in economic and social conditions. Monitoring such changes with the
help of Advanced technologies like Remote Sensing and Geographic Information Systems is
crucial for coordinated efforts across different administrative levels. Advanced technologies like
Remote Sensing and Geographic Information Systems
9
Changes in vegetation cover refer to variations in the distribution, composition, and overall
structure of plant communities across different temporal and spatial scales. These changes can
occur natural.
Leveraging Generative AI to Drive Nonprofit InnovationTechSoup
In this webinar, participants learned how to utilize Generative AI to streamline operations and elevate member engagement. Amazon Web Service experts provided a customer specific use cases and dived into low/no-code tools that are quick and easy to deploy through Amazon Web Service (AWS.)
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptxEduSkills OECD
Iván Bornacelly, Policy Analyst at the OECD Centre for Skills, OECD, presents at the webinar 'Tackling job market gaps with a skills-first approach' on 12 June 2024
This document provides an overview of wound healing, its functions, stages, mechanisms, factors affecting it, and complications.
A wound is a break in the integrity of the skin or tissues, which may be associated with disruption of the structure and function.
Healing is the body’s response to injury in an attempt to restore normal structure and functions.
Healing can occur in two ways: Regeneration and Repair
There are 4 phases of wound healing: hemostasis, inflammation, proliferation, and remodeling. This document also describes the mechanism of wound healing. Factors that affect healing include infection, uncontrolled diabetes, poor nutrition, age, anemia, the presence of foreign bodies, etc.
Complications of wound healing like infection, hyperpigmentation of scar, contractures, and keloid formation.
Level 3 NCEA - NZ: A Nation In the Making 1872 - 1900 SML.pptHenry Hollis
The History of NZ 1870-1900.
Making of a Nation.
From the NZ Wars to Liberals,
Richard Seddon, George Grey,
Social Laboratory, New Zealand,
Confiscations, Kotahitanga, Kingitanga, Parliament, Suffrage, Repudiation, Economic Change, Agriculture, Gold Mining, Timber, Flax, Sheep, Dairying,
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...PECB
Denis is a dynamic and results-driven Chief Information Officer (CIO) with a distinguished career spanning information systems analysis and technical project management. With a proven track record of spearheading the design and delivery of cutting-edge Information Management solutions, he has consistently elevated business operations, streamlined reporting functions, and maximized process efficiency.
Certified as an ISO/IEC 27001: Information Security Management Systems (ISMS) Lead Implementer, Data Protection Officer, and Cyber Risks Analyst, Denis brings a heightened focus on data security, privacy, and cyber resilience to every endeavor.
His expertise extends across a diverse spectrum of reporting, database, and web development applications, underpinned by an exceptional grasp of data storage and virtualization technologies. His proficiency in application testing, database administration, and data cleansing ensures seamless execution of complex projects.
What sets Denis apart is his comprehensive understanding of Business and Systems Analysis technologies, honed through involvement in all phases of the Software Development Lifecycle (SDLC). From meticulous requirements gathering to precise analysis, innovative design, rigorous development, thorough testing, and successful implementation, he has consistently delivered exceptional results.
Throughout his career, he has taken on multifaceted roles, from leading technical project management teams to owning solutions that drive operational excellence. His conscientious and proactive approach is unwavering, whether he is working independently or collaboratively within a team. His ability to connect with colleagues on a personal level underscores his commitment to fostering a harmonious and productive workplace environment.
Date: May 29, 2024
Tags: Information Security, ISO/IEC 27001, ISO/IEC 42001, Artificial Intelligence, GDPR
-------------------------------------------------------------------------------
Find out more about ISO training and certification services
Training: ISO/IEC 27001 Information Security Management System - EN | PECB
ISO/IEC 42001 Artificial Intelligence Management System - EN | PECB
General Data Protection Regulation (GDPR) - Training Courses - EN | PECB
Webinars: https://pecb.com/webinars
Article: https://pecb.com/article
-------------------------------------------------------------------------------
For more information about PECB:
Website: https://pecb.com/
LinkedIn: https://www.linkedin.com/company/pecb/
Facebook: https://www.facebook.com/PECBInternational/
Slideshare: http://www.slideshare.net/PECBCERTIFICATION
How to Setup Warehouse & Location in Odoo 17 InventoryCeline George
In this slide, we'll explore how to set up warehouses and locations in Odoo 17 Inventory. This will help us manage our stock effectively, track inventory levels, and streamline warehouse operations.
PHP Basic and Fundamental Questions and Answers with Detail Explanation
1. PHP Basic and Fundamental Questions and Answers with Detail Explanation
Page 1 of 14
PART I - Multiple choice questions focuses on PHP basics and
fundamentals:
1. PHP files have a default file extension of...
A. .html
B. .xml
C. .php
D. .ph
2. A PHP script should start with ... and end with ...
A. <php >
B. <? php ?>
C. <? ?>
D. <?php ?>
Description:
<?php ?> The standard opening and closing tags
<? ?> In addition PHP also allows for short open tag and can be enabled
and disabled targeting --enable-short-tags option in the PHP configuration
file php.ini. This is method is not recommended since it is only available if
enabled!
3. Which of the following must be installed on your computer to run and
test PHP script?
A. Adobe Dreamweaver
B. PHP
C. Apache
D. Notepad++
E. All of the mentioned.
Description: To test and run PHP script it is required to have PHP and a web server
installed and configured.
2. PHP Basic and Fundamental Questions and Answers with Detail Explanation
Page 2 of 14
4. We can use ... to comment a single line?
A. /?
B. //
C. #
D. /* */
E. All of the mentioned.
Description: # and // are used and recommended for single line comment, and /* */
can also be used to comment either a single line or multi line.
5. Which of the following PHP statement will store 125 in variable
number?
A. int $number = 125;
B. int number = 125;
C. $number = 125;
D. 125 = $number;
Description: PHP is not a strong typed language like C and Java, therefore, no need
not specify the datatype during variable declaration and initialization.
6. What will be the output of the following PHP code?
<?php
$a = 1;
$b = 2;
echo $a . "+". $b;
?>
A. 3
B. 1+2
C. 1.+.2
D. Error
Description: The dot (.) operator is used to concatenate two or more parts together.
3. PHP Basic and Fundamental Questions and Answers with Detail Explanation
Page 3 of 14
7. What will be the output of the following PHP code?
<?php
$a = "1";
$b = "2";
echo $a + $b;
?>
A. 3
B. 1+2
C. Error
D. 12
Description: The + operator in PHP is used for mathematical operations; therefore,
the numbers inside the double quotes during the calculation are considered and
parsed as integers and not string.
8. Which of following variables are valid and can be assigned a value
to it?
A. $3hello
B. $_hello
C. $this
D. $This
E. All of the mentioned
Description: Similar as other languages such as Java, C and C++ a variable can't
start with a number in general. The $this is a reference to the current object, and it
is the way to reference an instance of a class from within itself and most commonly
used in object oriented. PHP is a Case Sensitive language, therefore, $This is a valid
variable name.
4. PHP Basic and Fundamental Questions and Answers with Detail Explanation
Page 4 of 14
9. What will be the output of the following code?
<?php
$name = 'Abdul Rahman';
$anotherName = &$name;
$anotherName = "My name is $anotherName";
echo $anotherName . " " . $name;
?>
A. Error
B. My name is Abdul Rahman Abdul Rahman
C. My name is Abdul Rahman My name is Abdul Rahman
D. My name is Abdul Rahman Abdul Rahman
Description: The statement $anotherName = &$name; will assign the reference and
address of variable $name to $anotherName. This means any modification and
changes to the variable $name will impact $anotherName.
10. What will be the output of the following PHP code?
<?php
$colors = "Red, Green, Blue";
echo $colors[2];
?>
A. Blue
B. Error
C. d
D. Green
Description: PHP treats strings same as arrays, allowing for specific characters to be
accessed via array offset notation. Therefore, index 0 will print character "R", index 1
will print character "e", and index 2 will print character "d".
5. PHP Basic and Fundamental Questions and Answers with Detail Explanation
Page 5 of 14
11. What will be the output of the following PHP code?
<?php
$total = "25 students";
$more = 10;
$total = $total + $more;
echo "$total";
?>
A. Error
B. 35 students
C. 35
D. 25 students 10
Description: The + operator in PHP is used for arithmetic operations, therefore, the
value "25" at the beginning of the original $total string is parsed as integer.
However if it begins with anything but a numerical value, the parse result will be
value 0.
12. Which of the below statements is equivalent to $add += $add?
A. $add = $add
B. $add = $add +$add
C. $add = $add + 1
D. $add = $add + $add + 1
Description: The += is shortcut assignment for addition operation, for example, a
+= b is equivalent to a = a + b. The same can be done with subtraction,
multiplication, division, modulus, etc.
13. Which statement will output $name on the screen?
A. echo "$name";
B. echo "$$name";
C. echo "/$name";
D. echo "$name;";
Description: The $ is used to escape the dollar sign ($), therefore, the $name is
treated as a normal string character.
6. PHP Basic and Fundamental Questions and Answers with Detail Explanation
Page 6 of 14
14. What will be the output of the following code?
<?php
function track() {
static $count = 0;
$count++;
echo $count;
}
track();
track();
track();
?>
A. 123
B. 111
C. 000
D. 012
Description: The static retains its previous value each time the function is called.
Therefore, it makes the function remember the value of the given variable ($count in
the above example) between multiple calls.
15. What will be the output of the following PHP code?
<?php
$name = "Abdul Rahman";
$name .= " Sherzad";
echo $name;
?>
A. Abdul Rahman
B. true
C. false
D. Abdul Rahman Sherzad
Description: The (.=) is a shortcut assignment for concatenation operation. Hence,
the $name equals its current value concatenated with the string " Sherzad".
The statement $name .= " Sherzad"; is equivalent to $name = $name . " Sherzad";
7. PHP Basic and Fundamental Questions and Answers with Detail Explanation
Page 7 of 14
16. What will be the output of the following PHP code?
<?php
$a = 5;
$b = 5;
echo ($a === $b);
?>
A. 5 === 5
B. Error
C. 1
D. False
Description: The == operator compares the values of variables for equality and type
casting as necessary. But the === operator checks if the two variables are of the
same type AND have the same value. Hence, variable $a, and variable $b, both are
integers and have same value it prints 1.
17. What will be the output of the following PHP code?
<?php
$age = 10;
echo 'What is his age? n He is $age years old';
?>
A. What is his age? n He is $age years old
B. What is his age?
He is $age years old
C. What is his age? He is 10 years old
D. What is his age?
He is 10 years old
Description: The escape sequence characters and variables when are enclosed
within single quotes '' will not be interpreted when the string is parsed!
8. PHP Basic and Fundamental Questions and Answers with Detail Explanation
Page 8 of 14
18. Which of the below symbols is a newline character?
A. r
B. n
C. /n
D. /r
Description: The n escape character in PHP and other most programming
languages is treated as newline character.
19. Which of the conditional statements is/are supported by PHP?
A. if statements
B. if-else statements
C. if-elseif statements
D. switch statements
E. A), B) and C)
F. B), C) and D)
G. All of the mentioned.
Description: PHP supports all the mentioned conditional statements.
20. Which of the looping statements is/are supported by PHP?
A. for loop
B. while loop
C. do-while loop
D. foreach loop
E. A) and B)
F. A), B) and C)
G. All of the mentioned
H. None of the mentioned
Description: PHP supports advanced foreach loop along with other mentioned
common loop statements.
9. PHP Basic and Fundamental Questions and Answers with Detail Explanation
Page 9 of 14
21. What will be the output of the following PHP code?
<?php
$today = "Monday";
switch ($today) {
case "Saturday":
echo "Beginning of the week. ";
case "Monday":
echo "Middle of the week. ";
case "Thursday":
echo "End of the week. ";
}
?>
A. Error
B. Beginning of the week.
C. Middle of the week.
D. Middle of the week. End of the week.
E. End of the week.
Description: When the break statement is not present, all subsequent case blocks
will execute until a break statement is found.
22. What will be returned when the following PHP code is executed?
<?php
$a = 12;
echo ($a == 12) ? 5 : 1;
?>
A. 12
B. 1
C. Error
D. 5
Description: The above PHP segment used ternary operator. If condition is true then
the part just after the ? operator is executed otherwise the part after : operator.
10. PHP Basic and Fundamental Questions and Answers with Detail Explanation
Page 10 of 14
23. What will be the output of the following PHP code?
<?php
$users = array("absherzad", "salam", "sattar", "wahid");
for ($x=0; $x < count($users); $x++) {
if ($users[$x] == "absherzad") continue;
echo $users[$x] . " ";
}
?>
A. absherzad
B. salam sattar
C. absherzad salam sattar
D. salam sattar wahid
Description: The continue statement works opposite of break statement, thus,
causes execution of the current loop iteration to end and start at the beginning of
the next iteration.
24. What is the value of $a and $b after the function call?
<?php
function doSomething( &$arg ) {
$return = $arg;
$arg += 1;
return $return;
}
$a = 3;
$b = doSomething( $a );
echo "$a<br>$b";
?>
A. a is 3 and b is 4.
B. a is 4 and b is 3.
C. Both are 3.
D. Both are 4.
Description: Because $arg is passed by reference the variable $a is 4, on the other
hand, because the return value of the function is a copy of the initial value of the
$arg the variable $b is 3.
11. PHP Basic and Fundamental Questions and Answers with Detail Explanation
Page 11 of 14
25. Who is the father of PHP?
A. Rasmus Lerdorf
B. Willam Makepiece
C. Drek Kolkevi
D. List Barely
PART II – Multiple choice questions focuses on PHP built-in functions,
arrays, filters, regular expression, and file systems:
1. Which one of the following PHP functions can be used to find files?
A. glob()
B. file()
C. fold()
D. get_file()
Description: The glob() function in PHP searches for all the files based on the
matching pattern passed to it, as an example, glob("*.txt") searches all the text files
in the current directory.
2. Which of the following are correct ways of creating an array?
A. state[0] = "West Zone";
B. $state[] = array("West Zone");
C. $state[0] = " West Zone";
D. $state = array("West Zone");
Description: option (A) is not correct because in PHP a variable name must start
with $ symbol. Option (B) is not correct because the square brackets [] are not valid
characters in a variable name.
12. PHP Basic and Fundamental Questions and Answers with Detail Explanation
Page 12 of 14
3. What will be the output of the following PHP code?
<?php
$fruits = array ("apple", "orange", array ("pear", "mango"),
"banana");
echo (count($fruits, 1));
?>
A. 3
B. 4
C. 5
D. 6
Description: The echo (count($fruits)); statement does not count the items of the
multidimensional arrays, therefore, it prints 4. If the second optional mode
parameter is set to 1, the count() function will recursively count the array, therefore,
the array entity holding "pear" and "mango" items is also counted.
4. What will be the output of the following PHP code?
<?php
$var = 300;
$int_options = array("options" => array ("min_range" => 0,
"max_range" => 256));
if (!filter_var($var, FILTER_VALIDATE_INT, $int_options))
echo("Integer is not valid");
else
echo("Integer is valid");
?>
A. No output is returned
B. Integer is not valid
C. Integer is valid
D. Error
Description: Since the integer value of the variable $var is "300"; and 300 is not in
the specified range, so, the output of the code above will be: "Integer is not valid".
13. PHP Basic and Fundamental Questions and Answers with Detail Explanation
Page 13 of 14
5. Which one of the following regular expression matches any string
containing zero or one p?
A. p+
B. p*
C. P?
D. p#
Description:
The ? (question mark) matches when the preceding character occurs 0 or 1
times only.
The * (asterisk or star) matches when the preceding character occurs 0 or
more times.
The + (plus) matches when the preceding character occurs 1 or more times.
6. The filesize() function returns the file size in ___.
A. bits
B. bytes
C. kilobytes
D. gigabytes
Description: The filesize() function returns the size of the file in bytes, or FALSE (and
generates an error of level E_WARNING) in case of an error.
7. Which one of the following function reads a directory into an Array?
A. scandir()
B. readdir()
C. scandirectory()
D. readdirectory()
Description: The scandir() function returns an array consisting of files and directories
found in directory or returns FALSE on error.
14. PHP Basic and Fundamental Questions and Answers with Detail Explanation
Page 14 of 14
PART III – Explain these easy but yet tricky questions:
1. Explain why the following PHP code returns 3.2 instead of 5:
<?php
$number = 020;
echo $number / 5;
?>
Description: The output of the above code segment is 3.2. This is because in PHP
starting a number with 0 means octal (base 8), therefore, octal 020 is equal 16 in
decimal. Thus, 16 / 5 = 3.2
2. What is the output of the following PHP snippet? Explain why is that
the output?
<?php
echo print(10);
?>
Description: The print always returns 1. Therefore, print statement first print the
value 10, and then return 1 which is then echoed by the echo statement, as a result,
the output is 101.