The 10 Most Entertaining StackOverflow Questions Of All Time

Oh StackOverflow, what would we do without you! You save us countless hours of bug fixing with a single spot on answer. But there was a time when Stack Overflow wasn’t only for technical answers, and a few entertaining gems could slip through. We’ve collected a few of our most favorite ones for your enjoyment.

Our Top 10

Here are our favorite entertaining Stack Overflow questions. They aren’t sorted by up votes or anything, we are going to let you decide which ones you like best. If we’ve missed your favorite, add it to our comment section!

6. Why does HTML think “chucknorris” is a color?

Although this question is from 2011 and no one uses the HTML bgcolor attribute anymore, it’s still funny that someone tried to color their div chucknorris. Also, in case you were wondering, here is a chart showing which color represents the names of popular celebrities.

10. What's your favorite programmer cartoon?

A huge compilation of funny images and comics. Be careful, you might waste an entire work day with this one. Credit goes to xkcd for providing us with nerdy entertainment.

5. What is the best comment in source code you have ever encountered?

Some people don’t comment their code at all causing confusion and bewilderment, others add meaningful and on point hints to aid their colleagues and their future selves. And then there are the people in this thread.

13. What is your best programmer joke?

Some of these are bad, some of these are good, some of these are so bad they are good. You know a good joke that is not in the list? Post it to our comment section!

3. Pair socks from a pile efficiently?

Ever feel like your amazing programming skills are useless outside of the computer world? This questions proves they aren’t! Apply your knowledge and fix a very real everyday laundry problem.

11. What's the difference between JavaScript and Java?

This question is another evidence that Stack Overflow has a sense of humor. Choose your favorite answer and the next time someone asks you this question seize the opportunity!

4. Is it possible to apply CSS to half of a character?

Have you ever needed to style only half of a character? Neither have we, but surprisingly it is possible! In an incredibly detailed answer, the stack overflow user Arbel shows different techniques for doing it. The code has been released as a jQuery plugin.

9. Check checkbox checked property

How many checkboxes could a checkbox check if a checkbox could check checkboxes? But no, seriously, this is a helpful question solving a very common problem.

1. Why does ++[[]][+[]]+[+[]] return the string 10?

JavaScript is a weird language that often times works in mysterious and unpredictable ways. The snipped in question is not Brainfuck but valid JavaScript. Thankfully Stack Overflow is full with people who now their JS, and they took the time to explain how this mind bending code works.

12. What was the strangest coding standard rule that you were forced to follow?

Have you ever thought about how much you hate your workplace? Well, at lest it doesn’t impose nonsensical coding standard rules like the ones in this thread.


7. Why does this code using random strings print hello world?

This question was asked in the java section, but the topic applies to all programming languages – random isn’t really random, it’s pseudorandom. Feel free to use this information to confuse other coders.

Top asked 15 PHP interview questions for 2016 freshers

In this section we are providing you some frequently asked PHP Interview Questions which will help you to win interview session easily. Candidates must read this section Also, review sample answers and advice on how to answer these typical interview questions. PHP is an important part of the web world, and every web developer should have the basic knowledge in PHP. Common PHP interview questions, which should help you become a best PHP codder. We hope you find these questions useful. If you are an interviewer, Take the time to read the common interview questions you will most likely be asked. Below are the Top asked 15 PHP interview questions for 2016 freshers

Q. What is the difference between $name and $$name?

A. $name is variable where as $$name is reference variable like $name=ricky and $$name=negi so $ricky value is negi.

Q. What are the differences between Get and post methods?

A. There are some difference between GET and POST method
1. GET Method have some limit like only 2Kb data able to send for request But in POST method unlimited data can we send
2. when we use GET method requested data show in url but Not in POST method so POST method is good for send sensitive request

Q. What are the features and advantages of object-oriented programming?

A. One of the main advantages of OO programming is its ease of modification; objects can easily be modified and added to a system there by reducing maintenance costs. OO programming is also considered to be better at modeling the real world than is procedural programming. It allows for more complicated and flexible interactions. OO systems are also easier for non-technical personnel to understand and easier for them to participate in the maintenance and enhancement of a system because it appeals to natural human cognition patterns. For some systems, an OO approach can speed development time since many objects are standard across systems and can be reused. Components that manage dates, shipping, shopping carts, etc. can be purchased and easily modified for a specific system

Q. What are the differences between procedure-oriented languages and object-oriented languages?

A. There are lot of difference between procedure language and object oriented like below
1>Procedure language easy for new developer but complex to understand whole software as compare to object oriented model
2>In Procedure language it is difficult to use design pattern mvc , Singleton pattern etc but in OOP you we able to develop design pattern
3>IN OOP language we able to ree use code like Inheritance ,polymorphism etc but this type of thing not available in procedure language on that our Fonda use COPY and PASTE .

Q. What are the different types of errors in PHP?

A. Three are three types of errors:
1. Notices: These are trivial, non-critical errors that PHP encounters while executing a script for example, accessing a variable that has not yet been defined. By default, such errors are not displayed to the user at all although, as you will see, you can change this default behavior.
2. Warnings: These are more serious errors for example, attempting to include() a file which does not exist. By default, these errors are displayed to the user, but they do not result in script termination.
3. Fatal errors: These are critical errors for example, instantiating an object of a non-existent class, or calling a non-existent function. These errors cause the immediate termination of the script, and PHP’s default behavior is to display them to the user when they take place.

Q. What is difference between explode and implode in php

A. Explode() function divides a string into an array, but implode function() returns or combine a string from the elements of an array.



Q. What is the meaning of a final class and a final method?

A. ‘final’ is introduced in PHP5. Final class means that this class cannot be extended and a final method cannot be overrided.

Q. How failures in execution are handled with include() and require() functions?

A. If the function require() cannot access to the file then it ends with a fatal error. However, the include() function gives a warning and the PHP script continues to execute.

Q.What is the main difference between require() and require_once()?

A.require() and require_once() perform the same task except that the second function checks if the PHP script is already included or not before executing it.

Q. What does the unset() function means?

A.The unset() function is dedicated for variable management. It will make a variable undefined.

Q How to initiate a session in PHP?

A The use of the function session_start() lets us activating a session.

Q How can we change the maximum size of the files to be uploaded?

A We can change the maximum size of files to be uploaded by changing upload_max_filesize in php.ini.

Q How to connect mysqli with php using Object-Oriented Way?


$host = “localhost”;
$username = “root”;
$password = “”;
$conn = new mysqli($host, $username, $password);
//connect to server
if ($conn->connect_error) {
die(“Connection failed: ” . $conn->connect_error);
echo “Connected successfully”;


Q Give Curl example using post method?


$postData = array(
“site” => “web technology experts notes”,
“dailyuser” => “1000”,
“location” => “India”
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, “”);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $postData);
$output = curl_exec($ch);
echo $output;


Q Difference between array_merge and array_combine in php?


array_merge example

$array1 = array(‘one’,’two’);
$array2 = array(1,2);
$result = array_merge($array1,$array2);

array_combine example

$array1 = array(‘one’,’two’);
$array2 = array(1,2);
$result = array_combine($array1,$array2);


Hope its helpful for everyone, best of luck from Smart Web Care Team