3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php // In the beginning there are no Sundays counted yet $number_of_sundays = 0; // Make the following actions for all years of the twentieth century for ($current_year = 1900; $current_year <= 1999; $current_year++) { //Make the following actions for all months from January to December for ($current_month = 1; $current_month <= 12; $current_month++) { // Get Unix Timestamp of the current month and year on the first day of the month $current_date = mktime(0, 0, 0, $current_month, 01, $current_year); $get_day_of_week = date("D", $current_date); if ($get_day_of_week == "Sun") { echo "01".$current_month.".".$current_year."was a Sunday!"."\n"; } } }
Output for 4.3.0 - 5.0.5, 5.2.6 - 7.1.0
014.1900was a Sunday! 017.1900was a Sunday! 019.1901was a Sunday! 0112.1901was a Sunday! 016.1902was a Sunday! 012.1903was a Sunday! 013.1903was a Sunday! 0111.1903was a Sunday! 015.1904was a Sunday! 011.1905was a Sunday! 0110.1905was a Sunday! 014.1906was a Sunday! 017.1906was a Sunday! 019.1907was a Sunday! 0112.1907was a Sunday! 013.1908was a Sunday! 0111.1908was a Sunday! 018.1909was a Sunday! 015.1910was a Sunday! 011.1911was a Sunday! 0110.1911was a Sunday! 019.1912was a Sunday! 0112.1912was a Sunday! 016.1913was a Sunday! 012.1914was a Sunday! 013.1914was a Sunday! 0111.1914was a Sunday! 018.1915was a Sunday! 0110.1916was a Sunday! 014.1917was a Sunday! 017.1917was a Sunday! 019.1918was a Sunday! 0112.1918was a Sunday! 016.1919was a Sunday! 012.1920was a Sunday! 018.1920was a Sunday! 015.1921was a Sunday! 011.1922was a Sunday! 0110.1922was a Sunday! 014.1923was a Sunday! 017.1923was a Sunday! 016.1924was a Sunday! 012.1925was a Sunday! 013.1925was a Sunday! 0111.1925was a Sunday! 018.1926was a Sunday! 015.1927was a Sunday! 011.1928was a Sunday! 014.1928was a Sunday! 017.1928was a Sunday! 019.1929was a Sunday! 0112.1929was a Sunday! 016.1930was a Sunday! 012.1931was a Sunday! 013.1931was a Sunday! 0111.1931was a Sunday! 015.1932was a Sunday! 011.1933was a Sunday! 0110.1933was a Sunday! 014.1934was a Sunday! 017.1934was a Sunday! 019.1935was a Sunday! 0112.1935was a Sunday! 013.1936was a Sunday! 0111.1936was a Sunday! 018.1937was a Sunday! 015.1938was a Sunday! 011.1939was a Sunday! 0110.1939was a Sunday! 019.1940was a Sunday! 0112.1940was a Sunday! 016.1941was a Sunday! 012.1942was a Sunday! 013.1942was a Sunday! 0111.1942was a Sunday! 018.1943was a Sunday! 0110.1944was a Sunday! 014.1945was a Sunday! 017.1945was a Sunday! 019.1946was a Sunday! 0112.1946was a Sunday! 016.1947was a Sunday! 012.1948was a Sunday! 018.1948was a Sunday! 015.1949was a Sunday! 011.1950was a Sunday! 0110.1950was a Sunday! 014.1951was a Sunday! 017.1951was a Sunday! 016.1952was a Sunday! 012.1953was a Sunday! 013.1953was a Sunday! 0111.1953was a Sunday! 018.1954was a Sunday! 015.1955was a Sunday! 011.1956was a Sunday! 014.1956was a Sunday! 017.1956was a Sunday! 019.1957was a Sunday! 0112.1957was a Sunday! 016.1958was a Sunday! 012.1959was a Sunday! 013.1959was a Sunday! 0111.1959was a Sunday! 015.1960was a Sunday! 011.1961was a Sunday! 0110.1961was a Sunday! 014.1962was a Sunday! 017.1962was a Sunday! 019.1963was a Sunday! 0112.1963was a Sunday! 013.1964was a Sunday! 0111.1964was a Sunday! 018.1965was a Sunday! 015.1966was a Sunday! 011.1967was a Sunday! 0110.1967was a Sunday! 019.1968was a Sunday! 0112.1968was a Sunday! 016.1969was a Sunday! 012.1970was a Sunday! 013.1970was a Sunday! 0111.1970was a Sunday! 018.1971was a Sunday! 0110.1972was a Sunday! 014.1973was a Sunday! 017.1973was a Sunday! 019.1974was a Sunday! 0112.1974was a Sunday! 016.1975was a Sunday! 012.1976was a Sunday! 018.1976was a Sunday! 015.1977was a Sunday! 011.1978was a Sunday! 0110.1978was a Sunday! 014.1979was a Sunday! 017.1979was a Sunday! 016.1980was a Sunday! 012.1981was a Sunday! 013.1981was a Sunday! 0111.1981was a Sunday! 018.1982was a Sunday! 015.1983was a Sunday! 011.1984was a Sunday! 014.1984was a Sunday! 017.1984was a Sunday! 019.1985was a Sunday! 0112.1985was a Sunday! 016.1986was a Sunday! 012.1987was a Sunday! 013.1987was a Sunday! 0111.1987was a Sunday! 015.1988was a Sunday! 011.1989was a Sunday! 0110.1989was a Sunday! 014.1990was a Sunday! 017.1990was a Sunday! 019.1991was a Sunday! 0112.1991was a Sunday! 013.1992was a Sunday! 0111.1992was a Sunday! 018.1993was a Sunday! 015.1994was a Sunday! 011.1995was a Sunday! 0110.1995was a Sunday! 019.1996was a Sunday! 0112.1996was a Sunday! 016.1997was a Sunday! 012.1998was a Sunday! 013.1998was a Sunday! 0111.1998was a Sunday! 018.1999was a Sunday!
Output for 5.1.2 - 5.2.5
016.1902was a Sunday! 012.1903was a Sunday! 013.1903was a Sunday! 0111.1903was a Sunday! 015.1904was a Sunday! 011.1905was a Sunday! 0110.1905was a Sunday! 014.1906was a Sunday! 017.1906was a Sunday! 019.1907was a Sunday! 0112.1907was a Sunday! 013.1908was a Sunday! 0111.1908was a Sunday! 018.1909was a Sunday! 015.1910was a Sunday! 011.1911was a Sunday! 0110.1911was a Sunday! 019.1912was a Sunday! 0112.1912was a Sunday! 016.1913was a Sunday! 012.1914was a Sunday! 013.1914was a Sunday! 0111.1914was a Sunday! 018.1915was a Sunday! 0110.1916was a Sunday! 014.1917was a Sunday! 017.1917was a Sunday! 019.1918was a Sunday! 0112.1918was a Sunday! 016.1919was a Sunday! 012.1920was a Sunday! 018.1920was a Sunday! 015.1921was a Sunday! 011.1922was a Sunday! 0110.1922was a Sunday! 014.1923was a Sunday! 017.1923was a Sunday! 016.1924was a Sunday! 012.1925was a Sunday! 013.1925was a Sunday! 0111.1925was a Sunday! 018.1926was a Sunday! 015.1927was a Sunday! 011.1928was a Sunday! 014.1928was a Sunday! 017.1928was a Sunday! 019.1929was a Sunday! 0112.1929was a Sunday! 016.1930was a Sunday! 012.1931was a Sunday! 013.1931was a Sunday! 0111.1931was a Sunday! 015.1932was a Sunday! 011.1933was a Sunday! 0110.1933was a Sunday! 014.1934was a Sunday! 017.1934was a Sunday! 019.1935was a Sunday! 0112.1935was a Sunday! 013.1936was a Sunday! 0111.1936was a Sunday! 018.1937was a Sunday! 015.1938was a Sunday! 011.1939was a Sunday! 0110.1939was a Sunday! 019.1940was a Sunday! 0112.1940was a Sunday! 016.1941was a Sunday! 012.1942was a Sunday! 013.1942was a Sunday! 0111.1942was a Sunday! 018.1943was a Sunday! 0110.1944was a Sunday! 014.1945was a Sunday! 017.1945was a Sunday! 019.1946was a Sunday! 0112.1946was a Sunday! 016.1947was a Sunday! 012.1948was a Sunday! 018.1948was a Sunday! 015.1949was a Sunday! 011.1950was a Sunday! 0110.1950was a Sunday! 014.1951was a Sunday! 017.1951was a Sunday! 016.1952was a Sunday! 012.1953was a Sunday! 013.1953was a Sunday! 0111.1953was a Sunday! 018.1954was a Sunday! 015.1955was a Sunday! 011.1956was a Sunday! 014.1956was a Sunday! 017.1956was a Sunday! 019.1957was a Sunday! 0112.1957was a Sunday! 016.1958was a Sunday! 012.1959was a Sunday! 013.1959was a Sunday! 0111.1959was a Sunday! 015.1960was a Sunday! 011.1961was a Sunday! 0110.1961was a Sunday! 014.1962was a Sunday! 017.1962was a Sunday! 019.1963was a Sunday! 0112.1963was a Sunday! 013.1964was a Sunday! 0111.1964was a Sunday! 018.1965was a Sunday! 015.1966was a Sunday! 011.1967was a Sunday! 0110.1967was a Sunday! 019.1968was a Sunday! 0112.1968was a Sunday! 016.1969was a Sunday! 012.1970was a Sunday! 013.1970was a Sunday! 0111.1970was a Sunday! 018.1971was a Sunday! 0110.1972was a Sunday! 014.1973was a Sunday! 017.1973was a Sunday! 019.1974was a Sunday! 0112.1974was a Sunday! 016.1975was a Sunday! 012.1976was a Sunday! 018.1976was a Sunday! 015.1977was a Sunday! 011.1978was a Sunday! 0110.1978was a Sunday! 014.1979was a Sunday! 017.1979was a Sunday! 016.1980was a Sunday! 012.1981was a Sunday! 013.1981was a Sunday! 0111.1981was a Sunday! 018.1982was a Sunday! 015.1983was a Sunday! 011.1984was a Sunday! 014.1984was a Sunday! 017.1984was a Sunday! 019.1985was a Sunday! 0112.1985was a Sunday! 016.1986was a Sunday! 012.1987was a Sunday! 013.1987was a Sunday! 0111.1987was a Sunday! 015.1988was a Sunday! 011.1989was a Sunday! 0110.1989was a Sunday! 014.1990was a Sunday! 017.1990was a Sunday! 019.1991was a Sunday! 0112.1991was a Sunday! 013.1992was a Sunday! 0111.1992was a Sunday! 018.1993was a Sunday! 015.1994was a Sunday! 011.1995was a Sunday! 0110.1995was a Sunday! 019.1996was a Sunday! 0112.1996was a Sunday! 016.1997was a Sunday! 012.1998was a Sunday! 013.1998was a Sunday! 0111.1998was a Sunday! 018.1999was a Sunday!
Output for 5.1.0 - 5.1.1
016.1902was a Sunday! 012.1903was a Sunday! 013.1903was a Sunday! 0111.1903was a Sunday! 0110.1904was a Sunday! 011.1905was a Sunday! 0110.1905was a Sunday! 014.1906was a Sunday! 017.1906was a Sunday! 019.1907was a Sunday! 0112.1907was a Sunday! 012.1908was a Sunday! 018.1908was a Sunday! 018.1909was a Sunday! 015.1910was a Sunday! 011.1911was a Sunday! 0110.1911was a Sunday! 016.1912was a Sunday! 016.1913was a Sunday! 012.1914was a Sunday! 013.1914was a Sunday! 0111.1914was a Sunday! 018.1915was a Sunday! 011.1916was a Sunday! 014.1916was a Sunday! 017.1916was a Sunday! 014.1917was a Sunday! 017.1917was a Sunday! 019.1918was a Sunday! 0112.1918was a Sunday! 016.1919was a Sunday! 015.1920was a Sunday! 015.1921was a Sunday! 011.1922was a Sunday! 0110.1922was a Sunday! 014.1923was a Sunday! 017.1923was a Sunday! 013.1924was a Sunday! 0111.1924was a Sunday! 012.1925was a Sunday! 013.1925was a Sunday! 0111.1925was a Sunday! 018.1926was a Sunday! 015.1927was a Sunday! 019.1928was a Sunday! 0112.1928was a Sunday! 019.1929was a Sunday! 0112.1929was a Sunday! 016.1930was a Sunday! 012.1931was a Sunday! 013.1931was a Sunday! 0111.1931was a Sunday! 0110.1932was a Sunday! 011.1933was a Sunday! 0110.1933was a Sunday! 014.1934was a Sunday! 017.1934was a Sunday! 019.1935was a Sunday! 0112.1935was a Sunday! 012.1936was a Sunday! 018.1936was a Sunday! 018.1937was a Sunday! 015.1938was a Sunday! 011.1939was a Sunday! 0110.1939was a Sunday! 016.1940was a Sunday! 016.1941was a Sunday! 012.1942was a Sunday! 013.1942was a Sunday! 0111.1942was a Sunday! 018.1943was a Sunday! 011.1944was a Sunday! 014.1944was a Sunday! 017.1944was a Sunday! 014.1945was a Sunday! 017.1945was a Sunday! 019.1946was a Sunday! 0112.1946was a Sunday! 016.1947was a Sunday! 015.1948was a Sunday! 015.1949was a Sunday! 011.1950was a Sunday! 0110.1950was a Sunday! 014.1951was a Sunday! 017.1951was a Sunday! 013.1952was a Sunday! 0111.1952was a Sunday! 012.1953was a Sunday! 013.1953was a Sunday! 0111.1953was a Sunday! 018.1954was a Sunday! 015.1955was a Sunday! 019.1956was a Sunday! 0112.1956was a Sunday! 019.1957was a Sunday! 0112.1957was a Sunday! 016.1958was a Sunday! 012.1959was a Sunday! 013.1959was a Sunday! 0111.1959was a Sunday! 0110.1960was a Sunday! 011.1961was a Sunday! 0110.1961was a Sunday! 014.1962was a Sunday! 017.1962was a Sunday! 019.1963was a Sunday! 0112.1963was a Sunday! 012.1964was a Sunday! 018.1964was a Sunday! 018.1965was a Sunday! 015.1966was a Sunday! 011.1967was a Sunday! 0110.1967was a Sunday! 016.1968was a Sunday! 016.1969was a Sunday! 012.1970was a Sunday! 013.1970was a Sunday! 0111.1970was a Sunday! 018.1971was a Sunday! 0110.1972was a Sunday! 014.1973was a Sunday! 017.1973was a Sunday! 019.1974was a Sunday! 0112.1974was a Sunday! 016.1975was a Sunday! 012.1976was a Sunday! 018.1976was a Sunday! 015.1977was a Sunday! 011.1978was a Sunday! 0110.1978was a Sunday! 014.1979was a Sunday! 017.1979was a Sunday! 016.1980was a Sunday! 012.1981was a Sunday! 013.1981was a Sunday! 0111.1981was a Sunday! 018.1982was a Sunday! 015.1983was a Sunday! 011.1984was a Sunday! 014.1984was a Sunday! 017.1984was a Sunday! 019.1985was a Sunday! 0112.1985was a Sunday! 016.1986was a Sunday! 012.1987was a Sunday! 013.1987was a Sunday! 0111.1987was a Sunday! 015.1988was a Sunday! 011.1989was a Sunday! 0110.1989was a Sunday! 014.1990was a Sunday! 017.1990was a Sunday! 019.1991was a Sunday! 0112.1991was a Sunday! 013.1992was a Sunday! 0111.1992was a Sunday! 018.1993was a Sunday! 015.1994was a Sunday! 011.1995was a Sunday! 0110.1995was a Sunday! 019.1996was a Sunday! 0112.1996was a Sunday! 016.1997was a Sunday! 012.1998was a Sunday! 013.1998was a Sunday! 0111.1998was a Sunday! 018.1999was a Sunday!