phpv8 / v8js

V8 Javascript Engine for PHP — This PHP extension embeds the Google V8 Javascript Engine
http://pecl.php.net/package/v8js
MIT License
1.84k stars 200 forks source link

Add a `./configure` flag to completely disable registerExtension? #334

Closed TysonAndre closed 7 years ago

TysonAndre commented 7 years ago

Summary

Because snapshots are incompatible with extensions, there should be a way to prevent PHP from using extensions, completely.

https://github.com/phpv8/v8js#snapshots

snapshots are incompatible with extensions

My use case:

stesie commented 7 years ago

This likely will not work as you want it to, at least if you set auto_enable.

Depending on the PHP SAPI you use multiple requests will be served by one PHP process; if the first request is handled by a legacy one, then registerExtension will happily add it. If the next request goes to a new application version that one will auto-enable the extension, yet initialize with a snapshot.