$decimal_number = 10;
$binary_number = decbin($decimal_number);
echo $binary_number; // 输出: 1010
$decimal_number = 10;
$binary_number = sprintf("%08b", $decimal_number);
echo $binary_number; // 输出: 00001010
$decimal_number = 10;
$binary_number = base_convert($decimal_number, 10, 2);
$binary_number = str_pad($binary_number, 8, "0", STR_PAD_LEFT);
echo $binary_number; // 输出: 00001010