I want to combine two variables together:
$var1 = 'Welcome ';
$var2 = $_SESSION['UserName'];
Which ones will work faster? Code Example 1:
$var3 = $var1.$var2;
Or sample code 2:
$var3 = "$var1$var2";
Sample code 1 will not work at all.
Given syntax examples, example 1 should be trivially faster because it does not include parsing a string (searching for variables).
But it is very, very trivial.
- $var3, "Welcome Wazzy". 1 . ( ), , , .
Source: https://habr.com/ru/post/1763599/More articles:Reflection: how to call methods that accept a class object as input - reflectionWhose responsibility should be the registration of types with an IoC container? - .netTry / catch performance recommendations - c #https://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1763597/alternatives-to-wmi&usg=ALkJrhi_2vQ0gUGCL_6WkniwF4eMVoEShgHow to run a function in different spaces, PowerShell - powershellArtificial Intelligence Curriculum Helps Idea and Its Influence on a Later Master's Degree - Artificial-Intelligenceскрыть контроллер панели отображения - изнутри контроллера просмотра В контроллере панели вкладок - iphoneHow to sign a script or web page requiring UniversalXPConnect privilege - javascriptStruts2: Get the URL from which the user came - javaIdentify ASP.NET redirect error - asp.netAll Articles