title: Converting comma-separated string of single-quoted numbers to int array
body: <p>I have a string:</p>
  <pre><code>'24','27','38'
  </code></pre>
  <p>I want to convert it:</p>
  <pre><code>(
      [0] =&gt; 24
      [1] =&gt; 27
      [2] =&gt; 38
  )
  </code></pre>
  <p>The conversion: <a href="https://3v4l.org/oDPDl" rel="nofollow noreferrer">https://3v4l.org/oDPDl</a></p>
  <pre><code>array_map('intval', explode(',', $string))
  </code></pre>
  <p>gives:</p>
  <pre><code>Array
  (
      [0] =&gt; 0
      [1] =&gt; 0
      [2] =&gt; 0
  )
  </code></pre>
  <p>Basically, <code>array_map()</code> works when the numbers aren't quoted like `24,27,38', but I need a technique that works with quoted numbers.</p>
  <p>One solution is looping over the array, but I don't want to do that. Can I achieve the above using only php functions (not <a href="https://www.php.net/manual/en/language.control-structures.php" rel="nofollow noreferrer">control structures</a> -- e.g. <code>foreach()</code>)?</p>