bagfda
Last Updated: February 25, 2016
·
768
· antony492
P4 colour jpg

Code For All PHP Developers

php
foreach ($problems as $problem) {
    $problemSolved = $this->solve($problem);
    if (!$problemSolved) {
        $this->execute(self::SHOOT);
    }
}
Say Thanks
Respond

9 Responses
Add your response

1184
Dbcdc33cdabd0743668b302fe7bf6b2d
foreach ($problems as $problem) {
    $this->solve($problem) || $this->execute(self::SHOOT);
}

To make the situation a little more worrying ;)

over 1 year ago ·
1195
4749d60af0d45cc6ed8eaf014edb1f65

Do I die() after I shoot myself?

over 1 year ago ·
1202
Me

that should be placed inside a recursive function.
all problems shoud be solved

over 1 year ago ·
1254
Fb613ae74d247c05eba250f575e2c9b0

@narven Nope. Iteration into infinity.

over 1 year ago ·
1256
Dsc 6249

lol

over 1 year ago ·
1389

love this !

over 1 year ago ·
1500
over 1 year ago ·
2343
40cd1350403e5f6511745afed34d69ae

@mauris no, you will just exit; life and continue to cemetery :)

over 1 year ago ·
3316
10dfb9071cea4272eabdfb91d18f377f

You forgot something!

foreach ($problems as $problem) {
    $problemSolved = $this->solve($problem);
    if (!$problemSolved) {
        $this->execute(self::SHOOT);
    }
    $problems[] = new Problem();
}
over 1 year ago ·