1--TEST--
2Test strict declaration being first operation only
3--FILE--
4<?php
5
6function takes_int(int $x) {
7    global $errored;
8    if ($errored) {
9        echo "Failure!", PHP_EOL;
10        $errored = FALSE;
11    } else {
12        echo "Success!", PHP_EOL;
13    }
14}
15
16?>
17<?php
18
19declare(strict_types=1);
20var_dump(takes_int(32));
21
22?>
23--EXPECTF--
24Fatal error: strict_types declaration must be the very first statement in the script in %s on line %d
25