47
Comments
  • 7
    Damn this one hurts 😫
  • 3
    @linuxxx I feel like I need bleach for my eyes
  • 2
    @gaben I'd go with some kinda deadly acid I think!
  • 0
    kill it with fire.
  • 4
    @No-one
    thats worse then PHP.
    that shit wont even compile using PHP.
  • 1
    You guys are a bit harsh. It seems to be pseudo code targeted toward the babysitter platform. They are usually not developers.

    To make you php lovers happy, the following code will work when functions are implemented (well watch_takeover at least):
    <?php

    $callbacks = [
    'clown',
    'change_diaper',
    'put_to_bed',
    'contact_parent',
    ];

    $tears = false; // will be set by external forces
    $watch_baby = true;

    while ($watch_baby) {
    foreach($callbacks as $resolution) {
    if (!$tears) {
    break;
    }

    if (is_callable($resolution)) {
    $resolution();
    }
    }

    if (watch_takeover()) {
    $watch_baby = false;
    }
    }
Add Comment