I was trying in JS. Probably comes from this recent question on Code Golf - codegolf. Show 1 more comment. Active Oldest Votes. This behavior is alluded to in the documentation : It is recommended that you avoid "stacking" ternary expressions. PHP's behaviour when using more than one ternary operator within a single statement is non-obvious… The Wikipedia article on the?
See also: Bug Improve this answer. Community Bot 1 1 1 silver badge. I would rephrase "most languages" to "all other languages which feature ternary conditionals".
But PHP. PHP's behaviour [ I always get a kick out of that line in the manual. Such a cute euphemism for "completely wrong".
Show 4 more comments. The Overflow Blog. Gerenuk Gerenuk 1, 2 2 gold badges 14 14 silver badges 21 21 bronze badges. The point was to put the foundation of mathematics on firmly rigorous ground in a highly axiomatized system. Show 11 more comments. Active Oldest Votes. I have to check that. Add a comment. Dejan Govc Dejan Govc 16k 5 5 gold badges 40 40 silver badges 79 79 bronze badges.
Featured on Meta. Now live: A fully responsive profile. Linked Related 2. Hot Network Questions. Mathematics Stack Exchange works best with JavaScript enabled. Accept all cookies Customize settings. If current programs and approaches are not getting the job done, then we need to take action now and find those lasting, more comprehensive solutions that work in an increasingly interconnected world. We need to learn how to improve our efforts to empower people to build healthy, productive communities around the world.
We would like to use cookies 1 to learn how our website is used and how it performs, 2 to provide you with additional functionalities to watch videos and 3 to provide you with social media interactions. FHI does not collect any personally identifying information collected through our cookies, although Google Analytics and YouTube may collect your browser information and IP address.
For more information about our cookies and how we use them, please read our Website Cookie Notice. Manage consent preferences Accept All. Manage consent. Close Privacy Overview This website uses cookies to improve your experience while you navigate through the website.
Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience. Necessary Necessary. Necessary cookies are absolutely essential for the website to function properly.
These cookies ensure basic functionalities and security features of the website, anonymously. The cookie is used to store the user consent for the cookies in the category "Analytics".
0コメント