Comments (3)
To be exact, the if it exists
part is true when accessing potentially-missing array keys. But accessing a non-existent variable won't be allowed even with this operator (side note: this is also the way this operator works in JS, where a ?? 'fallback'
will still throw a ReferenceError if the variable a
does not exist)
from symfony-docs.
@stof It specifically calls out "like PHP null-coalescing", where $never_defined ?? 'fallback'
is perfectly valid thing.
from symfony-docs.
Yeah, this part should be updated. I'm not saying that the doc is correct right now. But the part saying if it exists
must not be removed entirely either.
from symfony-docs.
Related Issues (20)
- [HttpFoundation] Add temporary URI signed HOT 1
- [Conventions] List of code values: remove comma ? HOT 3
- [Console] Add a way to use custom lock factory in lockableTrait
- [Console] Allow to return all tokens after the command name
- [Workflow] Add EventNameTrait to compute event name strings in subscrib…
- [DependencyInjection] Apply attribute configurator to child classes HOT 2
- [WebProfilerBundle] [WebProfilerPanel] Update the design of the workflo…
- [Bug] Symfony Doc Display Issue on Desktop HOT 9
- [Symfony v5.4] composer require webapp in setup.html HOT 3
- [Validator] Using TranslateableMessage with ExecutionContext::buildViolation HOT 2
- [Uid] Add a note on the use of entity primary keys HOT 4
- [Testing] Formatting assertions list HOT 2
- [Website] Links to method on Github maybe broken on Firefox HOT 1
- The file "/config" does not exist. at FileLocator.php line 46 HOT 1
- [Form] How to use expressions in forms without a data class
- [WebProfilerBundle] Update main menu to display active panels first
- [Configuration] Ask for a rephrasing of a part concerning real env vars and env vars created by .env files
- [Emoji] Add the gitlab locale
- [DependencyInjection] Prepending extension configs with file loaders
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from symfony-docs.