"PORTB" is an AVR chip thing. Teensy3 uses an ARM chip, which has GPIOA_PDOR as a "somewhat similar" thing.
Any Arduino code that uses PORTB will require some significant effort to run on a Teensy3 (this is "direct port manipulation", which is "underneath" the Arduino libraries. Any compatibility between Arduino variants with different CPUs will only be for programs that use the libraries...
That said, Paul has gone to great lengths to provide some AVR port emulation.
The emulation code will emulate the PORTx/DDRx/PINx registers of the UNO.
The resulting pins controlled with be same Arduino pin # as the corresponding
Arduino pin # in the AVR port register for an Arduino UNO.
PORTB |= 0x2;
will control Arduino pin #9.
While not a true and full emulation of the AVR registers, it may
allow some code to work unmodified.
You can see the code in avr_emulation.h down in the core directory.