- strpos: documentation ( source)
- get_defined_constants: documentation ( source)
<?php
foreach (get_defined_constants() as $name => $value) {
if (strpos($name, 'STREAM_CRYPTO_METHOD_') === 0) {
echo $name . ' = ' . $value . PHP_EOL;
}
}