1--TEST-- 2Test date_format() function : basic functionality 3--FILE-- 4<?php 5//Set the default time zone 6date_default_timezone_set("Europe/London"); 7 8echo "*** Testing date_format() : basic functionality - formatting coinstants ***\n"; 9$date = new DateTime("2005-07-14 22:30:41"); 10 11var_dump( $date->format( DateTime::ATOM) ) ; 12var_dump( $date->format( DateTime::COOKIE) ) ; 13var_dump( $date->format( DateTime::ISO8601) ) ; 14var_dump( $date->format( DateTime::RFC822) ) ; 15var_dump( $date->format( DateTime::RFC850) ) ; 16var_dump( $date->format( DateTime::RFC1036) ) ; 17var_dump( $date->format( DateTime::RFC1123) ) ; 18var_dump( $date->format( DateTime:: RFC2822) ) ; 19var_dump( $date->format( DateTime::RFC3339) ) ; 20var_dump( $date->format( DateTime::RSS) ) ; 21var_dump( $date->format( DateTime::W3C) ) ; 22 23?> 24--EXPECT-- 25*** Testing date_format() : basic functionality - formatting coinstants *** 26string(25) "2005-07-14T22:30:41+01:00" 27string(34) "Thursday, 14-Jul-2005 22:30:41 BST" 28string(24) "2005-07-14T22:30:41+0100" 29string(29) "Thu, 14 Jul 05 22:30:41 +0100" 30string(32) "Thursday, 14-Jul-05 22:30:41 BST" 31string(29) "Thu, 14 Jul 05 22:30:41 +0100" 32string(31) "Thu, 14 Jul 2005 22:30:41 +0100" 33string(31) "Thu, 14 Jul 2005 22:30:41 +0100" 34string(25) "2005-07-14T22:30:41+01:00" 35string(31) "Thu, 14 Jul 2005 22:30:41 +0100" 36string(25) "2005-07-14T22:30:41+01:00" 37