hhvm icon indicating copy to clipboard operation
hhvm copied to clipboard

Authoritative repository and code errors

Open nowak-ninja opened this issue 12 years ago • 1 comments

Hi, when configuring Jenkins project, I realised that creating HHBC repository with non existing function call in code produces only an entry in CodeErrors.js in repo dir but allows to compile repository and run HHVM instance. Is this intended?

nowak-ninja avatar Mar 11 '14 17:03 nowak-ninja

Yes. You might have a framework which optionally uses certain extensions when they're available, for example:

if (extension_loaded('password')) {
  $hash = password_hash($_GET['pwd']);
} else {
  $hash = md5($_GET['pwd']);
}

In this example password_hash() might not be defined, but that's fine since it'll never be called when extension_loaded() returns false.

sgolemon avatar Mar 11 '14 18:03 sgolemon