1--TEST--
2Test http_response_code basic functionality
3--CREDITS--
4Gabriel Caruso (carusogabriel@php.net)
5--SKIPIF--
6<?php
7if (getenv('SKIP_REPEAT')) {
8    /* The http_response_code leaks across repeats. Technically that's a bug, but it's something
9     * that only affects the CLI repeat option, where the response code is not meaningful in the
10     * first place. Other SAPIs will properly reset the response code for each request. */
11    die('skip Not repeatable');
12}
13?>
14--FILE--
15<?php
16var_dump(
17    // Get the current default response code
18    http_response_code(),
19    // Set a response code
20    http_response_code(201),
21    // Get the new response code
22    http_response_code()
23);
24?>
25--EXPECT--
26bool(false)
27bool(true)
28int(201)
29