Cheap and good way to feed 12v digital input

Cheap, good and small:
SOT-89 (7805): 1.6mm x 4.6mm, area 7.36mm2,
SOT-416 (DTC114W): 1.7mm x 0.9mm, area 1.53mm2, $0.20 each
I/O Connections: VIN 0-30V, OUT (inverted) connected to PIC input with Pull-up enabled.