News for hackers. Stuff that matters.
Re:Ask HN: What is the future of the programmer? by k8tte on Monday June 08, 2015 @11:03AM (#9679527)
we will probably continue to program the problem solvers for some time to come.

        $code = '$z = 0;' . PHP_EOL
            . '$y = 0;' . PHP_EOL
            . '$x = 0;' . PHP_EOL
            . '$x = 0;' . PHP_EOL
            . '$y = 1;' . PHP_EOL
            . 'for ($count = 0; $count < 10; $count++) {' . PHP_EOL
            . '    $z = $x + $y;' . PHP_EOL
            . '    echo $z;' . PHP_EOL
            . '    $x = $y;' . PHP_EOL
            . '    $y = $z;' . PHP_EOL
            . '}';

        $this->assertPhpAndResultEquals(
            $code,
            '123581321345589',
            $this->asPhp(
                'sätt x till 0 och sätt y till 1 och upprepa följande 10 gånger:'
                . ' sätt z till x + y'
                . ' och visa z'
                . ' och sätt x till y'
                . ' och sätt y till z'
            )
        );

There are no comments on this comment yet.