<?php

$input = "b"; // or "b"
list($a, $b) = array_pad(explode(':', $input, 2), 2, '');

echo "a is: $a";
echo "==";
echo "b is $b";