Test date_add() function : basic functionality
--CREDITS--
Felix De Vliegher <felix.devliegher@gmail.com>
---SKIPIF--
-<?php if (!function_exists('date_add')) echo "skip: date_add() function not found!"; ?>
--FILE--
<?php
date_default_timezone_set('UTC');
--TEST--
date_create() function [1]
---SKIPIF--
-<?php if (!function_exists('date_create')) echo "SKIP"; ?>
--FILE--
<?php
date_default_timezone_set('Europe/Oslo');
--TEST--
date_create() function [2]
---SKIPIF--
-<?php if (!function_exists('date_create')) echo "SKIP"; ?>
--FILE--
<?php
date_default_timezone_set("GMT");
--TEST--
date_modify() function [1]
---SKIPIF--
-<?php if (!function_exists('date_create')) echo "SKIP"; ?>
--FILE--
<?php
date_default_timezone_set("Pacific/Kwajalein");
--TEST--
date_modify() function [2]
---SKIPIF--
-<?php if (!function_exists('date_create')) echo "SKIP"; ?>
--FILE--
<?php
date_default_timezone_set("GMT");
Test date_sub() function : basic functionality
--CREDITS--
Felix De Vliegher <felix.devliegher@gmail.com>
---SKIPIF--
-<?php if (!function_exists('date_sub')) echo "skip: date_sub() function not found!"; ?>
--FILE--
<?php
date_default_timezone_set('UTC');
--TEST--
strtotime() function - a test to show the difference in behaviour between 'first' and '1', "second" and "2"...
---SKIPIF--
-<?php if (!function_exists('strtotime')) echo "SKIP"; ?>
--FILE--
<?php
date_default_timezone_set('UTC');
--SKIPIF--
<?php
-if (!function_exists('setlocale')) die('skip: setlocale() not available');
if (!@setlocale(LC_ALL, 'pt_PT', 'pt', 'pt_PT.ISO8859-1', 'portuguese')) die('skip pt locale not available');
?>
<?php
-if (!function_exists('setlocale')) {
- die('skip: setlocale() not available');
-}
-
if (!@setlocale(LC_ALL, 'pt_PT', 'pt', 'pt_PT.ISO8859-1', 'portuguese')) {
die('skip pt locale not available');
}
--SKIPIF--
<?php
require_once('skipif.inc');
-if (!function_exists('setlocale')) die('skip setlocale() not available');
if (!@setlocale(LC_ALL, 'sv_SE', 'sv_SE.ISO8859-1')) die('skip sv_SE locale not available');
if (!@setlocale(LC_ALL, 'en_US', 'en_US.ISO8859-1')) die('skip en_US locale not available');
?>
--SKIPIF--
<?php
if (getenv("SKIP_SLOW_TESTS")) die("skip slow test");
- if (!function_exists("file_get_contents"))
- die ("skip file_get_contents function is not found");
if (getenv("SKIP_ONLINE_TESTS")) die("skip online test");
?>
--FILE--
"Sylvain R." <sracine@phpquebec.org>
--INI--
display_errors=false
---SKIPIF--
-<?php
- if (!function_exists("file_get_contents"))
- die ("skip file_get_contents function is not found");
-?>
--FILE--
<?php
var_dump(file_get_contents("http://checkip.dyndns.com",null,null,0,-1));
image_type_to_extension()
--SKIPIF--
<?php
- if (!function_exists('image_type_to_extension')) die('skip image_type_to_extension() not available');
require_once('skipif_imagetype.inc');
?>
--FILE--
image_type_to_mime_type()
--SKIPIF--
<?php
- if (!function_exists('image_type_to_mime_type')) die('skip image_type_to_mime_type() not available');
require_once('skipif_imagetype.inc');
?>
--FILE--
--TEST--
image_type_to_mime_type()
---SKIPIF--
-<?php
- if (!function_exists('image_type_to_mime_type')) die('skip image_type_to_mime_type() not available');
-?>
--FILE--
<?php
Test expm1() - Error conditions
--INI--
precision=14
---SKIPIF--
-<?php
- function_exists('expm1') or die('skip expm1() is not supported in this build.');
-?>
--FILE--
<?php
/* Prototype : float expm1 ( float $arg )
--TEST--
Bug #20934 (htmlspecialchars returns latin1 from UTF-8)
---SKIPIF--
-<?php
-if (!function_exists("utf8_encode") || !function_exists("utf8_decode")) {
- die("SKIP Neither utf8_encode() nor utf8_decode() are available");
-}
-?>
--FILE--
<?php
$str = utf8_encode("\xe0\xe1");
--TEST--
Bug #73058 crypt broken when salt is 'too' long
---SKIPIF--
-<?php
-if (!function_exists('crypt'))) {
- die("SKIP crypt() is not available");
-}
-?>
--FILE--
<?php
$pass = 'secret';
--TEST--
crypt() function
---SKIPIF--
-<?php
-if (!function_exists('crypt')) {
- die("SKIP crypt() is not available");
-}
-?>
--FILE--
<?php
Official blowfish tests (http://cvsweb.openwall.com/cgi/cvsweb.cgi/Owl/packages/glibc/crypt_blowfish/wrapper.c)
--SKIPIF--
<?php
-if (!function_exists('crypt') || !defined("CRYPT_BLOWFISH")) {
+if (!defined("CRYPT_BLOWFISH")) {
die("SKIP crypt()-blowfish is not available");
}
?>
Test Blowfish crypt() with invalid rounds
--SKIPIF--
<?php
-if (!function_exists('crypt') || !defined("CRYPT_BLOWFISH")) {
+if (!defined("CRYPT_BLOWFISH")) {
die("SKIP crypt()-blowfish is not available");
}
?>
--TEST--
crypt() function - characters > 0x80
---SKIPIF--
-<?php
-if (!function_exists('crypt')) {
- die("SKIP crypt() is not available");
-}
-?>
--FILE--
<?php
var_dump(crypt("À1234abcd", "99"));
--TEST--
crypt(): *0 should return *1
---SKIPIF--
-<?php
-if (!function_exists('crypt')) {
- die("SKIP crypt() is not available");
-}
-?>
--FILE--
<?php
crypt() SHA-256
--SKIPIF--
<?php
-if (!function_exists('crypt') || !defined("CRYPT_SHA256")) {
+if (!defined("CRYPT_SHA256")) {
die("SKIP crypt()-sha256 is not available");
}
?>
crypt() SHA-512
--SKIPIF--
<?php
-if (!function_exists('crypt') || !defined("CRYPT_SHA512")) {
+if (!defined("CRYPT_SHA512")) {
die("SKIP crypt()-sha512 is not available");
}
?>
--TEST--
crypt() function - long salt
---SKIPIF--
-<?php
-if (!function_exists('crypt')) {
- die("SKIP crypt() is not available");
-}
-?>
--FILE--
<?php
money_format test
--SKIPIF--
<?php
- if (!function_exists('money_format') || !function_exists('setlocale')) {
+ if (!function_exists('money_format')) {
die("SKIP money_format - not supported\n");
}
--SKIPIF--
<?php
if (!function_exists('microtime')) die('skip microtime() not available');
- die('warn system dependent');
?>
--FILE--
<?php