PHP Interview Questions

Sep 24, 2022
100 views
61 questions

PHP is a server-side scripting language. It is one of the most popular languages in the world and is used to create dynamic web pages. If you are a web developer and looking for mostly asked PHP Interview Questions for freshers and experienced then this article is for you. Here we have listed Top PHP Developer Questions so you can excel your interview.

Key Features of PHP

  Platform independent
  Simple and Easy
  Real-Time Access Monitoring
  Flexibility
  Case-Sensitive
  Open Source
  Error Reporting
  Fast and efficient performance
  Object-oriented features

Core PHP Interview Questions for Freshers

MVC is a design pattern for creating applications that separate Business logic (Controller) and Application data (Models) from the USER interface (View). MVC is an acronym of Model, View Controller.

MVC is a design pattern for creating applications that separate Business logic (Controller) and Application data (Models) from the USER interface (View). MVC is an acronym of Model, View Controller.

You can upload files using curl by using -F ( — form) option, which will add enctype=”multipart/form-data” to the request.

Syntax -

$ curl -F ‘data=@path/to/local/file’ UPLOAD_ADDRESS 

Code -

$ curl -F 'img_avatar=@/home/petehouston/hello.txt' http://www.interviewmocks.com

max_execution_time is of the constant that is used to increase the execution time of a script in PHP.

 There is a small difference between Echo and Print in PHP. 

 These are - 

  1. Echo has no return value while Print has a return value of 1.
  2. The Echo is marginally faster in comparison to Print.
  3. Echo can output one is more strings while Print can output only 1 string.
  4. Echo is a language constructor while Print is a function.

In PHP, print and echo are both used to print statements but with a small difference.

  • PHP print – It takes only one argument and has a return value of 1. It can use with or without parenthesis.
//example 
<?php 
print "PHP print statement"; 
?> 

  • PHP echo – It can be used to print more than one argument separated by a comma and does not return any values. It can also be used with or without parenthesis. In PHP, echo is faster to execute than print.
//example 
<?php 
$x = 5; 
$y = 5; 
echo $x + $y; 
?>

DOM (Document Object Model) is a Object Model for HTML. The Document Object Model (DOM) defines the logical structure of documents and the way a document is accessed and manipulated.

You can create cookies via Ajax in PHP with the help of setcookie() function. It defines a cookie to be sent along with the rest of the HTTP headers.

The injection attacks that are used to possibly lead to the execution of an otherwise highly malicious SQL statement is known as SQL Injection.

The reports can control a database server behind a web application to cross its security measures. It can be used toad, modify and delete records in the application database. It can also be used to gain unauthorized access to your most sensitive data or information. These attacks are the most prevalent, oldest and very risky and dangerous web application vulnerabilities.

It can be prevented in PHP by using prepared statements and parameterized queries. These SQL statements are sent to and parsed by the application database server separately from any parameters.in this way, it makes it impossible for attackers to inject a malicious SQL INJECTION.

There are 3 different levels of Scopes are available in PHP. They are.

  • Public: Public scopes allow you to access all data and functions of a Class.
  • Private: Private scopes don't allow you to access the private data and functions of a Class.
  • Protected: Protected scopes only allows its derived class to access the Protected data and functions of a Class.

The longest palindrome in a string can be found with the help of given code:

#include <bits/stdc++.h>
using namespace std;
void printSubStr(string str, int low, int high)
{
	for (int i = low; i <= high; ++i)
		cout << str[i];
}
int longestPalSubstr(string str)
{
	int n = str.size();
	int maxLength = 1, start = 0;
	for (int i = 0; i < str.length(); i++) {
		for (int j = i; j < str.length(); j++) {
			int flag = 1;
			for (int k = 0; k < (j - i + 1) / 2; k++)
				if (str[i + k] != str[j - k])
					flag = 0;
			if (flag && (j - i + 1) > maxLength) {
				start = i;
				maxLength = j - i + 1;
			}
		}
	}

	cout << "Longest palindrome substring is: ";
	printSubStr(str, start, start + maxLength - 1);
	return maxLength;
}
int main()
{
	string str = "divyanshuuhsnayvid";
	cout << "\nLength is: "
		<< longestPalSubstr(str);
	return 0;
}

The Major difference between sessions and cookies are - 

  1.  Sessions are stored in Server Side while Cookies are sotred in Client Side.
  2.  Sessions are stored unlimited amount of Data while Cookies are Stored limited amount of Data.
  3.  Sessions are holding multiple variables while Cookies are not holding multiple varibles.
  4.  Sessions are more secure than Cookies.
  5.  Sessions values are not easily accessible While Cookies values are easily accessible.
  6.  Sessions can not disabled by visitor while cookies can disabled by the visitor.

In your code simply use  $_SERVER['REMOTE_ADDR'] to get the IP address of the client or User.

PHP provides an easy way to get the user's IP address. You need to use the $_SERVER variable and REMOTE_ADDR to get the IP address of a user in PHP.

//Command to get the IP address 
Echo ‘User IP address’ .$_SERVER[‘REMOTE_ADDR’];

The full form of PHP is Hypertext preprocessor (earlier called personal home page)

It is not possible to create an object for interface. An abstract type that tells the compiler which property names a given object can have.

Cross-site scripting, generally known as XSS, is a type of attack in which malicious scripts are injected into websites and web applications for the purpose of running on the end user's device.

The code for pyramid structure is given below:

<?php
function pypart($n)
{
          for ($i = 0; $i < $n; $i++)
    {
        for($j = 0; $j <= $i; $j++ )
        {
            echo "* ";
        }
          echo "\n";
    }
}
    $n = 5;
    pypart($n);
?>

Difference between XAMPP, WAMP, and LAMP

XAMPP is an open-source platform that is one of the simplest and light-weighted local servers useful to develop/test our website locally. XAMPP stands for cross-platform, Apache, MariaDB (MySQL), PHP and Perl. It can work with all major operating systems such as Windows, Mac, Linux, etc. We can perform testing and update the contents in our websites testing locally. It is open-source which can be easily downloaded and installed in our computer system.

WAMP uses the Apache webserver that is used to run a web server on windows. WAMP stands for Windows, Apache, MySQL, and PHP. It works on only the windows operating system. It uses the MySQL relational database management system and PHP object-oriented scripting language, which helps to test the web pages without publishing it on the live web server.

LAMP platform has four layers, also known as a LAMP stack. LAMP stands for Linux, Apache, Mysql, and PHP. It works on the Linux operating system. It is easy to code with PHP and a cheap and ubiquitous hosting platform. It can generate dynamic web pages that run PHP code and load data from a MySQL database.

Few difference between GET & POST is - 

GET request remains in browser history while POST Request does not remain in browser history.

GET is availbale for retrieving data while POST is available for writing/Updating data.

GET have no side effects while POST have some side effects.

 

You can connect MongoDB using PHP by downloading the MongoDB PHP driver. To make a connection, you need to specify the database name, if the database doesn't exist then MongoDB creates it automatically. For example-

<?php
   // connect to mongodb
   $m = new MongoClient();
	
   echo "Connection to database successfully";
   // select a database
   $db = $m->mydb;
	
   echo "Database mydb selected";
?>

The default session time in PHP is 24 minutes or 1440 seconds. It can be changed or increased in the PHP connection file.

You can connect a web page data with MySQL by following the given steps:

  • Filter your HTML form requirements for your contact us web page.
  • Create a database and a table in MySQL.
  • Create an HTML form for connecting to the database.
  • Create a PHP page to save data from HTML form to your MySQL database.
  • All done!

 

preg_Match is the pattern, that is used for searching as a string, while preg_replace is the pattern, that contains the string which is used to search the content, which can be the array of string.

 

The HTTP methods that are available in PHP are as follows:

  • GET - The GET method is used to retrieve information from the given server using a given URI.
  • HEAD - Same as GET, but transfers the status line and header section only.
  • POST - A POST request is used to send data to the server, for example, customer information, file upload, etc. using HTML forms.
  • PUT - Replaces all current representations of the target resource with the uploaded content.
  • DELETE - Removes all current representations of the target resource given by a URI.
  • CONNECT - Establishes a tunnel to the server identified by a given URI.
  • OPTIONS - Describes the communication options for the target resource.
  • TRACE - Performs a message loop-back test along the path to the target resource.

In the concept of object-oriented programming, Interfaces are used for the implementation of multiple inheritances. In simple words, it means it is a point or a place where two systems, organizations, subjects etc. meet and interact with each other. It is advantageous to increase the readability of the codes . It helps to decrease class LOC. Here, we just declare the procedure or methods and does not provide any implementation for the same. They are more flexible than Classes. They are helpful when we can’t use class inheritance. For the achievement of total abstraction, we need interfaces. Loose coupling is also achieved through it. It gives us more capability to extend and maintain our applications, utilization of abstraction and implementing good software development practices.

Difference between PHP4, PHP5, and PHP7

PHP 4:

  • Here everything, including objects, is passed by value. We have to copy the code and assign a new value if we want to duplicate an object.
  • Here, the constructor is just a method with the same name as the name of the class.

PHP 5

  • Here, everything is passed by reference only.
  • It has three levels of visibility of class methods and properties namely public, protected and private.
  • It has a unified name for the constructors -"construct()" and also a "_destruct()"
  • We can also create abstract classes.
  • Limited type hinting, E_STRICT error level, etc are included for a better experience.

PHP7

  • It allows the user to declare the return type of the functions as per the expected return value.
  • Introduction of new Engine Exception Objects.
  • It offers an anonymous class to speed up the execution time.
  • It has the Group Use Declaration through which we can include classes from the same namespace.

The difference between the include(), require(),require_once() functions in PHP can be stated as:

include() - this function produces a warning, but the script will continue execution.

require() - this function produces a warning and a fatal error i.e. the script will not continue execution.

require_once() - this function is used to embed PHP code from another file.

 

PHP Design Patterns are the patterns or templates, that can be implemented to solve a problem in different particular situations. Some of the design patterns are as follows:

  • Abstract Factory
  • Builder
  • Factory Method
  • Prototype
  • Singleton
  • Adapter
  • Bridge
  • Composite

In PHP, Super Global variables are basically some of the predefined variables which are always accessible, regardless of scope. Such that it can be accessed from any function, class, or file without having to do anything special.

In PHP, the php. ini file is basically a default configuration file for running applications that require PHP. It is used to control variables such as upload sizes, file timeouts, and resource limits.

The code to send a mail with attachment using phpmailer is as follows:

<?php
use PHPMailer\PHPMailer\PHPMailer;
use PHPMailer\PHPMailer\Exception;

require_once "vendor/autoload.php";

//PHPMailer Object
$mail = new PHPMailer(true); //Argument true in constructor enables exceptions

//From email address and name
$mail->From = "from@yourdomain.com";
$mail->FromName = "Full Name";

//To address and name
$mail->addAddress("recepient1@example.com", "Recepient Name");
$mail->addAddress("recepient1@example.com"); //Recipient name is optional

//Address to which recipient will reply
$mail->addReplyTo("reply@yourdomain.com", "Reply");

//CC and BCC
$mail->addCC("cc@example.com");
$mail->addBCC("bcc@example.com");

//Send HTML or Plain Text email
$mail->isHTML(true);

$mail->Subject = "Subject Text";
$mail->Body = "<i>Mail body in HTML</i>";
$mail->AltBody = "This is the plain text version of the email content";

try {
    $mail->send();
    echo "Message has been sent successfully";
} catch (Exception $e) {
    echo "Mailer Error: " . $mail->ErrorInfo;
}

Difference between CURL and AJAX

AJAX

  • It refers to the client-side utility to call PHP and extract data from it.
  • It is asynchronous and a client-side call which means until the client loads the page,it will not be executed.
  • It is used for communication from the client to the server.

CURL

  • It refers to the Client URL that helps us to connect with other URLs and apply their responses in our codes.
  • It is a package name useful in PHP in order to access data from outside webpages.
  • It is a process from server-side that is it makes requests to external websites and get a response in our background PHP script on the server.

A session is started with the session_start() function. Session variables are set with the PHP global variable: $_SESSION whereas to Get the PHP Session variable values, the ession variables are not passed individually to each new page, instead they are retrieved from the session we open at the beginning of each page (session_start()).

PHP link() function is used to hard link for a specified target. The link function takes two arguments first is the target file and the second argument is the name of the link.

Note: The link() function does not work remotely.

Example

<?php
$target = "abc.php";
$linkname = "name of link";
link($target, $linkname);
?>

PHP resembles its syntax from C and Perl Programming Language.

The default PHP session storage path on the server is /tmp directory.

Yes, the PHP script can be executed from the command line. To execute it, go to the directory where your PHP script file is stored. Open the command line from that directory and run the following command.

PHP filename.php //here filename is the actual name of your PHP script. 

PEAR (PHP Extension and Application Repository) is a repository of PHP code and software components. Developed by Stig S Bakken in 1999, PEAR is mainly used to reuse existing code, improve code structure. PEAR group is the governing body of PEAR that mainly promotes a standard coding style for PHP developers using PEAR. PHP comes with a PEAR package manager which is used to download the PEAR packages as a tar file. The PEAR framework is divided into three classes which are PEAR library, PEAR core components, PECL packages. The PECL package is like a PEAR package but has the C extensions that are compiled into PHP.

Some of the popular frameworks in PHP are,

  • Laravel – An open-sourced framework that is used to develop complex applications seamlessly.
  • CodeIgniter – A popular lightweight framework for developing dynamic web applications.
  • Symfony – A PHP MVC framework for developing large scale applications.
  • CakePHP – A easy to learn PHP framework for developing feature-rich websites.
  • Yii – A simple framework for developing modern PHP web applications.
  • ZEND – An object-oriented based PHP framework for developing complex, large-scale web applications.

In PHP, constants are named that stores a value. The value of the constant cannot be changed at runtime and it is global by default.

To define a constant in PHP, the define method is used.

//syntax 
define(name, value, casesensitive) 

Here, is the name of the constant. Value is the constant value. Case sensitive defines whether the constant should behave as case sensitive or not. By default, it is false and not case sensitive.

<?php 
define("CONSTANT", "HELLO!"); 
echo CONSTANT; 
?> 

PHP supports all major data types such as String, Integer, Float or Double, Boolean, Array, Object, NULL, Resource, etc.

The magic constants in PHP are a set of predefined constants that changes their feature based on where it is used. These constants start and end with a double underscore. The magic constants in PHP are,

  • __LINE__ - It represents the current line number.
  • __FILE__ – It represents the name and path of the file.
  • __DIR__ – It represents the full directory path of the file.
  • __FUNCTION__ – It is used to represent the function name.
  • __CLASS__ – It is used to represent the class name.
  • __TRAIT__ – It is used to represent the trait name.
  • __METHOD__ – It is used to represent the name of the class method.
  • __NAMESPACE__ – It represents the name of the namespace.

An array is used to store more than one value to do various operations. There are three types of array present in PHP.

  • Indexed array – Here the array has sorted values with a numeric index.
//syntax to create an indexed array. 
$name = array("one", “two”, “three”, “four”, “five”); 

Here, the values in the array name can be accessed or traversed using its index value starting from 1.

  • Associative array - It is similar to an indexed array but the value is assigned in the array with a user-defined key instead of index numbers.
//example to define a associative array 
$name = array("ONE"=>"1", "TWO"=>"2", "THREE"=>"3", "FOUR"=>"4", "FIVE"=>"5"); 

Here, the values “1”, “2”, “3”, “4”, “5” are associated with user-defined keys “ONE”, “TWO”, “THREE”, …. The array values can be accessed or traversed with the key values.

  • Multidimensional array – Here every element in the array can store the array within. That is the element in the array is itself an array and sub-array within.
//example to create a multidimensional array 
$number = array( array( "one" => "1", "two" => "2", "three" => "3", ), array( “four" => "4", "five" => "5", "six" => "6", ) ); 

Here, each element is another array. The elements within the sub-array can be accessed using the index value. For eg: to access “one”, type $number[0][“one”].

The Paamayin nekudotayim(::) is the scope resolution operator in PHP for identifying integer by specifying the namespace. It is the Hebrew word for the double colon. The T_PAAMAYIM_NEKUDOTAYIM is the syntax error PHP throws when it expects the scope resolution operator(::)

= = and = = = are both the comparison operator used in PHP. = = is called the equal operator that is used to check if the values are equal in both side of the operand. = = = is called as the identical operator that is used to check values as well as the data types of the operands are equal or not.

//example for = = 
   <?php 
if("2" == 2) { 
   echo "YES"; 
} 
?> 

It prints YES as the values are equal even though the datatype is not.

//example for = = = 
if("1" == “1”) { 
   echo "YES"; 
} 

It prints YES as both the value and the datatype are equal.

= = and = = = are both the comparison operator used in PHP. = = is called the equal operator that is used to check if the values are equal in both side of the operand. = = = is called as the identical operator that is used to check values as well as the data types of the operands are equal or not.

//example for = = 
   <?php 
if("2" == 2) { 
   echo "YES"; 
} 
?> 

It prints YES as the values are equal even though the datatype is not.

//example for = = = 
if("1" == “1”) { 
   echo "YES"; 
} 

It prints YES as both the value and the datatype are equal.

@ in PHP is used to control the expression. It is the error control operator. When @ is appended before an expression, any error generated by that expression will be ignored. Using @ is not a good practice as it doesn’t eliminate error but hides it.

//example 
<?php   
$value = @$array_PHP[$key];   
?> 
//If the key doesn’t exist, the error will not be displayed as the error control operator is appended before the expression. 
 

strstr() and stristr() are both used to find the first occurrence of the string except for one difference. That is strstr() is case sensitive and stristr() is not.

//example for strstr() 
strstr(“prograMminG”, “M”);

Here the output is Mming as the case matches with each other.

//example for stristr() 
stristr(“prograMming”, “m”);

Here the output is Mming even though the case doesn’t match as the method is case insensitive.

The count() function in PHP is used to return the size of the array passed to this method.

//syntax 
count(array, mode); 

Here array is the array name to be passed. Mode specifies whether to count the values in multi-dimensional array or not. By default, the value is 0 and doesn’t count the sub array length in the multi-dimensional array. You can change it to 1 to count the values of the sub array in a multi-dimensional array.

//example  
<?php 
$array_PHP=array("one","two","three"); 
echo count($array_PHP); 
?> 

It returns the value 3.

To register a session variable in PHP, Start your session_start() at the beginning of your script. Use the $_SESSION[‘VARIABLE_NAME’] to create and register your session variable. It is a superglobal variable that is accessible by every file in your application.

Eg: $_SESSION[‘user_name’] = “login_name”; 

Note:- You can destroy the session variables using the method session_method();

PHP has a session time of 24 minutes which is the default. The default path where session data files are stored in the temporary folder that is, /tmp.

Both the require and include statements are used to include different text, markup, code files into the current PHP file. The difference between require and include method are,

Require statement produces error statement (E_COMPILE_ERROR) when the file is not found and will stop executing the script.

//require() statement example
require("path/to/filename"); //produces error if the file is not found. 

Include a statement only produces the error warning and will continue to run the script without the file.

//include() statement example
include("path/to/filename"); //produces only warning(E_WARNING) when the file is not found. 

Errors are nothing but a mistake in the script. PHP has four types of error.

Parse error – It is the error in the syntax of the code. The error arises due to human mistakes. The error is identified by the compiler and fixed by the programmer. The script works fine after it is fixed. Examples of this type are semicolon missing, unclosed quotes or braces, etc.

Example

<?php 
echo "Dog" 
?> 

Note:- In the above code, a semi-colon is missing. So, PHP produces the syntax error.

Fatal error – It occurs when we call an undefined function. PHP understands the code but is unable to execute it.

Example

<?php 
function fun1() 
{ 
echo "Function 1"; 
} 
fun2(); 
?> 

Note:- Here, we define the function 1 but call the undefined function 2. So, PHP produces the undefined function error.

Warning error – As the name implies, it is just a warning. Not an actual error. Examples are missing files, wrong number of arguments, etc.

Example

<?php 
include ("Warning.php"); 
?> 

Note:- Here, the Warning.php is not present int the directory. So, the PHP produces a warning message.

Notice error – It is the same as the warning error but the execution is not stooped here.

Example

<?php   
echo $x;  
?> 

Note:- Here the variable x is not declared or initialized. So, the PHP produces an undefined variable error.

In PHP, namespaces are used to declare the same function or classes or methods in the different namespaces without getting any error or conflict by encapsulating the code. They are just normal PHP code that is declared using the namespace keyword. It should be declared at the top of the file to use it throughout the file. The namespace provides flexibility while writing code. A namespace can have sub-namespaces within it. A namespace can be declared globally by creating the namespace without any name.

<?php   
Namespace NamspaceName {  
       function namespaceFunction()   
   {  
// Regular PHP code  
   }  
}  
?> 

Redirection in PHP is used to redirect to a different web page from another page. It can be done using the header() method.

//syntax for header function 
header( $header, $replace, $http_response_code ); 

Here, $header holds the header string. $replace is an optional parameter that indicates that the header should replace the previous header or add a similar header. $http_response_code holds the actual response code.

//example 
<?php  
header("Location: http://www.google.com");  
exit;  
?> 
 

Here, PHP redirects the page to google home page. Exit() or die() after redirection is mandatory as it exits any following code after the redirection.

Developed by Thomas Boutell, the GD library is used in the development of web applications. An open-source library used for creating images in the format of JPEG, GIF, and PNG. It is also used to generate charts and graphics too.

The cURL in PHP is a library that is used to make an HTTP request to fetch a URL. The curl_init() creates the session and returns the curl handle. After the initialization, there are many functions in curl to grab the contents of the URL and display it. Curl_exec($ch) grabs the contents of the URL and passes it into a variable to display. Curl_setopt() function is also used to grab the contents in various fashion based on the parameters passed.

//example 
<?php  
$url = "https://www.google.com";  
$curl = curl_init(); //it initializes the session 
curl_setopt($ch, CURLOPT_URL, $url); //grabs the content of the URL and passes it to the variable. 
$result = curl_exec($ch); //the grabbed content is passed to another variable for displaying the result. 
echo $result; 
?> 

Composer is an application manager that is used to install dependencies and libraries in PHP. Inspired by npm and bundler, the Composer is an open-source cross-platform dependency manager that was released in 2012. The important commands in the composer require to a library, install to install a library, update to update a library, and remove to remove a library from compser.json. This command line-based dependency installs the package from the packagist repository.

In PHP, using traits, you can reuse a method in multiple classes. Traits are just a group of methods that cannot be instantiated but is used in another class. It is like an abstract class. The trait keyword is used to declare the trait method. You can declare multiple trait methods and use them in a class too.

//syntax 
<?php 
trait traitmethodname { 
//code statement 
} 
?> 

To use a trait in a class, you need to include it with the ‘use’ keyword.

//syntax 
<? 
Class classname{ 
use traitmethodname; 
} 
?> 

PHP ini file provides information about configurations and user controls. It is read by the system to configure what a user can and cannot do with the application whenever it is initialized. Apart from this, information related to the global variables, maximum upload size, log error display, time to execute PHP script are present in this file. This file makes it easy to change these configurations. The web server needs to be restarted whenever some changes are made in this file.

 

//example 
$array_1 = array(“city1”=>"delhi”, “city2”=>"mumbai”); 
$array_2 = array(“city1”=>"sydney”, “city4”=>"tokyo”); 
print(array_merge($array_1, $array_2)); 
The output will be Array([city1]=>sydney, [city2]=>mumbai, [city4]=>tokyo) 

Array_combine() function combines two arrays of equal length to create a new array. It uses one array for key and another for values. It returns false off you pass an array of different lengths.

//example 
$array_1 = array(“city1”=>"delhi”, “city2”=>"mumbai”); 
$array_2 = array(“city3”=>"sydney”, “city4”=>"tokyo”); 
print(array_merge($array_1, $array_2)); 
The output will be Array([city1]=>sydney, [city2]=>tokyo) 

AJAX (Asynchronous Javascript And XML) is a function call used for data retrieval. The call is asynchronous so the data sent and received from the server is independent. It reduces the unnecessary reload by the web page and thereby making it more interactive, versatile, robust and convenient.

CURL(Client URL) is used to get the content of the URL. It is a library used in PHP to get data from outside the current web page. It allows the code to connect with an external URL and get its response to use it in your application.

The Display Mode in the ASP.net is used to render the page content based on the requesting device. The requesting device can be web, mobile, tablet, iPhone, or android, the display mode will render the page content based on the size and the variety of the device.

To do this, You Need to create a display mode for each class of devices. The display mode will check the “user-agent" headers and renders the page appropriate for the devices.

The Display Mode can be Set Up when the Application Starts that is, global.asax file.

//example for the display mode setup for android and windows phone
DisplayModeProvider.Instance.Modes.Insert(1, new DefaultDisplayMode("iPhone") { ContextCondition = (ctx => ctx.GetOverriddenUserAgent() .IndexOf("iPhone", StringComparison.OrdinalIgnoreCase) > 0) }); DisplayModeProvider.Instance.Modes.Insert(1, new DefaultDisplayMode("Android") { ContextCondition = (ctx => ctx.GetOverriddenUserAgent() .IndexOf("Android", StringComparison.OrdinalIgnoreCase) > 0) });
Share this post