Produce different behaviour in all versions of your language
Python

if 2 + 2 is 4:
    # Lies must be abolished

    try:
        fact = '2 + 2 = %r' % 5
        exec('True = False')
        exec('assert (2 + 2 == 5) is True')
    except ValueError:
        print('War is peace.')    
    except NameError:
        print('Freedom is slavery.')
    except SyntaxError:
        print('Ignorance is strength.')

else:
    # All is good
    print('Big Brother is watching you.')


(Edit: Had to make a change because string formatting was actually introduced in... 0.9.9)

Tested on the following versions:


0.9.1: Prints Big Brother is watching you. because 2 + 2 is 5.*
1.5: Prints War is peace. since %r string formatting is unavailable, raising a ValueError,
2.1: Prints Freedom is slavery. since True is not defined, raising a NameError,
3.4: Prints Ignorance is strength. since True cannot be assigned to, raising a SyntaxError.


As a bonus, Python 2.3 to 2.7 gives no output, since the assertion passes.

Note that there are four spaces on both "blank" lines, and the file also needs to have a trailing newline.

* is checks object equality, and only from 1.0.0 onwards were small integers shared. You can still see the effect today by trying larger numbers, e.g. 999 + 1 is 1000 gives False.