ONE WHO CANNOT AFFORD BOTH TEFILIN AND A MEZUZAH [Tefilin and Mezuzah: precedence]
(Beraisa): If [parchments of] a Sefer Torah or Tefilin became worn, they may not be used for a Mezuzah, for we do not descend in Kedushah.
Zevachim 91a (Mishnah - R. Meir): A Shelamim of yesterday comes before a Chatas or Asham of today.
Inference: If both Korbanos were of today, all would agree that Chatas or Asham is first [for it is more Kadosh], even though Shelamim is more Tadir (regular)!
Rejection (Rava): Shelamim is more common, but it is not more Tadir!
Question (Rav Huna bar Yehudah): Indeed, what is more common is considered Tadir!
(Beraisa) Suggestion: Perhaps there is no Chatas for (neglect of) Korban Pesach, but Chatas is brought for Bris Milah, for this is more Tadir!
Answer #1: The Beraisa means that Milah is more Tadir regarding Mitzvos. (Thirteen covenants were made over it.)
Answer #2: Compared to Pesach, Milah is Tadir.
Yerushalmi (Megilah 34a) Question: Which has precedence, Tefilin or Mezuzah?
Answer #1 (Shmuel): Mezuzah has precedence.
Answer #2 (Rav Huna): Tefilin has precedence.
Shmuel holds that Mezuzah has precedence, for it applies on Shabbos and Yom Tov.
Question: What is Rav Huna's reason?
Answer: He holds that Tefilin has precedence, for it applies to seafarers and people who traverse Midbaros.
Support (for Shmuel - Beraisa): If Tefilin became worn, they may be used for a Mezuzah. If a Mezuzah became worn, it may not be used for Tefilin, for we ascend in Kedushah, but we do not descend.
Rosh (Shabbos 2:12): Rava asked whether Ner Chanukah or [wine for] Kidush ha'Yom has precedence [for one who cannot afford both]. Perhaps Ner Chanukah has precedence, to publicize the miracle. Or, since Kidush ha'Yom is Tadir, it has precedence, even to override the less Tadir Mitzvah.
Rosh (Hilchos Tefilin (after Menachos) 30): Presumably, the Halachah follows Rav Huna, for a Mitzvah of the body has precedence. Also, the Talmud (Yerushalmi) explains his reason. This shows that it is primary.
Shirei Korban (Sof Megilah): In our text, the Yerushalmi explains also Shmuel's reason. Also, it supports Shmuel from a Beraisa! I would say that we rule like Rav Huna because the Bavli says that Tefilin are more Kodesh than a Mezuzah, and one may not use a Tefilin parchment for a Mezuzah for this lowers its Kedushah. Why didn't the Rosh say so?
R. Akiva Eiger: The Rosh rules like Rav Huna, for a Mitzvah of the body has precedence. Also, the Talmud explains his reason. This shows that it is primary. I say that the argument of Shmuel and Rav Huna depends on Zevachim 91a. Rava rejected the Gemara's proof that Kodesh has precedence over Tadir, for Shelamim is more common, but it is not more Tadir than Chatas or Asham. Rashi explains that there is no obligation to bring Shelamim more regularly. Rav Huna bar Yehudah argues, and says that what is more common is considered Tadir! We can say that Shmuel holds like Rav Huna bar Yehudah, and therefore holds that Mezuzah is more Tadir than Tefilin, since it applies on Shabbos and Yom Tov. Rav Huna holds like Rava, that common is not Tadir. Tefilin is obligatory on weekdays, and one can be exempt from Mezuzah the entire year, if he goes on the sea or Midbar. The Yerushalmi says that Rav Huna's reason is because it applies to people at sea or in the Midbar, i.e. therefore Mezuzah is merely more common, but it is not Tadir. Based on such reasoning, Sha'agas Aryeh (21) says that on weekdays Sefiras ha'Omer is more Tadir than Birkas ha'Mazon, for one need not eat.
R. Akiva Eiger: We find that Tadir has precedence when both Mitzvos are available, so he does the Tadir Mitzvah first. Here, when he will be unable to fulfill Tefilin or Mezuzah, we cannot say that he does the Tadir Mitzvah first. However, we can say that the Tadir Mitzvah overrides the less Tadir, like the Rosh (Shabbos 2:12) and Tosfos (Sukah 54b DH v'Amai). Since we conclude in Zevachim like Rava, the Halachah follows Rav Huna. Even though the Gemara did not resolve whether Mekudash has precedence over Tadir, we hold that Tefilin are more Kodesh than Mezuzah (YD 290:1).
Rashi (91a DH Ki): Milah is much more frequent than Pesach.
Sha'agas Aryeh (21): I.e. Milah is done [within Klal Yisrael] many times every day.
Sefas Emes (91a DH Tadirah): Even though Milah is not performed constantly, a circumcised man fulfills it constantly.
Shulchan Aruch (OC 38:12): If one needs Tefilin and a Mezuzah, and he cannot afford both, Tefilin has precedence.
Beis Yosef (DH Hayah): The Yerushalmi supported Shmuel from a Beraisa. Do not ask how the Rosh rejected this from mere reasoning. The Bavli holds that Tefilin is more Kodesh.
Magen Avraham (15) and Mishnah Berurah (37): Tefilin has precedence because it is Chovas ha'Guf (obligatory on the body). However, [nowadays] we wear Tefilin only at the time of Keri'as Shema and Tefilah. If one can borrow Tefilin, Mezuzah has precedence [he spends his money for a Mezuzah], since one cannot borrow a Mezuzah.
Pischei Teshuvah (YD 285:2): Chomos Yerushalayim (Sof 265) says that if one wants to wherever Tefilin the entire day, and he cannot borrow them, it is not clear which has precedence. Sha'arei Teshuvah (OC 25:1) says that if one is not sure that he will be able to borrow Tefilin every day, it has precedence over Tzitzis. If so, in such a case Tefilin has precedence over Mezuzah. I say that perhaps Tefilin has precedence only when if he does not buy, he Vadai will not fulfill the Mitzvah. If perhaps he will be able to borrow Tefilin, perhaps Mezuzah or Tzitzis has precedence over the Safek lest he be unable to borrow. This refers to his own house or garment. A rented house or a borrowed garment is liable after 30 days mid'Rabanan. Surely, a Safek about Tefilin overrides a Vadai mid'Rabanan. We say (OC 595:1) that a Safek about Shofar overrides Vadai Tefilas Musaf for one who cannot fulfill both. If buying Tefilin, which are expensive, will cause him to neglect Mezuzah and Tzitzis, this requires investigation.
Rema (YD 285:1): If one cannot afford Tefilin and Mezuzah, he buys Tefilin, and not a Mezuzah, for a Mitzvah that is Chovas ha'Guf has precedence.
Gra: The Rosh says that presumably, the Halachah follows Rav Huna, for a Mitzvah of the body has precedence. This is astounding. The Yerushalmi did not mention this at all! The Rosh decided based on his own opinion. However, we can say that the Bavli brings the Beraisa oppositely (and says that Tefilin are more Kodesh), and it supports Rav Huna.
R. Akiva Eiger: Presumably, Mitzvas ha'Guf has precedence because one cannot exempt himself from it. Regarding Mezuzah, there is no obligation to build a house and affix a Mezuzah. Only if one has a house, he must affix a Mezuzah, like we say that Mezuzah is an obligation on the resident. The Rema wrote similarly in OC 17:2 [that it is haughtiness for a woman to fulfill Tzitzis, since it is not Chovas ha'Guf]. The Beis Hillel explains that the Rema means that Tefilin is Chovas ha'Guf, i.e. a garment, and the Mitzvah is on his body itself, unlike Mezuzah. He says that similarly, Tefilin has precedence over Sukah, Lulav and Tzitzis, for it is more of a Chovas ha'Guf than they are. I hold that what I said is correct. Perhaps Sukah is a greater Chiyuv than Tefilin, for it is obligatory also on the first night. The same applies to Lulav. (It is obligatory also on Yom Tov, unlike Tefilin.) I agree that Tefilin is more obligatory than Tzitzis, which is just like Mezuzah. It is not Chovas ha'Guf, just if one wears a four-cornered garment, he must attach Tzitzis.
R. Akiva Eiger: I later saw that the Yerushalmi, which is the source of this Halachah, says explicitly like I said. Rav Huna holds that Tefilin has precedence, for it applies to seafarers and people who traverse Midbaros. I.e. one cannot exempt himself from it. One at sea is exempt from Mezuzah. However, he is liable in Lulav. However, perhaps Tefilin has precedence over Sukah and Lulav because it applies the entire year, and they apply only once a year. This is like Shmuel, who says that Mezuzah has precedence over Tefilin because it applies on Shabbos and Yom Tov [so it is more Tadir]. Rav Huna argues, because Tefilin is Chovas ha'Guf. If so, since also Lulav is Chovas ha'Guf, we rely on Shmuel's reasoning, that Tefilin applies the entire year. However, it seems that Lulav has precedence over Tzitzis. Even though Tzitzis applies the entire year, Lulav is Chovas ha'Guf.
R. Akiva Eiger: Even though the Yerushalmi holds that Mezuzah is more Kodesh, why does it ignore the fact that Tefilin is Mitzvas ha'Guf? I answer even according to Rav Huna, who holds that Tefilin is Tadir, the Yerushalmi holds that Mekudash has precedence over Tadir. However, we hold that Tefilin are more Kodesh.