A wedding ceremony expressed as PHP code (Affiliate)! Who said geeks and nerds can’t be romantic?
Available on a greeting card or postcard on Redbubble (Affiliate)!
Compile error: cannot resolve assignment ($I = “do”) to Boolean expression
I’m not a PHP guy, but is there an == missing on if ($i = ‘do’) ?
If it works as C or other languages, maybe it makes reference to the assignment made correctly. I do not know, I am not a PHP programmer either
This is intentional – the marriage in this instance is arranged
Ya there are a few bugs. Not only is $i == ‘do’ not property testing for true but the vows are stuck in a infinite loop so you’ll never get to register. Basically it’s wedding hell. Stuck giving vows for the rest of your life or at least until your memory runs out. lol
All those “=== 1” and the “$objections != true” are freshman errors. And defining a funcion conditionally? just to use it the next line? a function whose arguments are not even used and a body that could just be inlined? And the whole while() and vow incrementing stuff… I didn’t even noticed at first that the whole thing is a function that’s invoked the next line it’s defined.
OMG, $details isn’t even set the moment it is used, so your ceremony is gonna have an ugly warning all over.
This marriage is condemned from the start.
Agree. Not to mention all those && should be ||
Yup, if ($i = ‘do’) is wrong. it should be ==.
No on second look the braces just aren’t lining up right. The wedding is back on. The ceremony could use a code beautifier though.
For code like this, is why we PHP coders have a bad reputation.
PHP is the reason PHP coders have a bad reputation
$richer && $poorer && $sicker && $health can’t all satisfy the true condition at the same time, this doesn’t make any sense. You can’t be poorer and richer at the same time.
In short, that’s not a nerd wedding, because if that monstrosity went anywhere near a nerd wedding it would be whiteboards at dawn and everyone would have gone home in disgust.
I would never get married using this function: its code is formatted awfully!
As a PHP developer, I’ve gotta say that this is some ugly-ass PHP code. Also, nobody uses <? as an opening tag if they have any sense at all.
I see some more problems with this code…
Why on earth somebody define the do_vow() and have_hold() functions just to use them once?
Not to mention the $f variable which now holds “fingerring” – not sure if this means what the author intended…
It would truly be a nerd wedding if it was in Assembler, Fortran or PL/1…
fking noob php syntax
bunch of hopeless romantics, the lot of ya.
I reckong it’s missing the ‘else’ part?