1--TEST-- 2Test idate() function : usage variation - Checking return of year(1 or 2 digits) format starting with zero and nonzero. 3--FILE-- 4<?php 5echo "*** Testing idate() : usage variation ***\n"; 6 7// Initialise function arguments not being substituted (if any) 8date_default_timezone_set("Asia/Calcutta"); 9$format = 'y'; 10 11echo "\n-- Testing idate() function for 2 digit year having no zero as starting number --\n"; 12$timestamp = mktime(8, 8, 8, 8, 8, 1970); 13var_dump( idate($format, $timestamp) ); 14 15echo "\n-- Testing idate() function for 2 digit year having zero as starting number --\n"; 16$timestamp = mktime(8, 8, 8, 8, 8, 2001); 17var_dump( idate($format, $timestamp) ); 18?> 19--EXPECT-- 20*** Testing idate() : usage variation *** 21 22-- Testing idate() function for 2 digit year having no zero as starting number -- 23int(70) 24 25-- Testing idate() function for 2 digit year having zero as starting number -- 26int(1) 27