Properly report versions in PHP7 mode
commita8cd9341740577b86053d4a3b76c19c901f5c633
authorJosh Watzman <jwatzman@fb.com>
Sat, 12 Dec 2015 18:45:58 +0000 (12 10:45 -0800)
committerhhvm-bot <hhvm-bot@fb.com>
Sat, 12 Dec 2015 19:00:31 +0000 (12 11:00 -0800)
tree0efbea4b58ce4ed498386b3632d2465f076f04d3
parent26c7b33268aebf93dc076456c09b3c032aca855a
Properly report versions in PHP7 mode

Summary:
This ended up being somewhat more annoying than you would hope, due to a couple of places that assumed the version was a compile-time constant. Also, wiring the switch into mangleUnitMd5 is weird, but in repo mode, `PHP_VERSION_MAJOR` can get inlined, so it does actually affect bytecode emission :\

Fixes https://github.com/facebook/hhvm/issues/6636

Reviewed By: paulbiss

Differential Revision: D2732232

fb-gh-sync-id: a54e2216d12fd875df698aa35c06669f1ea4d435
14 files changed:
hphp/runtime/base/runtime-option.cpp
hphp/runtime/base/runtime-option.h
hphp/runtime/base/unit-cache.cpp
hphp/runtime/ext/datetime/ext_datetime.cpp
hphp/runtime/ext/hotprofiler/ext_hotprofiler.cpp
hphp/runtime/ext/std/ext_std_misc.cpp
hphp/runtime/ext/std/ext_std_misc.h
hphp/runtime/ext/std/ext_std_options.cpp
hphp/test/slow/php7_bcbreak/5/version.php [new file with mode: 0644]
hphp/test/slow/php7_bcbreak/5/version.php.expect [new file with mode: 0644]
hphp/test/slow/php7_bcbreak/7/version.php [new file with mode: 0644]
hphp/test/slow/php7_bcbreak/7/version.php.expect [new file with mode: 0644]
hphp/test/slow/php7_bcbreak/7/version.php.hphp_opts [new file with mode: 0644]
hphp/test/slow/php7_bcbreak/7/version.php.ini [new file with mode: 0644]