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

⌈⌋ ⎇ branch:  upgrade.php


Artifact [a9cfa430b7]

Artifact a9cfa430b7752b2cccb17d9e50c843a5e9f85b47:

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

--TEST--
fnmatch
--FILE--
<?php

$text = "Some text goes here...";
echo '$text = "Some text goes here...";';
echo "\nfnmatch('go*', $text) = ". (fnmatch('go*', $text) ?1:0);
echo "\nfnmatch('*go', $text) = ". (fnmatch('*go', $text) ?1:0);
echo "\nfnmatch('*go*', $text) = ". (fnmatch('*go*', $text) ?1:0);
echo "\nfnmatch('*te?x*', $text) = ". (fnmatch('*te?x*', $text) ?1:0);
echo "\nfnmatch('*te?t*', $text) = ". (fnmatch('*te?t*', $text) ?1:0);
echo "\nfnmatch('So?m*', $text) = ". (fnmatch('So?m*', $text) ?1:0);
echo "\nfnmatch('So*m*', $text) = ". (fnmatch('*So*m*', $text) ?1:0);

?>
--EXPECT--
$text = "Some text goes here...";
fnmatch('go*', Some text goes here...) = 0
fnmatch('*go', Some text goes here...) = 0
fnmatch('*go*', Some text goes here...) = 1
fnmatch('*te?x*', Some text goes here...) = 0
fnmatch('*te?t*', Some text goes here...) = 1
fnmatch('So?m*', Some text goes here...) = 0
fnmatch('So*m*', Some text goes here...) = 1