PHP userland backwards compatibility layer that emulates PHP 5.5+ core functions.

⌈⌋ branch:  upgrade.php


Artifact [f9f792868c]

Artifact f9f792868c20a77f13b2b388822becbfcba4d0f2:

  • File doc/tests2filter/009.phpt — part of check-in [51e3884900] at 2010-06-22 17:03:27 on branch trunk — upgradephp-15 (user: mario size: 821)

--TEST--
filter_id()
--FILE--
<?php

var_dump(filter_id("stripped"));
var_dump(filter_id("string"));
var_dump(filter_id("url"));
var_dump(filter_id("int"));
var_dump(filter_id("none"));
var_dump(filter_id(array()));
var_dump(filter_id(-1));
var_dump(filter_id(0,0,0));

echo "Done\n";
?>
--EXPECTF--	
int(513)
int(513)
int(518)
int(257)
bool(false)

Warning: filter_id() expects parameter 1 to be string, array given in %s009.php on line %d
NULL
bool(false)

Warning: filter_id() expects exactly 1 parameter, 3 given in %s009.php on line %d
NULL
Done
--UEXPECTF--
int(513)
int(513)
int(518)
int(257)
bool(false)

Warning: filter_id() expects parameter 1 to be binary string, array given in %s009.php on line %d
NULL
bool(false)

Warning: filter_id() expects exactly 1 parameter, 3 given in %s009.php on line %d
NULL
Done