Home
last modified time | relevance | path

Searched refs:format (Results 26 – 50 of 798) sorted by relevance

12345678910>>...32

/PHP-5.5/ext/standard/tests/strings/
H A Dsscanf_basic7.phpt2 Test sscanf() function : basic functionality - octal format
6 /* Prototype : mixed sscanf ( string $str , string $format [, mixed &$... ] )
7 * Description: Parses input from a string according to a format
11 echo "*** Testing sscanf() : basic functionality - using octal format ***\n";
14 $format = "%o %o %o %o %o %o";
17 // extract details using short format
18 list($arg1, $arg2, $arg3, $arg4, $arg5, $arg6) = sscanf($str, $format);
22 // extract details using long format
23 $res = sscanf($str, $format, $arg1, $arg2, $arg3, $arg4, $arg5, $arg6);
29 *** Testing sscanf() : basic functionality - using octal format ***
H A Dsscanf_basic6.phpt2 Test sscanf() function : basic functionality - unsigned format
12 /* Prototype : mixed sscanf ( string $str , string $format [, mixed &$... ] )
13 * Description: Parses input from a string according to a format
17 echo "*** Testing sscanf() : basic functionality - using unsigned format ***\n";
20 $format = "%u %u %u %u %u %u";
23 // extract details using short format
24 list($arg1, $arg2, $arg3, $arg4, $arg5, $arg6) = sscanf($str, $format);
28 // extract details using long format
29 $res = sscanf($str, $format, $arg1, $arg2, $arg3, $arg4, $arg5, $arg6);
35 *** Testing sscanf() : basic functionality - using unsigned format ***
H A Dsprintf_basic2.phpt2 Test sprintf() function : basic functionality - integer format
5 /* Prototype : string sprintf(string $format [, mixed $arg1 [, mixed ...]])
10 echo "*** Testing sprintf() : basic functionality - using integer format ***\n";
14 $format = "format";
23 var_dump( sprintf($format) );
37 *** Testing sprintf() : basic functionality - using integer format ***
38 string(6) "format"
H A Dsprintf_variation52.phpt2 Test sprintf() function : usage variations - typical format strings
10 echo "*** Testing sprintf() : with typical format strings ***\n";
16 echo"\n-- Testing for '%%%.2f' as the format parameter --\n";
19 echo"\n-- Testing for '%%' as the format parameter --\n";
28 echo"\n-- Testing for '%X' as the format parameter --\n";
31 echo"\n-- Testing for multiple format parameters --\n";
40 *** Testing sprintf() : with typical format strings ***
42 -- Testing for '%%%.2f' as the format parameter --
45 -- Testing for '%%' as the format parameter --
56 -- Testing for '%X' as the format parameter --
[all …]
H A Dsprintf_basic4.phpt2 Test sprintf() function : basic functionality - bool format
5 /* Prototype : string sprintf(string $format [, mixed $arg1 [, mixed ...]])
10 echo "*** Testing sprintf() : basic functionality - using bool format ***\n";
14 $format = "format";
23 var_dump( sprintf($format) );
37 *** Testing sprintf() : basic functionality - using bool format ***
38 string(6) "format"
H A Dsprintf_basic5.phpt2 Test sprintf() function : basic functionality - char format
5 /* Prototype : string sprintf(string $format [, mixed $arg1 [, mixed ...]])
10 echo "*** Testing sprintf() : basic functionality - using char format ***\n";
14 $format = "format";
23 var_dump( sprintf($format) );
37 *** Testing sprintf() : basic functionality - using char format ***
38 string(6) "format"
H A Dsprintf_basic6.phpt2 Test sprintf() function : basic functionality - exponential format
5 /* Prototype : string sprintf(string $format [, mixed $arg1 [, mixed ...]])
10 echo "*** Testing sprintf() : basic functionality - using exponential format ***\n";
13 $format = "format";
22 var_dump( sprintf($format) );
36 *** Testing sprintf() : basic functionality - using exponential format ***
37 string(6) "format"
H A Dvsprintf_basic2.phpt2 Test vsprintf() function : basic functionality - integer format
5 /* Prototype : string vsprintf(string $format , array $args)
11 * Testing vsprintf() : basic functionality - using integer format
14 echo "*** Testing vsprintf() : basic functionality - using integer format ***\n";
17 $format = "format";
32 *** Testing vsprintf() : basic functionality - using integer format ***
H A Dsprintf_basic9.phpt2 Test sprintf() function : basic functionality - hexadecimal format
5 /* Prototype : string sprintf(string $format [, mixed $arg1 [, mixed ...]])
10 echo "*** Testing sprintf() : basic functionality - using hexadecimal format ***\n";
14 // Initialising different format strings
15 $format = "format";
29 var_dump( sprintf($format) );
46 *** Testing sprintf() : basic functionality - using hexadecimal format ***
47 string(6) "format"
H A Dsprintf_basic7.phpt2 Test sprintf() function : basic functionality - unsigned format
11 /* Prototype : string sprintf(string $format [, mixed $arg1 [, mixed ...]])
16 echo "*** Testing sprintf() : basic functionality - using unsigned format ***\n";
20 $format = "format";
29 var_dump( sprintf($format) );
43 *** Testing sprintf() : basic functionality - using unsigned format ***
44 string(6) "format"
H A Dsprintf_basic7_64bit.phpt2 Test sprintf() function : basic functionality - unsigned format
7 /* Prototype : string sprintf(string $format [, mixed $arg1 [, mixed ...]])
12 echo "*** Testing sprintf() : basic functionality - using unsigned format ***\n";
16 $format = "format";
25 var_dump( sprintf($format) );
39 *** Testing sprintf() : basic functionality - using unsigned format ***
40 string(6) "format"
H A Dsprintf_basic8.phpt2 Test sprintf() function : basic functionality - octal format
11 /* Prototype : string sprintf(string $format [, mixed $arg1 [, mixed ...]])
16 echo "*** Testing sprintf() : basic functionality - using octal format ***\n";
19 $format = "format";
28 var_dump( sprintf($format) );
42 *** Testing sprintf() : basic functionality - using octal format ***
43 string(6) "format"
H A Dsprintf_basic8_64bit.phpt2 Test sprintf() function : basic functionality - octal format
7 /* Prototype : string sprintf(string $format [, mixed $arg1 [, mixed ...]])
12 echo "*** Testing sprintf() : basic functionality - using octal format ***\n";
15 $format = "format";
24 var_dump( sprintf($format) );
38 *** Testing sprintf() : basic functionality - using octal format ***
39 string(6) "format"
H A Dprintf_basic2.phpt2 Test printf() function : basic functionality - integer format
5 /* Prototype : int printf ( string $format [, mixed $args [, mixed $... ]] )
6 * Description: Produces output according to format .
10 echo "*** Testing printf() : basic functionality - using integer format ***\n";
14 $format = "format";
23 $result = printf($format);
45 *** Testing printf() : basic functionality - using integer format ***
48 format
H A Dprintf_basic4.phpt2 Test printf() function : basic functionality - bool format
5 /* Prototype : int printf ( string $format [, mixed $args [, mixed $... ]] )
6 * Description: Produces output according to format .
10 echo "*** Testing printf() : basic functionality - using bool format ***\n";
14 $format = "format";
23 $result = printf($format);
44 *** Testing printf() : basic functionality - using bool format ***
47 format
H A Dprintf_basic5.phpt2 Test printf() function : basic functionality - char format
5 /* Prototype : int printf ( string $format [, mixed $args [, mixed $... ]] )
6 * Description: Produces output according to format .
10 echo "*** Testing printf() : basic functionality - using char format ***\n";
14 $format = "format";
23 $result = printf($format);
44 *** Testing printf() : basic functionality - using char format ***
47 format
H A Dprintf_basic6.phpt2 Test printf() function : basic functionality - exponential format
5 /* Prototype : int printf ( string $format [, mixed $args [, mixed $... ]] )
6 * Description: Produces output according to format .
10 echo "*** Testing printf() : basic functionality - using exponential format ***\n";
13 $format = "format";
22 $result = printf($format);
43 *** Testing printf() : basic functionality - using exponential format ***
46 format
/PHP-5.5/ext/date/tests/
H A Dbug42910.phpt9 …print $foo->format(DateTime::ISO8601) . ' - ' . $foo->getTimezone()->getName() . ' - ' . $foo->fo…
10 …print $bar->format(DateTime::ISO8601) . ' - ' . $bar->getTimezone()->getName() . ' - ' . $bar->fo…
15 …print $foo->format(DateTime::ISO8601) . ' - ' . $foo->getTimezone()->getName() . ' - ' . $foo->fo…
16 …print $bar->format(DateTime::ISO8601) . ' - ' . $bar->getTimezone()->getName() . ' - ' . $bar->fo…
H A Drfc-datetime_and_daylight_saving_time-type3-bd2.phpt29 echo 'bd0 ' . $end->format($date_format) . ' - ' . $start->format($date_format)
30 . ' = ' . $start->diff($end)->format('P%dDT%hH%iM%sS') . "\n";
35 echo 'bd5 ' . $end->format($date_format) . ' - ' . $start->format($date_format)
36 . ' = ' . $start->diff($end)->format($interval_format) . "\n";
41 echo 'bd6 ' . $end->format($date_format) . ' - ' . $start->format($date_format)
42 . ' = ' . $start->diff($end)->format($interval_format) . "\n";
47 echo 'bd8 ' . $end->format($date_format) . ' - ' . $start->format($date_format)
48 . ' = ' . $start->diff($end)->format($interval_format) . "\n";
H A Drfc-datetime_and_daylight_saving_time-type3-fa.phpt19 echo 'fa1 ' . $start->format($date_format) . " + $interval_spec = "
20 . $start->add($interval)->format($date_format) . "\n";
25 echo 'fa2 ' . $start->format($date_format) . " + $interval_spec = "
26 . $start->add($interval)->format($date_format) . "\n";
31 echo 'fa3 ' . $start->format($date_format) . " + $interval_spec = "
32 . $start->add($interval)->format($date_format) . "\n";
37 echo 'fa4 ' . $start->format($date_format) . " + $interval_spec = "
38 . $start->add($interval)->format($date_format) . "\n";
43 echo 'fa5 ' . $start->format($date_format) . " + $interval_spec = "
44 . $start->add($interval)->format($date_format) . "\n";
[all …]
H A Ddate_diff.phpt22 // echo $dates[$i]->format( "Y-m-d\n" );
28 $dates[$i]->format( 'Y-m-d' ),
29 $dates[$j]->format( 'Y-m-d' ),
30 $diff->format( '%a' ),
31 $diff->format( '%y-%m-%d' )
36 $int = new DateInterval( $diff->format( 'P%yY%mM%dD' ) );
48 $dates[$i]->format( 'Y-m-d' ), " + ",
49 $int->format( '%y-%m-%d' ), " = ",
50 $current->format( 'Y-m-d' ), " (",
51 $dates[$j]->format( 'Y-m-d' ), ")\n";
H A Dgmdate_variation6.phpt2 Test gmdate() function : usage variation - Passing Month format options to format argument.
5 /* Prototype : string gmdate(string format [, long timestamp])
17 echo "\n-- Testing gmdate() function with full textual representation of month format --\n";
21 echo "\n-- Testing gmdate() function with numeric representation of month format --\n";
25 echo "\n-- Testing gmdate() function with short textual representation of month format --\n";
33 echo "\n-- Testing gmdate() function with number of days in a month format --\n";
42 -- Testing gmdate() function with full textual representation of month format --
46 -- Testing gmdate() function with numeric representation of month format --
50 -- Testing gmdate() function with short textual representation of month format --
54 -- Testing gmdate() function with numeric representation of month without leading zeros format --
[all …]
H A Dgmdate_variation11.phpt2 Test gmdate() function : usage variation - Passing Full Date/Time format options to format argument.
5 /* Prototype : string gmdate(string format [, long timestamp])
17 echo "\n-- Testing gmdate() function with ISO 8601 date format --\n";
21 echo "\n-- Testing gmdate() function with RFC 2822 date format --\n";
25 echo "\n-- Testing gmdate() function with seconds since Unix Epoch format --\n";
34 -- Testing gmdate() function with ISO 8601 date format --
38 -- Testing gmdate() function with RFC 2822 date format --
42 -- Testing gmdate() function with seconds since Unix Epoch format --
H A Dgmdate_variation9.phpt2 Test gmdate() function : usage variation - Passing Time format options to format argument.
5 /* Prototype : string gmdate(string format [, long timestamp])
22 '12-hour format without leading zeros' => 'g',
23 '24-hour format without leading zeros' => 'G',
24 '12-hour format with leading zeros' => 'h',
25 '24-hour format with leading zeros' => 'H',
54 --12-hour format without leading zeros--
58 --24-hour format without leading zeros--
62 --12-hour format with leading zeros--
66 --24-hour format with leading zeros--
H A DDateTime_format_variation1.phpt2 Test DateTime::format() function : usage variation - Passing unexpected values to first argument $f…
5 /* Prototype : public string DateTime::format ( string $format )
6 * Description: Returns date formatted according to given format
11 echo "*** Testing DateTime::format() : usage variation - unexpected values to first argument \$for…
100 foreach($inputs as $variation =>$format) {
102 var_dump( $object->format($format) );
111 *** Testing DateTime::format() : usage variation - unexpected values to first argument $format***
136 Warning: DateTime::format() expects parameter 1 to be string, array given in %s on line %d
141 Warning: DateTime::format() expects parameter 1 to be string, array given in %s on line %d
146 Warning: DateTime::format() expects parameter 1 to be string, array given in %s on line %d
[all …]

Completed in 64 milliseconds

12345678910>>...32