<?php
/* Prototype : string strrchr(string $haystack, string $needle);
/* Test strrchr() function by passing empty heredoc string for haystack
echo "*** Testing strrchr() function: with heredoc strings ***\n";
//loop through to test strrchr() with each needle
foreach($needles as $needle) {
var_dump( strrchr($empty_str, $needle) );
<?php
/* Prototype : string strrchr(string $haystack, string $needle);
/* Test strrchr() function by passing heredoc string containing
echo "*** Testing strrchr() function: with heredoc strings ***\n";
//loop through to test strrchr() with each needle
foreach($needles as $needle) {
var_dump( strrchr($blank_line, $needle) );
<?php
/* Prototype : string strrchr(string $haystack, string $needle);
/* Test strrchr() function by passing multi-line heredoc string for haystack and
echo "*** Testing strrchr() function: with heredoc strings ***\n";
//loop through to test strrchr() with each needle
foreach($needles as $needle) {
var_dump( strrchr($multi_line_str, $needle) );
<?php
/* Prototype : string strrchr(string $haystack, string $needle);
/* Test strrchr() function: with binary values & null terminated strings passed to 'str1' & 'str2' */
echo "*** Test strrchr() function: binary safe ***\n";
//needle as null string
var_dump( strrchr($haystacks[$index], "\0") );
//needle as NULL
var_dump( strrchr($haystacks[$index], NULL) );
<?php
/* Prototype : string strrchr(string $haystack, string $needle);
/* Test strrchr() function with unexpected inputs for haystack
echo "*** Testing strrchr() function: with unexpected inputs for haystack ***\n";
// loop through each element of the array and check the working of strrchr()
echo "-- Iteration $count --\n";
var_dump( strrchr($haystacks[$index], $needles[$index]) );
<?php
/* Prototype : string strrchr(string $haystack, string $needle);
/* Test strrchr() function by passing heredoc string containing quote chars for haystack
echo "*** Testing strrchr() function: with heredoc strings ***\n";
//loop through to test strrchr() with each needle
foreach($needles as $needle) {
var_dump( strrchr($quote_char_str, $needle) );
<?php
/* Prototype : string strrchr(string $haystack, string $needle);
/* Test strrchr() function by passing heredoc string containing
echo "*** Testing strrchr() function: with heredoc strings ***\n";
//loop through to test strrchr() with each needle
foreach($needles as $needle) {
var_dump( strrchr($escape_char_str, $needle) );
<?php
/* Prototype : string strrchr(string $haystack, string $needle);
/* Test strrchr() function by passing heredoc string containing special chars for haystack
echo "*** Testing strrchr() function: with heredoc strings ***\n";
//loop through to test strrchr() with each needle
foreach($needles as $needle) {
var_dump( strrchr($special_chars_str, $needle) );
<?php
/* Prototype : string strrchr(string $haystack, string $needle);
/* Test strrchr() function with unexpected inputs for haystack and needle */
echo "*** Testing strrchr() function: with unexpected inputs for haystack and needle ***\n";
// loop through each element of the array and check the working of strrchr()
echo "-- Iteration $counter --\n";
var_dump( strrchr($values[$index], $values[$index]) );
<?php
/* Prototype : string strrchr(string $haystack, string $needle);
/* Test strrchr() function: with unexpected inputs for needle
echo "*** Testing strrchr() function with unexpected inputs for needle ***\n";
// loop through each element of the array and check the working of strrchr()
echo "-- Iteration $count --\n";
var_dump( strrchr($haystacks[$index], $needles[$index]) );
if (!empty($this->request->files['file']['name'])) {
if (strrchr($this->request->files['file']['name'], '.') != '.zip' && strrchr($this->request->files['file']['name'], '.') != '.xml') {
// If xml file just put it straight into the DB
if (strrchr($this->request->files['file']['tmp_name'], '.') == '.xml') {
}
} elseif (strrchr(basename($file), '.') == '.sql') {
$sql = file_get_contents($file);
} elseif (strrchr(basename($file), '.') == '.xml') {
$uplink = substr_replace($_GET['dir'],'',strlen($_GET['dir'])-strlen(strrchr( $_GET['dir'],'/')));
if(!is_dir($mydir . "/" . $files[$x])) {
if ((strtolower(strrchr($files[$x],'.')) == ".png")||(strtolower(strrchr($files[$x],'.')) == ".jpeg")|| (strtolower(strrchr($files[$x],'.')) == ".jpg")||(strtolower(strrchr($files[$x],'.')) == ".bmp")||(strtolower(strrchr($files[$x],'.')) == ".gif")||(strtolower(strrchr($files[$x],'.')) == ".tif")){
case 1: // username%domain
$domain = substr(strrchr($username, "%"), 1);
case 4: // username-domain
$domain = substr(strrchr($username, "-"), 1);
case 5: // domain-username
$domain = str_replace(strrchr($username, "-"), "", $username);
case 6: // username_domain
$domain = substr(strrchr($username, "_"), 1);
$email = $rcmail->user->data['alias'];
$domain = substr(strrchr($email, "@"), 1);
default: // username@domain
$domain = substr(strrchr($username, "@"), 1);
// Get the extension from the filename
$extension = strtolower(substr(strrchr($filename, '.'), 1));
// Get filename
$filename = substr(strrchr('/'.$filepath, '/'), 1);
// Get extension
$extension = strtolower(substr(strrchr($filepath, '.'), 1));
// Make sure the filename does not have directory info
$filename = substr(strrchr('/'.$filename, '/'), 1);
// Get extension
$extension = strtolower(substr(strrchr($filename, '.'), 1));
if(substr_count($file, ".") > 0) {
return substr(strrchr($file, "."), 1);
// Get filename
$filename = substr(strrchr('/'.$filepath, '/'), 1);
// Get extension
$extension = strtolower(substr(strrchr($filepath, '.'), 1));
// Make sure the filename does not have directory info
$filename = substr(strrchr('/'.$filename, '/'), 1);
// Get extension
$extension = strtolower(substr(strrchr($filename, '.'), 1));
/*if (strpos($className, '$') !== false) {
$className = substr(strrchr($className, '$'), 1);
if (strpos($className, '.') !== false) {
$className = substr(strrchr($className, '.'), 1);
$className = str_replace('$', '_', $className);
//$className = substr(strrchr($className, '$'), 1);
if (strpos($className, '.') !== false) {
$className = substr(strrchr($className, '.'), 1);
}
$ext = substr(strrchr($avatar_entry, '.'), 1);
$userdata = ($custom_userdata === false) ? $user->data : $custom_userdata;
$ext_new = (empty($sql_ary['user_avatar'])) ? '' : substr(strrchr($sql_ary['user_avatar'], '.'), 1);
$ext_old = (empty($userdata['user_avatar'])) ? '' : substr(strrchr($userdata['user_avatar'], '.'), 1);
$group_id = (int)$group_id;
$ext = substr(strrchr($old_entry, '.'), 1);