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") { $number_of_sundays++; echo "01.".$current_month.".".$current_year."was a Sunday!"."\n"; } } }
Output for 4.3.0 - 5.0.5, 5.2.6 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
01.4.1900was a Sunday! 01.7.1900was a Sunday! 01.9.1901was a Sunday! 01.12.1901was a Sunday! 01.6.1902was a Sunday! 01.2.1903was a Sunday! 01.3.1903was a Sunday! 01.11.1903was a Sunday! 01.5.1904was a Sunday! 01.1.1905was a Sunday! 01.10.1905was a Sunday! 01.4.1906was a Sunday! 01.7.1906was a Sunday! 01.9.1907was a Sunday! 01.12.1907was a Sunday! 01.3.1908was a Sunday! 01.11.1908was a Sunday! 01.8.1909was a Sunday! 01.5.1910was a Sunday! 01.1.1911was a Sunday! 01.10.1911was a Sunday! 01.9.1912was a Sunday! 01.12.1912was a Sunday! 01.6.1913was a Sunday! 01.2.1914was a Sunday! 01.3.1914was a Sunday! 01.11.1914was a Sunday! 01.8.1915was a Sunday! 01.10.1916was a Sunday! 01.4.1917was a Sunday! 01.7.1917was a Sunday! 01.9.1918was a Sunday! 01.12.1918was a Sunday! 01.6.1919was a Sunday! 01.2.1920was a Sunday! 01.8.1920was a Sunday! 01.5.1921was a Sunday! 01.1.1922was a Sunday! 01.10.1922was a Sunday! 01.4.1923was a Sunday! 01.7.1923was a Sunday! 01.6.1924was a Sunday! 01.2.1925was a Sunday! 01.3.1925was a Sunday! 01.11.1925was a Sunday! 01.8.1926was a Sunday! 01.5.1927was a Sunday! 01.1.1928was a Sunday! 01.4.1928was a Sunday! 01.7.1928was a Sunday! 01.9.1929was a Sunday! 01.12.1929was a Sunday! 01.6.1930was a Sunday! 01.2.1931was a Sunday! 01.3.1931was a Sunday! 01.11.1931was a Sunday! 01.5.1932was a Sunday! 01.1.1933was a Sunday! 01.10.1933was a Sunday! 01.4.1934was a Sunday! 01.7.1934was a Sunday! 01.9.1935was a Sunday! 01.12.1935was a Sunday! 01.3.1936was a Sunday! 01.11.1936was a Sunday! 01.8.1937was a Sunday! 01.5.1938was a Sunday! 01.1.1939was a Sunday! 01.10.1939was a Sunday! 01.9.1940was a Sunday! 01.12.1940was a Sunday! 01.6.1941was a Sunday! 01.2.1942was a Sunday! 01.3.1942was a Sunday! 01.11.1942was a Sunday! 01.8.1943was a Sunday! 01.10.1944was a Sunday! 01.4.1945was a Sunday! 01.7.1945was a Sunday! 01.9.1946was a Sunday! 01.12.1946was a Sunday! 01.6.1947was a Sunday! 01.2.1948was a Sunday! 01.8.1948was a Sunday! 01.5.1949was a Sunday! 01.1.1950was a Sunday! 01.10.1950was a Sunday! 01.4.1951was a Sunday! 01.7.1951was a Sunday! 01.6.1952was a Sunday! 01.2.1953was a Sunday! 01.3.1953was a Sunday! 01.11.1953was a Sunday! 01.8.1954was a Sunday! 01.5.1955was a Sunday! 01.1.1956was a Sunday! 01.4.1956was a Sunday! 01.7.1956was a Sunday! 01.9.1957was a Sunday! 01.12.1957was a Sunday! 01.6.1958was a Sunday! 01.2.1959was a Sunday! 01.3.1959was a Sunday! 01.11.1959was a Sunday! 01.5.1960was a Sunday! 01.1.1961was a Sunday! 01.10.1961was a Sunday! 01.4.1962was a Sunday! 01.7.1962was a Sunday! 01.9.1963was a Sunday! 01.12.1963was a Sunday! 01.3.1964was a Sunday! 01.11.1964was a Sunday! 01.8.1965was a Sunday! 01.5.1966was a Sunday! 01.1.1967was a Sunday! 01.10.1967was a Sunday! 01.9.1968was a Sunday! 01.12.1968was a Sunday! 01.6.1969was a Sunday! 01.2.1970was a Sunday! 01.3.1970was a Sunday! 01.11.1970was a Sunday! 01.8.1971was a Sunday! 01.10.1972was a Sunday! 01.4.1973was a Sunday! 01.7.1973was a Sunday! 01.9.1974was a Sunday! 01.12.1974was a Sunday! 01.6.1975was a Sunday! 01.2.1976was a Sunday! 01.8.1976was a Sunday! 01.5.1977was a Sunday! 01.1.1978was a Sunday! 01.10.1978was a Sunday! 01.4.1979was a Sunday! 01.7.1979was a Sunday! 01.6.1980was a Sunday! 01.2.1981was a Sunday! 01.3.1981was a Sunday! 01.11.1981was a Sunday! 01.8.1982was a Sunday! 01.5.1983was a Sunday! 01.1.1984was a Sunday! 01.4.1984was a Sunday! 01.7.1984was a Sunday! 01.9.1985was a Sunday! 01.12.1985was a Sunday! 01.6.1986was a Sunday! 01.2.1987was a Sunday! 01.3.1987was a Sunday! 01.11.1987was a Sunday! 01.5.1988was a Sunday! 01.1.1989was a Sunday! 01.10.1989was a Sunday! 01.4.1990was a Sunday! 01.7.1990was a Sunday! 01.9.1991was a Sunday! 01.12.1991was a Sunday! 01.3.1992was a Sunday! 01.11.1992was a Sunday! 01.8.1993was a Sunday! 01.5.1994was a Sunday! 01.1.1995was a Sunday! 01.10.1995was a Sunday! 01.9.1996was a Sunday! 01.12.1996was a Sunday! 01.6.1997was a Sunday! 01.2.1998was a Sunday! 01.3.1998was a Sunday! 01.11.1998was a Sunday! 01.8.1999was a Sunday!
Output for 5.1.2 - 5.2.5
01.6.1902was a Sunday! 01.2.1903was a Sunday! 01.3.1903was a Sunday! 01.11.1903was a Sunday! 01.5.1904was a Sunday! 01.1.1905was a Sunday! 01.10.1905was a Sunday! 01.4.1906was a Sunday! 01.7.1906was a Sunday! 01.9.1907was a Sunday! 01.12.1907was a Sunday! 01.3.1908was a Sunday! 01.11.1908was a Sunday! 01.8.1909was a Sunday! 01.5.1910was a Sunday! 01.1.1911was a Sunday! 01.10.1911was a Sunday! 01.9.1912was a Sunday! 01.12.1912was a Sunday! 01.6.1913was a Sunday! 01.2.1914was a Sunday! 01.3.1914was a Sunday! 01.11.1914was a Sunday! 01.8.1915was a Sunday! 01.10.1916was a Sunday! 01.4.1917was a Sunday! 01.7.1917was a Sunday! 01.9.1918was a Sunday! 01.12.1918was a Sunday! 01.6.1919was a Sunday! 01.2.1920was a Sunday! 01.8.1920was a Sunday! 01.5.1921was a Sunday! 01.1.1922was a Sunday! 01.10.1922was a Sunday! 01.4.1923was a Sunday! 01.7.1923was a Sunday! 01.6.1924was a Sunday! 01.2.1925was a Sunday! 01.3.1925was a Sunday! 01.11.1925was a Sunday! 01.8.1926was a Sunday! 01.5.1927was a Sunday! 01.1.1928was a Sunday! 01.4.1928was a Sunday! 01.7.1928was a Sunday! 01.9.1929was a Sunday! 01.12.1929was a Sunday! 01.6.1930was a Sunday! 01.2.1931was a Sunday! 01.3.1931was a Sunday! 01.11.1931was a Sunday! 01.5.1932was a Sunday! 01.1.1933was a Sunday! 01.10.1933was a Sunday! 01.4.1934was a Sunday! 01.7.1934was a Sunday! 01.9.1935was a Sunday! 01.12.1935was a Sunday! 01.3.1936was a Sunday! 01.11.1936was a Sunday! 01.8.1937was a Sunday! 01.5.1938was a Sunday! 01.1.1939was a Sunday! 01.10.1939was a Sunday! 01.9.1940was a Sunday! 01.12.1940was a Sunday! 01.6.1941was a Sunday! 01.2.1942was a Sunday! 01.3.1942was a Sunday! 01.11.1942was a Sunday! 01.8.1943was a Sunday! 01.10.1944was a Sunday! 01.4.1945was a Sunday! 01.7.1945was a Sunday! 01.9.1946was a Sunday! 01.12.1946was a Sunday! 01.6.1947was a Sunday! 01.2.1948was a Sunday! 01.8.1948was a Sunday! 01.5.1949was a Sunday! 01.1.1950was a Sunday! 01.10.1950was a Sunday! 01.4.1951was a Sunday! 01.7.1951was a Sunday! 01.6.1952was a Sunday! 01.2.1953was a Sunday! 01.3.1953was a Sunday! 01.11.1953was a Sunday! 01.8.1954was a Sunday! 01.5.1955was a Sunday! 01.1.1956was a Sunday! 01.4.1956was a Sunday! 01.7.1956was a Sunday! 01.9.1957was a Sunday! 01.12.1957was a Sunday! 01.6.1958was a Sunday! 01.2.1959was a Sunday! 01.3.1959was a Sunday! 01.11.1959was a Sunday! 01.5.1960was a Sunday! 01.1.1961was a Sunday! 01.10.1961was a Sunday! 01.4.1962was a Sunday! 01.7.1962was a Sunday! 01.9.1963was a Sunday! 01.12.1963was a Sunday! 01.3.1964was a Sunday! 01.11.1964was a Sunday! 01.8.1965was a Sunday! 01.5.1966was a Sunday! 01.1.1967was a Sunday! 01.10.1967was a Sunday! 01.9.1968was a Sunday! 01.12.1968was a Sunday! 01.6.1969was a Sunday! 01.2.1970was a Sunday! 01.3.1970was a Sunday! 01.11.1970was a Sunday! 01.8.1971was a Sunday! 01.10.1972was a Sunday! 01.4.1973was a Sunday! 01.7.1973was a Sunday! 01.9.1974was a Sunday! 01.12.1974was a Sunday! 01.6.1975was a Sunday! 01.2.1976was a Sunday! 01.8.1976was a Sunday! 01.5.1977was a Sunday! 01.1.1978was a Sunday! 01.10.1978was a Sunday! 01.4.1979was a Sunday! 01.7.1979was a Sunday! 01.6.1980was a Sunday! 01.2.1981was a Sunday! 01.3.1981was a Sunday! 01.11.1981was a Sunday! 01.8.1982was a Sunday! 01.5.1983was a Sunday! 01.1.1984was a Sunday! 01.4.1984was a Sunday! 01.7.1984was a Sunday! 01.9.1985was a Sunday! 01.12.1985was a Sunday! 01.6.1986was a Sunday! 01.2.1987was a Sunday! 01.3.1987was a Sunday! 01.11.1987was a Sunday! 01.5.1988was a Sunday! 01.1.1989was a Sunday! 01.10.1989was a Sunday! 01.4.1990was a Sunday! 01.7.1990was a Sunday! 01.9.1991was a Sunday! 01.12.1991was a Sunday! 01.3.1992was a Sunday! 01.11.1992was a Sunday! 01.8.1993was a Sunday! 01.5.1994was a Sunday! 01.1.1995was a Sunday! 01.10.1995was a Sunday! 01.9.1996was a Sunday! 01.12.1996was a Sunday! 01.6.1997was a Sunday! 01.2.1998was a Sunday! 01.3.1998was a Sunday! 01.11.1998was a Sunday! 01.8.1999was a Sunday!
Output for 5.1.0 - 5.1.1
01.6.1902was a Sunday! 01.2.1903was a Sunday! 01.3.1903was a Sunday! 01.11.1903was a Sunday! 01.10.1904was a Sunday! 01.1.1905was a Sunday! 01.10.1905was a Sunday! 01.4.1906was a Sunday! 01.7.1906was a Sunday! 01.9.1907was a Sunday! 01.12.1907was a Sunday! 01.2.1908was a Sunday! 01.8.1908was a Sunday! 01.8.1909was a Sunday! 01.5.1910was a Sunday! 01.1.1911was a Sunday! 01.10.1911was a Sunday! 01.6.1912was a Sunday! 01.6.1913was a Sunday! 01.2.1914was a Sunday! 01.3.1914was a Sunday! 01.11.1914was a Sunday! 01.8.1915was a Sunday! 01.1.1916was a Sunday! 01.4.1916was a Sunday! 01.7.1916was a Sunday! 01.4.1917was a Sunday! 01.7.1917was a Sunday! 01.9.1918was a Sunday! 01.12.1918was a Sunday! 01.6.1919was a Sunday! 01.5.1920was a Sunday! 01.5.1921was a Sunday! 01.1.1922was a Sunday! 01.10.1922was a Sunday! 01.4.1923was a Sunday! 01.7.1923was a Sunday! 01.3.1924was a Sunday! 01.11.1924was a Sunday! 01.2.1925was a Sunday! 01.3.1925was a Sunday! 01.11.1925was a Sunday! 01.8.1926was a Sunday! 01.5.1927was a Sunday! 01.9.1928was a Sunday! 01.12.1928was a Sunday! 01.9.1929was a Sunday! 01.12.1929was a Sunday! 01.6.1930was a Sunday! 01.2.1931was a Sunday! 01.3.1931was a Sunday! 01.11.1931was a Sunday! 01.10.1932was a Sunday! 01.1.1933was a Sunday! 01.10.1933was a Sunday! 01.4.1934was a Sunday! 01.7.1934was a Sunday! 01.9.1935was a Sunday! 01.12.1935was a Sunday! 01.2.1936was a Sunday! 01.8.1936was a Sunday! 01.8.1937was a Sunday! 01.5.1938was a Sunday! 01.1.1939was a Sunday! 01.10.1939was a Sunday! 01.6.1940was a Sunday! 01.6.1941was a Sunday! 01.2.1942was a Sunday! 01.3.1942was a Sunday! 01.11.1942was a Sunday! 01.8.1943was a Sunday! 01.1.1944was a Sunday! 01.4.1944was a Sunday! 01.7.1944was a Sunday! 01.4.1945was a Sunday! 01.7.1945was a Sunday! 01.9.1946was a Sunday! 01.12.1946was a Sunday! 01.6.1947was a Sunday! 01.5.1948was a Sunday! 01.5.1949was a Sunday! 01.1.1950was a Sunday! 01.10.1950was a Sunday! 01.4.1951was a Sunday! 01.7.1951was a Sunday! 01.3.1952was a Sunday! 01.11.1952was a Sunday! 01.2.1953was a Sunday! 01.3.1953was a Sunday! 01.11.1953was a Sunday! 01.8.1954was a Sunday! 01.5.1955was a Sunday! 01.9.1956was a Sunday! 01.12.1956was a Sunday! 01.9.1957was a Sunday! 01.12.1957was a Sunday! 01.6.1958was a Sunday! 01.2.1959was a Sunday! 01.3.1959was a Sunday! 01.11.1959was a Sunday! 01.10.1960was a Sunday! 01.1.1961was a Sunday! 01.10.1961was a Sunday! 01.4.1962was a Sunday! 01.7.1962was a Sunday! 01.9.1963was a Sunday! 01.12.1963was a Sunday! 01.2.1964was a Sunday! 01.8.1964was a Sunday! 01.8.1965was a Sunday! 01.5.1966was a Sunday! 01.1.1967was a Sunday! 01.10.1967was a Sunday! 01.6.1968was a Sunday! 01.6.1969was a Sunday! 01.2.1970was a Sunday! 01.3.1970was a Sunday! 01.11.1970was a Sunday! 01.8.1971was a Sunday! 01.10.1972was a Sunday! 01.4.1973was a Sunday! 01.7.1973was a Sunday! 01.9.1974was a Sunday! 01.12.1974was a Sunday! 01.6.1975was a Sunday! 01.2.1976was a Sunday! 01.8.1976was a Sunday! 01.5.1977was a Sunday! 01.1.1978was a Sunday! 01.10.1978was a Sunday! 01.4.1979was a Sunday! 01.7.1979was a Sunday! 01.6.1980was a Sunday! 01.2.1981was a Sunday! 01.3.1981was a Sunday! 01.11.1981was a Sunday! 01.8.1982was a Sunday! 01.5.1983was a Sunday! 01.1.1984was a Sunday! 01.4.1984was a Sunday! 01.7.1984was a Sunday! 01.9.1985was a Sunday! 01.12.1985was a Sunday! 01.6.1986was a Sunday! 01.2.1987was a Sunday! 01.3.1987was a Sunday! 01.11.1987was a Sunday! 01.5.1988was a Sunday! 01.1.1989was a Sunday! 01.10.1989was a Sunday! 01.4.1990was a Sunday! 01.7.1990was a Sunday! 01.9.1991was a Sunday! 01.12.1991was a Sunday! 01.3.1992was a Sunday! 01.11.1992was a Sunday! 01.8.1993was a Sunday! 01.5.1994was a Sunday! 01.1.1995was a Sunday! 01.10.1995was a Sunday! 01.9.1996was a Sunday! 01.12.1996was a Sunday! 01.6.1997was a Sunday! 01.2.1998was a Sunday! 01.3.1998was a Sunday! 01.11.1998was a Sunday! 01.8.1999was a Sunday!