-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
In "PHP7 mode", instanceof $type does not work for $type = 'Throwable' #7537
Comments
also an issue in hhvm 3.12.0 - 3.13.2 in php7 mode and hhvm 3.15.3-3.16.0-dev in php7 mode
@mofarrell please remove the php5 incompatibility tag as this is only a php 7 mode issue. |
@photodude Does that mean 3v4l.org has HHVM "PHP 7 mode" support now? How do you enable/disable it? |
@ezzatron 3v4l.org has enabled HHVM's PHP 7 mode by default. Read this feature request (and please contribute to that discussion) https://3v4l.uservoice.com/forums/219058-general/suggestions/16257685-hhvm-in-php-5-mode |
Briefly looked into this. It isn't just
|
It's also true of all the the HH specific classes we import via the same mechanism. https://3v4l.org/lY1R1 |
It's a somewhat less of a big deal for the Hack-specific ones though since doing this is much less common/useful given Hack's typing system (and is totally banned in strict mode). |
Problems aren't just for dynamic usages - see https://3v4l.org/fKiQ3 #6747 |
FYI, this issue is preventing PHPUnit "skipped" tests from functioning, because it compares exceptions using
instanceof
against a variable containing'Throwable'
.EDIT: Changed
hhvm.php.all=1
tohhvm.php7.all=1
.HHVM Version
Standalone code, or other way to reproduce the problem
IMPORTANT: Code must be run with the INI setting
hhvm.php7.all=1
.Expected result
Actual result
With the INI setting
hhvm.php7.all=1
:The text was updated successfully, but these errors were encountered: