Created
September 12, 2016 13:59
-
-
Save renan/777d575a14d79f02a278800b53b3b4aa to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if (extension_loaded('xdebug')) { | |
// Use a empty php.ini and not extra ini files | |
putenv('PHP_INI_SCAN_DIR=/tmp/composer-php-empty'); | |
passthru('php -c php.ini main.php', $exitCode); | |
} else { | |
// Run with the env var | |
passthru('php sub.php', $exitCode); | |
// Reset the env var | |
putenv('PHP_INI_SCAN_DIR'); | |
passthru('php sub.php', $exitCode); | |
} | |
exit($exitCode); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; Empty |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
var_dump(extension_loaded('intl')); | |
var_dump(extension_loaded('xdebug')); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Outputs: