- date: documentation ( source)
- strtotime: documentation ( source)
<?php
$date = '2014-03-04';
$yearDay = date("z", strtotime($date)) + 1;
$yearDays = date("z", strtotime(date("Y", strtotime($date))."-12-31"));
echo $yearDays.' '.$yearDay.' ';
echo $yearDay/$yearDays;
?>