Junior PHP Developer Question:

Download Job Interview Questions and Answers PDF

What is faster in PHP?

Junior PHP Developer Interview Question
Junior PHP Developer Interview Question

Answer:

1- Combining two variables as follows:

$variable1 = ‘Hello ‘;

$variable2 = ‘World’;

$variable3 = $variable1.$variable2;

Or

2- $variable3 = “$variable1$variable2”;

$variable3 will contain “Hello World”. The first code is faster than the second code especially for large large sets of data.

Download Junior PHP Developer Interview Questions And Answers PDF

Previous QuestionNext Question
Explain what is the static variable in function useful for?Tell us what is the difference between session_unregister() and session_unset()?