faster way to get last element from string
<p>I have a string similar to belows:</p>

<pre><code>a_b_c_d_1
x_y_z_12
</code></pre>

<p>Now, you can see that last one is a number.
I want to extract it.</p>

<p>Steps that I used to follow were:</p>

<pre><code>1. explode(string), and store in array
2. find length of array
3. get value at key (arrayLength)-1
</code></pre>

<p>But I think there must be fast and better way to do it. So, asking all you great guys here.</p>

<p>How can I achive following?</p>
