Check whether the year is leap year, in order to determine whether the value 7 = Adar or Adar 2
<?php
$hebrewDate = jdtojewish(gregoriantojd(date('m', $DateStamp), date('d', $DateStamp), date('Y', $DateStamp)));
list($hebrewMonth, $hebrewDay, $hebrewYear) = explode('/',$hebrewDate);
$m = array(3, 6, 8, 11, 14, 17, 19);
$meuberet = in_array(($hebrewYear % 19), $m);
if($meuberet) if($hebrewMonth == 7) $hebrewMonth = '7b'; //This is Adar 2