public static function Pvtob($elong, $phi, $hm, $xp, $yp, $sp, $theta,
          array &$pv) {

    /* Earth rotation rate in radians per UT1 second */
    $OM = 1.00273781191135448 * D2PI / DAYSEC;

    $xyzm = [];
    $rpm  = [];
    $xyz  = [];
    $x;
    $y;
    $z;
    $s;
    $c;

    /* Geodetic to geocentric transformation (WGS84). */
    IAU::Gd2gc(iauRefEllips::WGS84(), $elong, $phi, $hm, $xyzm);

    /* Polar motion and TIO position. */
    IAU::Pom00($xp, $yp, $sp, $rpm);
    IAU::Trxp($rpm, $xyzm, $xyz);
    $x = $xyz[0];
    $y = $xyz[1];
    $z = $xyz[2];

    /* Functions of ERA. */
    $s = sin($theta);
    $c = cos($theta);

    /* Position. */
    $pv[0][0] = $c * $x - $s * $y;
    $pv[0][1] = $s * $x + $c * $y;
    $pv[0][2] = $z;

    /* Velocity. */
    $pv[1][0] = $OM * ( -$s * $x - $c * $y );
    $pv[1][1] = $OM * ( $c * $x - $s * $y );
    $pv[1][2] = 0.0;

    /* Finished. */
  }