The code below works and it is so clean: &lt;?php     preg_match('/(bar)/', 'love hotel bar', $matches);     print_r($matches);  As you can see before calling the function $matches is undefined, which normally should return an error... The function parameter is filled by value and it is accessible out scopes. ❌ Bad &lt;?php $title = get_og_tag('title'); $description = get_og_tag('description'); echo $title; //My title  ✅ Could be Good &lt;?php get_og_tag($title, $description, $og_url, $og_image, $twitter_card); echo $title; // [error] $title, $description, ..etc, undefined...  For the code's clarity cake How to create functions like this?
Are PHP variables passed by value or by reference?
How to prove two equivalence classes are disjoint? Why do I not see evidence of discrete energy in the spectrum? The electromagnet spectrum looks to be continuous, yet energy is discrete. Shouldn't one see evidence of the electron's "quantum leap"? What's going on?     Moderator, please size my photo. Thank you. MySql autoincrement counter resetting after server restart Changing Quotes What is the term for changing a quote? For example, changing 'Who knows what evil lurks in the hearts of men?' to 'Who knows what mischief lurks in the hearts of children?' "would rather" + subject + past subjunctive What is the difference between:   The company would rather each employee be provided with ID card.  The company would rather each employee were provided with ID card. Can I install pantheon terminal in Ubuntu 14.04 or newer? Is it possible to install Pantheon terminal from elementary OS on my Ubuntu 14.04 or newer LTS releases? If yes, how can I? Recent feature changes to Stack Exchange This is an unofficial list/changelog of new features and various changes to Stack Overflow and the Stack Exchange network.  It is maintained by the community, while a Stack Exchange employee changes the accepted answer to ensure that the latest changes remain on top (given default user settings).  To see the list in reverse chronological order (latest entry on top), .  For those adding new features here: please post only feature changes that affect the whole network and have some global impact. i.e. bug fixes don't belong here, nor do mobile app updates. How do I tell if ACR will work with my camera and how do I get the correct version for Photoshop? I am a beginner photographer with a Canon 7d and MacBook Pro. I'm not sure if Adobe camera Raw is compatible with either and really need advice on how to go about downloading the correct version. Say I have two points. One at $A = (0, 0)$ and another at $B = (0, 10)$. I wish to derive an equation for a line that, for any point $P$ on the line, would equal a set ratio for the distance $P$ to $A$ and $P$ to $B$.  This is easy if the predetermined ratio for $A:B$ is $1:1$. I would create a line from $A$ to $B$, find its midpoint, then create an orthogonal line at the midpoint. Then at any $P$ on the line I know that the ratio distances from $P$ to $A$ and $B$ will be $1:1$.  But what if the ratio for $A:B$ is something like $11:18$?  This is for a positioning algorithm I am implementing - not for homework :)  EDIT: Note - If an exact formula is not possible, an approximation of the line out to $\pm 200$ from $A$ or $B$ is acceptable as values further from $A$ and $B$ will not be utilized anyway. A linear equation for the final result/approximation is ideal for speed in running multiple computations. Converting HTML to plain text in PHP for e-mail I'm aware there are been several similar questions, and some great answers with hints on how to prove this, for example  and .  But I've never really seen a detailed proof of the absolute convergence of the Riemann zeta function in the half-plane $\Re(s)&gt; 1$.  I hope there's interest on a detailed proof of this for reference. Here is my attempt. Please, fill in any detail that might be missing, or point out any mistake!  On $\Re(s)=\sigma&gt; 1$, we have  $$\sum_{n=1}^{\infty}\bigg|\frac{1}{n^s}\bigg|=\sum_{n=1}^{\infty}\frac{1}{n^\sigma}$$  and  $$\frac{1}{n^\sigma}\leq\frac{1}{n^{1+\epsilon}}$$  for any $\epsilon &gt;0$, so by the direct comparison test, if   $$\sum_{n=1}^{\infty}\frac{1}{n^{1+\epsilon}}$$  converges absolutely, then so do $\sum_{n=1}^{\infty}|1/n^s|$ and $\zeta(s)$.  By the integral test, the convergence of $\sum_{n=1}^{\infty}1/n^{1+\epsilon}$ is equivalente to the finitude of the integral  $$\int_1^\infty \frac{1}{n^{1+\epsilon}}=\bigg[-\frac{1}{\epsilon x^\epsilon}\bigg]=\frac{1}{\epsilon}$$  which holds for any $\epsilon &lt; \infty$.  Any correction or improvement is welcomed! Thanks in advance. Metapost label based on variable value I want to label a scale based on a variable value and I wrote a metapost code like this.  $ := 1; for i = -.3cm step .6cm until 3.6cm:     label.bot(str$,(i,-3.7cm));     $ := incr($); endfor;   It just labels "$" instead of its value. How to output the variables value? We're working on a Log Viewer. The use will have the option to filter by user, severity, etc. In the Sql days I'd add to the query string, but I want to do it with Linq. How can I conditionally add where-clauses? Number of isosceles triangle. What's the point in adding a new line to the end of a file? Some compilers (especially C or C++ ones) give you warnings about:  No new line at end of file   I thought this would be a C-programmers-only problem, but github displays a message in the commit view:  \ No newline at end of file   for a PHP file.  I understand the preprocessor thing explained in , but what has this to do with PHP? Is it the same include() thing or is it related to the \r\n vs \n topic?   What is the point in having a new line at the end of a file? How to prove that exponential grows faster than polynomial? A charged particle undergoing an acceleration radiates photons.  Let's consider a charge in a freely falling frame of reference.  In such a frame, the local gravitational field is necessarily zero, and the particle does not accelerate or experience any force. Thus, this charge is free in such a frame. But, a free charge does not emit any photons. There seems to be a paradox. Does a freely falling charge in a gravitational field radiate? Relation between confidence interval and testing statistical hypothesis for t-test It is well known that confidence intervals and testing statistical hypothesis are strongly related. My questions is focused on comparison of means for two groups based on a numerical variable. Let's assume that such hypothesis is tested using t-test. On the other side, one can compute confidence intervals for means of both groups. Is there any relation between overlapping of confidence intervals and the rejection of the null hypothesis that means are equal (in favor of the alternative that means differ - two-sided test)? For example, a test could reject the null hypothesis iff the confidence intervals do not overlap. Why are mirrorless cameras much slower than DSLRs? This is a follow-up to a .  I've been comparing cycle times (or shot to shot times in single shot mode) of mirrorless cameras with interchangeable lenses with traditional DSLRs and all of them, even the highest end ones (like the Olympus OM-D EM-5 or Panasonic GH3) are slower than even entry level DSLRs.  How's that possible? The electronics should be the same and they don't have the burden of a mirror going up and down between each shot. I think that there must be a technical reason for that (maybe some cpu time is going to feed the live-view before the image is encoded?), because from a commercial point of view it does not make sense.  I've seen the cycle times under the performance tab in the reviews pages of .  The average CSC has cycle times around 0.7~1.2s, the flagship ones around 0.5s. The average DSLR has cycle times around 0.4s and the flagships around 0.25s. How are "needs to be washed," "needs washing," and the regional variant "needs washed" to be distinguished"? I'm from Central Pennsylvania, and apparently, we have a strange language construct in this area. I was recently talking about how "my car needs washed" to a friend from NJ, and she told me that my sentence was grammatically incorrect.   I realize she's right, and I realize my options are "my car needs to be washed" or "my car needs washing". But I'm not clear on the precise rule being invoked.