A T. rex, or Tyrannosaurus rex, is a large, extinct dinosaur. When Phineas, Ferb and Candace were trapped in the Late Cretaceous period a T. rex destroyed the time machine that brought them and chased them. They eventually lost it, but it found them again. When they were back in the present at the museum the T. rex accidentally came with them. It tried to attack Candace but Doofenshmirtz's Freezeanator hit it and froze it. ("It's About Time!")
When the T. rex is chasing Candace, the theme from the Tyrannosaurus rex Grumpy from the 1970s television show Land of the Lost can be heard.
The Tyrannosaurus is depicted having three fingers, instead of having two, similar to the T. rex from the Rite of Spring segment from Disney's 1940 film Fantasia. However, the pictured Tyrannosaurus from Phineas and Ferb's Quantum Boogaloo is correctly shown with two fingers.