What is the expected behavior with regards to strict type checking? PHP7 defaults to “coercive mode” while hhvm.php7.all = 1 appears to act like "strict mode" in this example?
HHVM Version
HHVM 3.14.1 hhvm.php7.all = 1
PHP 7.0.4
Standalone code, or other way to reproduce the problem
<?php
$result = rtrim(null);
echo $result;
Expected result
identical (no output)
Actual result
hhvm --php test.php
Warning: rtrim() expects parameter 1 to be string, null given in /home/vagrant/hhvm/hphp/test.php on line 3
php7 test.php
Potential Solutions
Perhaps hhvm.php7.scalar_types should be left out of hhvm.php7.all? It appears currently to make HHVM act like PHP7's declare(strict_types=1); mode.
What is the expected behavior with regards to strict type checking? PHP7 defaults to “coercive mode” while hhvm.php7.all = 1 appears to act like "strict mode" in this example?
HHVM Version
HHVM 3.14.1 hhvm.php7.all = 1
PHP 7.0.4
Standalone code, or other way to reproduce the problem
Expected result
identical (no output)
Actual result
php7 test.phpPotential Solutions
Perhaps hhvm.php7.scalar_types should be left out of hhvm.php7.all? It appears currently to make HHVM act like PHP7's
declare(strict_types=1);mode.