PHP transformed image? I’m using Craft to add CMS functionality to an e-commerce website via craft/app/bootstrap.php

Trying to pull a 'timeline' structure with a featuredImage Asset Field. 

This code works and pulls the full size image, but I can’t work out how to pull the ‘small’ size of image which is set up as a transform.

I assume it should be something like $entry-&gt;featuredImage[0]-&gt;url['small'] but nothing seems to be working. 

Any help appreciated.

$timeline = Craft\craft()-&gt;elements-&gt;getCriteria(Craft\ElementType::Entry);
$timeline-&gt;section = 'timeline';
$timeline-&gt;with = 'featuredImage';
$timeline-&gt;withTransforms = 'small';

foreach ($timeline as $entry)
{                       
  ?&gt;
      &lt;li&gt;
          &lt;div class="imgholder"&gt;&lt;img src="&lt;?php echo $entry-&gt;featuredImage[0]-&gt;url; ?&gt;" alt="&lt;?php echo $entry-&gt;featuredImage[0]-&gt;title; ?&gt;"/&gt;&lt;/div&gt;
          &lt;h4&gt;&lt;?php echo $entry-&gt;title; ?&gt;&lt;/h4&gt;
          &lt;?php echo $entry-&gt;body; ?&gt;
       &lt;/li&gt;
  &lt;?php
}
$entry-&gt;featuredImage[0]-&gt;getUrl('small'); works.