A long time ago I made a Tumblr that showed off <> parts of programming
languages.
This was inspired by the wonderful presentation by
Gary Bernhardt.
Content from that Tumblr has been transplanted here, and improved with hidden
results so each wat can be revealed incrementally.
Python 2
These only work in Python versions starting with 2.
Such versions are now dead.
Output
Output
Output
Python 3
These work in python2 as well as modern python3.
Output
Output
OutputOutputOutput
REPL:
OutputOutputOutputOutputOutputOutput
Perl
Output
Output
Javascript
REPL:
OutputOutputOutput
Output
PHP
Some only apply to certain versions of PHP.
3V4L was used to test all versions of PHP.
Versions 4.3.0 - 7.3.33
Output
Lack of additional parentheses is deprecated in 7.4.0 - 7.4.33 and an error in 8.0.0 and above
Versions 4.3.0 - 7.4.33
OutputOutput
note: for version 8.0.0 and above this is `bool(false)`
Output
Versions 5.0.0 - 5.6.40
Output
No error is raised for versions above 5.6.40
Output
Versions 4.3.0 - 5.4.3
Output
Output is `bool(false)` for versions above 5.4.3
Versions 4.3.0 - 5.1.6
Output Versions 4.3.0-5.0.5Output Versions 5.1.0-5.1.6
Output is `string(8) "February"` for versions above 5.1.6
Versions 4.3.0 - 7.4.33
Output
Output is `bool(false)` for versions above 7.4.33