sprintf function PERL CGI script vs PHP

I have CGI script that I'm rewriting in PHP, but I ran into a issue with sprintf function

$result = sprintf("%.5e",0.00618684714715217);

Result in CGI is 6.18685e-003, while in PHP 6.18685e-3. What should I change to get same result in PHP as in CGI?