/* * This file is part of Psy Shell. * * (c) 2012-2025 Justin Hileman * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Psy; use Psy\Exception\BreakException; use Psy\ExecutionLoop\ProcessForker; use Psy\ManualUpdater\ManualUpdate; use Psy\Util\DependencyChecker; use Psy\VersionUpdater\GitHubChecker; use Psy\VersionUpdater\Installer; use Psy\VersionUpdater\SelfUpdate; use Symfony\Component\Console\Formatter\OutputFormatter; use Symfony\Component\Console\Input\ArgvInput; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputDefinition; use Symfony\Component\Console\Input\InputOption; if (!\function_exists('Psy\\sh')) { /** * Command to return the eval-able code to startup PsySH. * * eval(\Psy\sh()); */ function sh(): string { if (\version_compare(\PHP_VERSION, '8.0', '<')) { return '\extract(\Psy\debug(\get_defined_vars(), isset($this) ? $this : @\get_called_class()));'; } return <<<'EOS' if (isset($this)) { \extract(\Psy\debug(\get_defined_vars(), $this)); } else { try { static::class; \extract(\Psy\debug(\get_defined_vars(), static::class)); } catch (\Error $e) { \extract(\Psy\debug(\get_defined_vars())); } } EOS; } } if (!\function_exists('Psy\\debug')) { /** * Invoke a Psy Shell from the current context. * * For example: * * foreach ($items as $item) { * \Psy\debug(get_defined_vars()); * } * * If you would like your shell interaction to affect the state of the * current context, you can extract() the values returned from this call: * * foreach ($items as $item) { * extract(\Psy\debug(get_defined_vars())); * var_dump($item); // will be whatever you set $item to in Psy Shell * } * * Optionally, supply an object as the `$bindTo` parameter. This determines * the value `$this` will have in the shell, and sets up class scope so that * private and protected members are accessible: * * class Foo { * function bar() { * \Psy\debug(get_defined_vars(), $this); * } * } * * For the static equivalent, pass a class name as the `$bindTo` parameter. * This makes `self` work in the shell, and sets up static scope so that * private and protected static members are accessible: * * class Foo { * static function bar() { * \Psy\debug(get_defined_vars(), get_called_class()); * } * } * * @param array $vars Scope variables from the calling context (default: []) * @param object|string $bindTo Bound object ($this) or class (self) value for the shell * * @return array Scope variables from the debugger session */ function debug(array $vars = [], $bindTo = null): array { echo \PHP_EOL; $sh = new Shell(); $sh->setScopeVariables($vars); // Show a couple of lines of call context for the debug session. // // @todo come up with a better way of doing this which doesn't involve injecting input :-P if ($sh->has('whereami')) { $sh->addInput('whereami -n2', true); } if (\is_string($bindTo)) { $sh->setBoundClass($bindTo); } elseif ($bindTo !== null) { $sh->setBoundObject($bindTo); } $sh->run(); return $sh->getScopeVariables(false); } } if (!\function_exists('Psy\\info')) { /** * Get a bunch of debugging info about the current PsySH environment and * configuration. * * If a Configuration param is passed, that configuration is stored and * used for the current shell session, and no debugging info is returned. * * @param Configuration|null $config * * @return array|null */ function info(?Configuration $config = null) { static $lastConfig; if ($config !== null) { $lastConfig = $config; return null; } $config = $lastConfig ?: new Configuration(); $configEnv = (isset($_SERVER['PSYSH_CONFIG']) && $_SERVER['PSYSH_CONFIG']) ? $_SERVER['PSYSH_CONFIG'] : false; if ($configEnv === false && \PHP_SAPI === 'cli-server') { $configEnv = \getenv('PSYSH_CONFIG'); } $shellInfo = [ 'PsySH version' => Shell::VERSION, ]; $core = [ 'PHP version' => \PHP_VERSION, 'OS' => \PHP_OS, 'default includes' => $config->getDefaultIncludes(), 'require semicolons' => $config->requireSemicolons(), 'strict types' => $config->strictTypes(), 'error logging level' => $config->errorLoggingLevel(), 'config file' => [ 'default config file' => ConfigPaths::prettyPath($config->getConfigFile()), 'local config file' => ConfigPaths::prettyPath($config->getLocalConfigFile()), 'PSYSH_CONFIG env' => ConfigPaths::prettyPath($configEnv), ], // 'config dir' => $config->getConfigDir(), // 'data dir' => $config->getDataDir(), // 'runtime dir' => $config->getRuntimeDir(), ]; // Use an explicit, fresh update check here, rather than relying on whatever is in $config. $checker = new GitHubChecker(); $updateAvailable = null; $latest = null; try { $updateAvailable = !$checker->isLatest(); $latest = $checker->getLatest(); } catch (\Throwable $e) { } $updates = [ 'update available' => $updateAvailable, 'latest release version' => $latest, 'update check interval' => $config->getUpdateCheck(), 'update cache file' => ConfigPaths::prettyPath($config->getUpdateCheckCacheFile()), ]; $input = [ 'interactive mode' => $config->interactiveMode(), 'input interactive' => $config->getInputInteractive(), 'yolo' => $config->yolo(), ]; if ($config->hasReadline()) { $info = \readline_info(); $readline = [ 'readline available' => true, 'readline enabled' => $config->useReadline(), 'readline service' => \get_class($config->getReadline()), ]; if (isset($info['library_version'])) { $readline['readline library'] = $info['library_version']; } if (isset($info['readline_name']) && $info['readline_name'] !== '') { $readline['readline name'] = $info['readline_name']; } } else { $readline = [ 'readline available' => false, ]; } $output = [ 'color mode' => $config->colorMode(), 'output decorated' => $config->getOutputDecorated(), 'output verbosity' => $config->verbosity(), 'output pager' => $config->getPager(), ]; $theme = $config->theme(); // @todo show styles (but only if they're different than default?) $output['theme'] = [ 'compact' => $theme->compact(), 'prompt' => $theme->prompt(), 'bufferPrompt' => $theme->bufferPrompt(), 'replayPrompt' => $theme->replayPrompt(), 'returnValue' => $theme->returnValue(), ]; $pcntl = [ 'pcntl available' => DependencyChecker::functionsAvailable(ProcessForker::PCNTL_FUNCTIONS), 'posix available' => DependencyChecker::functionsAvailable(ProcessForker::POSIX_FUNCTIONS), ]; if ($disabledPcntl = DependencyChecker::functionsDisabled(ProcessForker::PCNTL_FUNCTIONS)) { $pcntl['disabled pcntl functions'] = $disabledPcntl; } if ($disabledPosix = DependencyChecker::functionsDisabled(ProcessForker::POSIX_FUNCTIONS)) { $pcntl['disabled posix functions'] = $disabledPosix; } $pcntl['use pcntl'] = $config->usePcntl(); $history = [ 'history file' => ConfigPaths::prettyPath($config->getHistoryFile()), 'history size' => $config->getHistorySize(), 'erase duplicates' => $config->getEraseDuplicates(), ]; $manualDbFile = $config->getManualDbFile(); $manual = $config->getManual(); // If we have a manual but no db file path, it's bundled in the PHAR if ($manual && !$manualDbFile && \Phar::running(false)) { $docs = [ 'manual db file' => '', ]; } else { $docs = [ 'manual db file' => ConfigPaths::prettyPath($manualDbFile), ]; } if ($manual) { $meta = $manual->getMeta(); foreach ($meta as $key => $val) { switch ($key) { case 'built_at': $d = new \DateTime('@'.$val); $val = $d->format(\DateTime::RFC2822); break; } $key = 'manual '.\str_replace('_', ' ', $key); $docs[$key] = $val; } } $autocomplete = [ 'tab completion enabled' => $config->useTabCompletion(), 'bracketed paste' => $config->useBracketedPaste(), ]; $warmers = $config->getAutoloadWarmers(); $autoload = [ 'autoload warming enabled' => !empty($warmers), 'warmers configured' => \count($warmers), ]; if (!empty($warmers)) { $autoload['warmer types'] = \array_map('get_class', $warmers); // Add extended info for ComposerAutoloadWarmer foreach ($warmers as $warmer) { if ($warmer instanceof TabCompletion\AutoloadWarmer\ComposerAutoloadWarmer) { try { $autoload['composer warmer config'] = [ 'include vendor' => Sudo::fetchProperty($warmer, 'includeVendor'), 'include tests' => Sudo::fetchProperty($warmer, 'includeTests'), 'vendor dir' => Sudo::fetchProperty($warmer, 'vendorDir'), 'phar prefix' => Sudo::fetchProperty($warmer, 'pharPrefix'), ]; $includeNamespaces = Sudo::fetchProperty($warmer, 'includeNamespaces'); $excludeNamespaces = Sudo::fetchProperty($warmer, 'excludeNamespaces'); $includeVendorNamespaces = Sudo::fetchProperty($warmer, 'includeVendorNamespaces'); $excludeVendorNamespaces = Sudo::fetchProperty($warmer, 'excludeVendorNamespaces'); if (!empty($includeNamespaces)) { $autoload['composer warmer config']['include namespaces'] = $includeNamespaces; } if (!empty($excludeNamespaces)) { $autoload['composer warmer config']['exclude namespaces'] = $excludeNamespaces; } if (!empty($includeVendorNamespaces)) { $autoload['composer warmer config']['include vendor namespaces'] = $includeVendorNamespaces; } if (!empty($excludeVendorNamespaces)) { $autoload['composer warmer config']['exclude vendor namespaces'] = $excludeVendorNamespaces; } } catch (\ReflectionException $e) { // shrug } break; // Only show info for the first ComposerAutoloadWarmer } } } $implicitUse = []; $implicitUseConfig = $config->getImplicitUse(); if (\is_array($implicitUseConfig)) { if (!empty($implicitUseConfig['includeNamespaces'])) { $implicitUse['include namespaces'] = $implicitUseConfig['includeNamespaces']; } if (!empty($implicitUseConfig['excludeNamespaces'])) { $implicitUse['exclude namespaces'] = $implicitUseConfig['excludeNamespaces']; } } if (empty($implicitUse)) { $implicitUse = false; } // Shenanigans, but totally justified. try { if ($shell = Sudo::fetchProperty($config, 'shell')) { $shellClass = \get_class($shell); if ($shellClass !== 'Psy\\Shell') { $shellInfo = [ 'PsySH version' => $shell::VERSION, 'Shell class' => $shellClass, ]; } try { $core['loop listeners'] = \array_map('get_class', Sudo::fetchProperty($shell, 'loopListeners')); } catch (\ReflectionException $e) { // shrug } $core['commands'] = \array_map('get_class', $shell->all()); try { $autocomplete['custom matchers'] = \array_map('get_class', Sudo::fetchProperty($shell, 'matchers')); } catch (\ReflectionException $e) { // shrug } } } catch (\ReflectionException $e) { // shrug } // @todo Show Presenter / custom casters. return \array_merge( $shellInfo, $core, \compact( 'updates', 'pcntl', 'input', 'readline', 'output', 'history', 'docs', 'autocomplete', 'autoload' ), [ 'implicit use' => $implicitUse, ], ); } } if (!\function_exists('Psy\\bin')) { /** * `psysh` command line executable. * * @return \Closure */ function bin(): \Closure { return function () { if (!isset($_SERVER['PSYSH_IGNORE_ENV']) || !$_SERVER['PSYSH_IGNORE_ENV']) { if (\defined('HHVM_VERSION_ID')) { \fwrite(\STDERR, 'PsySH v0.11 and higher does not support HHVM. Install an older version, or set the environment variable PSYSH_IGNORE_ENV=1 to override this restriction and proceed anyway.'.\PHP_EOL); exit(1); } if (\PHP_VERSION_ID < 70400) { \fwrite(\STDERR, 'PHP 7.4.0 or higher is required. You can set the environment variable PSYSH_IGNORE_ENV=1 to override this restriction and proceed anyway.'.\PHP_EOL); exit(1); } if (\PHP_VERSION_ID > 89999) { \fwrite(\STDERR, 'PHP 9 or higher is not supported. You can set the environment variable PSYSH_IGNORE_ENV=1 to override this restriction and proceed anyway.'.\PHP_EOL); exit(1); } if (!\function_exists('json_encode')) { \fwrite(\STDERR, 'The JSON extension is required. Please install it. You can set the environment variable PSYSH_IGNORE_ENV=1 to override this restriction and proceed anyway.'.\PHP_EOL); exit(1); } if (!\function_exists('token_get_all')) { \fwrite(\STDERR, 'The Tokenizer extension is required. Please install it. You can set the environment variable PSYSH_IGNORE_ENV=1 to override this restriction and proceed anyway.'.\PHP_EOL); exit(1); } } $usageException = null; $shellIsPhar = Shell::isPhar(); $input = new ArgvInput(); try { $input->bind(new InputDefinition(\array_merge(Configuration::getInputOptions(), [ new InputOption('help', 'h', InputOption::VALUE_NONE), new InputOption('version', 'V', InputOption::VALUE_NONE), new InputOption('self-update', 'u', InputOption::VALUE_NONE), new InputOption('update-manual', null, InputOption::VALUE_OPTIONAL, '', false), new InputOption('info', null, InputOption::VALUE_NONE), new InputArgument('include', InputArgument::IS_ARRAY), ]))); } catch (\RuntimeException $e) { $usageException = $e; } try { $config = Configuration::fromInput($input); } catch (\InvalidArgumentException $e) { $usageException = $e; } // Handle --help if (!isset($config) || $usageException !== null || $input->getOption('help')) { // Determine if we should use colors $useColors = true; if ($input->hasParameterOption(['--no-color'])) { $useColors = false; } elseif (!$input->hasParameterOption(['--color']) && !\stream_isatty(\STDOUT)) { $useColors = false; } // Create output formatter for proper tag rendering $formatter = new OutputFormatter($useColors); if ($usageException !== null) { echo $usageException->getMessage().\PHP_EOL.\PHP_EOL; } $version = Shell::getVersionHeader(false); $argv = isset($_SERVER['argv']) ? $_SERVER['argv'] : []; $name = $argv ? \basename(\reset($argv)) : 'psysh'; $selfUpdateOption = $shellIsPhar ? "\n -u, --self-update Install a newer version if available" : ''; $helpText = <<Description: A runtime developer console, interactive debugger and REPL for PHP Usage: $name [options] [--] [...] Arguments: files PHP file(s) to load before starting the shell Options: -h, --help Display this help message --info Display PsySH environment and configuration info -V, --version Display the PsySH version{$selfUpdateOption} --update-manual[=LANG] Download and install the latest PHP manual (optional language code) --warm-autoload Enable autoload warming for better tab completion --yolo Run PsySH without input validation (you don't want this) -c, --config=FILE Use an alternate PsySH config file location --cwd=PATH Use an alternate working directory --color|--no-color Force (or disable with --no-color) colors in output -i, --interactive Force PsySH to run in interactive mode -n, --no-interactive Run PsySH without interactive input (requires input from stdin) -r, --raw-output Print var_export-style return values (for non-interactive input) --compact Run PsySH with compact output -q, --quiet Shhhhhh -v|vv|vvv, --verbose Increase the verbosity of messages Help: PsySH is an interactive runtime developer console for PHP. Use it as a REPL for quick experiments, or drop into your code with eval(\Psy\sh()); or \Psy\debug(); to inspect application state and debug interactively. For more information, see https://psysh.org Examples: $name # Start interactive shell $name -c ~/.config/psysh.php # Use custom config $name --warm-autoload # Enable autoload warming $name index.php # Load file before starting EOL; echo $formatter->format($helpText); exit($usageException === null ? 0 : 1); } // Handle --version if ($input->getOption('version')) { echo Shell::getVersionHeader($config->useUnicode()).\PHP_EOL; exit(0); } // Handle --info if ($input->getOption('info')) { // Store config for info() function info($config); $infoData = info(); // Format and display the info $output = $config->getOutput(); if ($config->rawOutput()) { $output->writeln(\var_export($infoData, true)); } else { $presenter = $config->getPresenter(); $output->writeln($presenter->present($infoData)); } exit(0); } // Handle --self-update if ($input->getOption('self-update')) { if (!$shellIsPhar) { \fwrite(\STDERR, 'The --self-update option can only be used with with a phar based install.'.\PHP_EOL); exit(1); } $selfUpdate = new SelfUpdate(new GitHubChecker(), new Installer()); $result = $selfUpdate->run($input, $config->getOutput()); exit($result); } // Handle --update-manual if ($input->getOption('update-manual') !== false) { $manualUpdate = ManualUpdate::fromConfig($config, $input); $result = $manualUpdate->run($input, $config->getOutput()); exit($result); } $shell = new Shell($config); // Pass additional arguments to Shell as 'includes' $shell->setIncludes($input->getArgument('include')); try { // And go! $exitCode = $shell->run(); if ($exitCode !== 0) { exit($exitCode); } } catch (BreakException $e) { // BreakException can escape if thrown before the execution loop starts // (though it shouldn't in normal operation) exit($e->getCode()); } catch (\Throwable $e) { \fwrite(\STDERR, $e->getMessage().\PHP_EOL); exit(1); } }; } } Có nên bôi kem nghệ để qua đêm? Thời điểm bôi kem nghệ tốt nhất – Trương Đại Quang

Có nên bôi kem nghệ để qua đêm? Thời điểm bôi kem nghệ tốt nhất

Nghệ chứa nhiều thành phần tốt cho da, đặc biệt là thành phần curcumin mang đến nhiều công dụng như: mờ sẹo, chống lão hóa da, tái tạo lại cấu trúc da, mờ thâm mụn… Vì vậy nghệ trở thành nguyên liệu của nhiều dòng kem trên thị trường. Vậy có nên bôi kem nghệ để qua đêm không?

[toc]

Ưu điểm của kem nghệ

Trong nghệ chứa rất nhiều hợp chất tốt cho da, đặc biệt là curcumin chiếm khoảng 3.14%. Đồng thời trong nghệ tươi còng chứa tinh dầu và nhiều thành phần như: turmerone, atlantone và zingiberene… đều mang đến những công dụng riêng biệt cho làn da.

Curcumin là thành phần nổi bật trong nghệ tươi mang đến công dụng thúc đẩy quá trình tái tạo da, làm tan mủ và hình thành tế bào mới. Đồng thời nghệ giúp giảm nấm hiệu quả – nguyên nhân gây viêm khi nổi mụn. Đặc biệt nghệ còn mang đến công dụng chống lại tác nhân gây oxy hóa trên da, giúp chống các gốc tự do.

Nghệ chứa nhiều thành phần cần thiết để da phát triển
Nghệ chứa nhiều thành phần cần thiết để da phát triển

Có nên bôi kem nghệ để qua đêm?

Chính vì những thành phần “vàng” trên nên kem nghệ trở thành sản phẩm được yêu thích vì mang đến nhiều công dụng cho làn da. Tuy nhiên, kem nghệ bôi qua đêm có được không? Tìm hiểu ngay

Gây bít tắc lỗ chân lông

Kem nghệ là một trong những sản phẩm quen thuộc với nhiều chị em trong quá trình làm đẹp. Tuy nhiên, nhiều bạn vì công dụng “thần thánh” của nghệ nên thường bôi kem nghệ qua đêm. Tuy nhiên, buổi tối làn da chúng ta cần nghỉ ngơi để phục hồi. Nếu không sẽ xuất hiện nhiều khuyết điểm trên da.

Kem nghệ thường được nhiều bạn dùng để bôi qua đêm. Tuy nhiên, đây là một sai lầm nhiều bạn mắc phải khi skincare. Vì lượng dưỡng chất của nghệ sẽ thẩm thấu vào da trong một thời gian ngắn, nếu đắp lâu trên da sẽ gây tình trạng khô căng da. Đồng thời các lớp kem khô trên bề mặt sẽ vô tình gây bít tắc lỗ chân lông dẫn đến tích tụ bã nhờn và bụi bẩn. Đây là môi trường thuận lợi để vi khuẩn mụn phát triển dẫn đến tình trạng mụn cám, mụn trứng cá, mụn bọc gây hư hại da.

Gây vàng da

Chắc hẳn các bạn cũng biết rằng dùng nghệ có một khuyết điểm rất lớn là có thể gây vàng da. Đây cũng là nguyên nhân khiến bạn cân nhắc lại việc bôi kem nghệ để qua đêm. Vì kem nghệ đa phần được điều chế từ nghệ thiên nhiên, nên rất dễ bám dính trên da. Những hoạt chất này thấm vào da khiến mô da bị biến đổi màu sắc.

Kem nghệ thoa lên da để qua đêm có thể gây ra tình trạng vàng da
Kem nghệ thoa lên da để qua đêm có thể gây ra tình trạng vàng da

Nếu thoa kem nghệ để qua đêm, việc vệ sinh da vào sáng sớm sẽ rất khó vì không thể rửa sạch được lớp vàng của nghệ bám trên da. Màu vàng của nghệ có thể bám vào quần áo, vỏ gối, chăn, ga,… trong lúc ngủ. Điều này cũng dẫn đến nhiều phiền toái nếu thoa kem nghệ để qua đêm.

*Qua những thông tin trên đây, chắc hẳn các bạn đã phần nào giải đáp được thắc mắc có nên thoa kem nghệ qua đêm đúng không nào.

Nên bôi kem nghệ vào lúc nào

Qua thông tin trên, chắc hẳn các bạn đã biết rằng có nên bôi kem nghệ để qua đêm hay không. Vậy đâu là cách sử dụng kem nghệ đúng để da hấp thu dưỡng chất tốt.

Bôi kem ngủ trước khi đi ngủ

Như đã nói ở trên, kem nghệ chứa nhiều dưỡng chất giúp nuôi dưỡng làn da. Vì vậy nên dùng kem nghệ vào ban đêm là tốt nhất, đây là thời điểm làn da đang trong quá trình nghỉ ngơi nên việc hấp thu cũng tốt hơn.

Bên cạnh đó, nghệ cũng chứa thành phần tẩy nhẹ nên sẽ phần nào bào mỏng da. Nếu thoa vào buổi sáng, da rất dễ bị tổn thương nếu tiếp xúc với ánh sáng mặt trời.

Nên thoa kem nghệ vào ban đêm để làn da hấp thu dưỡng chất tốt nhất
Nên thoa kem nghệ vào ban đêm để làn da hấp thu dưỡng chất tốt nhất

Giữ kem nghệ trên da khoảng 1 – 2 tiếng

Do chứa nhiều dưỡng chất kết hợp thêm các thành phần được nhà sản xuất thêm vào nên kem nghệ cần có thời gian đủ để hấp thu vào da. Nếu dùng kem nghệ các bạn nên làm sạch da trước sau đó thoa đều lên da một lớp mỏng trước khi đi ngủ khoảng 1 – 2 tiếng.

Tiếp đến các bạn để yên trên da khoảng 1 tiếng để da hấp thu hết dưỡng chất, hay để đến khi lớp mặt nạ khô lại là được.

Vệ sinh sạch da mặt sau khi thoa kem nghệ

Bên cạnh tránh việc bôi kem nghệ để qua đêm, các bạn nên chú ý vệ sinh da thật kỹ sau khi dùng kem nghệ. Vì như đã nói ở trên kem nghệ tuy chứa thành phần chính là tinh chất nghệ tươi, đồng thời còn được bổ sung thêm các dưỡng chất của riêng mỗi hãng.

Vì vậy, nếu không vệ sinh da sạch có thể gây bít tắc lỗ chân lông – nguyên nhân chính gây ra mụn viêm trên da. Việc rửa mặt sạch sẽ giúp da thông thoáng, hấp thu các dưỡng chất từ những bước skincare khác hiệu quả hơn.

*Sau khi thoa kem nghệ các bạn nên dùng nước mát rửa thật sạch da, rồi thoa toner để cân bằng da và thực hiện các bước skincare thông thường.

Vệ sinh da sạch sẽ sau khi thoa kem nghệ sẽ giúp da thông thoáng hơn
Vệ sinh da sạch sẽ sau khi thoa kem nghệ sẽ giúp da thông thoáng hơn

Kem nghệ được là một sản phẩm dưỡng da được ưa chuộng nhất hiện nay. Best skincare hy vọng với những thông tin trên đây, các bạn sẽ giải đáp được thắc mắc bôi kem nghệ để qua đêm được không? Và có thêm nhiều kiến thức bổ ích vào cẩm nang chăm da của mình.