Skip to content

Instantly share code, notes, and snippets.

@deleugpn
Created December 16, 2025 11:07
Show Gist options
  • Select an option

  • Save deleugpn/2a27c6437e19a4bef071138a42fd4451 to your computer and use it in GitHub Desktop.

Select an option

Save deleugpn/2a27c6437e19a4bef071138a42fd4451 to your computer and use it in GitHub Desktop.
<?php declare(strict_types=1);
$iterator = ['foo', 'bar', 'baz'];
foreach ($iterator as $key => $value) {
}
using (new ContextManager as $context) {
}
using ($manager = new ContextManager as $context) {
}
using (new ContextManager as $manager => $context) {
}
with (new ContextManager as $context) {
}
for using (new ContextManager as $context) {
}
try using (new ContextManager as $context) {
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment