100+ results for 'php strrpos'

Not the results you expected?

EmailAddressValidator.php (https://github.com/KenBoyer/CompactCMS.git) PHP · 181 lines

1 <?php

2

3 /*

4

5 EmailAddressValidator Class

6 http://code.google.com/p/php-email-address-validation/

7

8 Released under New BSD license

9 http://www.opensource.org/licenses/bsd-license.php

10

11 Sample Code

45

46 // Split it into sections using last instance of "@"

47 $intAtSymbol = strrpos($strEmailAddress, '@');

48 if ($intAtSymbol === false) {

49 // No "@" symbol in email.

Callback.php (https://github.com/langpavel/nette.git) PHP · 192 lines

1 <?php

2

3 /**

17

18 /**

19 * PHP callback encapsulation.

20 *

21 * @author David Grudl

51 /*5.2*

52 // remove class namespace

53 if (is_string($this->cb) && $a = strrpos($this->cb, '\\')) {

54 $this->cb = substr($this->cb, $a + 1);

55

56 } elseif (is_array($this->cb) && is_string($this->cb[0]) && $a = strrpos($this->cb[0], '\\')) {

57 $this->cb[0] = substr($this->cb[0], $a + 1);

58 }

TAP.php (https://gitlab.com/virtualrealms/d7civicrm) PHP · 256 lines

27 namespace Civi\Test;

28

29 class TAP extends \PHPUnit\Util\Printer implements \PHPUnit\Framework\TestListener {

30

31 /**

78 * @param float $time

79 */

80 public function addFailure(\PHPUnit\Framework\Test $test, \PHPUnit\Framework\AssertionFailedError $e, $time) {

81 $this

82 ->writeNotOk($test, 'Failure');

170 * @since Method available since Release 3.0.0

171 */

172 public function addWarning(\PHPUnit\Framework\Test $test, \PHPUnit\Framework\Warning $e, $time) {

173 $this

174 ->write(sprintf("ok %d - # Warning%s\n", $this->testNumber, $e

JStringTest.php (https://github.com/orware/joomla-platform.git) PHP · 439 lines

1 <?php

2 /**

3 * @package Joomla.UnitTest

8 */

9

10 require_once JPATH_PLATFORM.'/joomla/utilities/string.php';

11 require_once 'TestHelpers/JString-helper-dataset.php';

13 /**

14 * Test class for JString.

15 * Generated by PHPUnit on 2009-10-26 at 22:29:34.

16 */

17 class JStringTest extends PHPUnit_Framework_TestCase

43 }

44

45 static public function strrposData() {

46 return JStringTest_DataSet::$strrposTests;

NameInformation.php (https://bitbucket.org/alexandretaz/maniac_divers.git) PHP · 155 lines

1 <?php

2 /**

3 * Zend Framework (http://framework.zend.com/)

105 if ($as === null) {

106 $as = trim($use, '\\');

107 $nsSeparatorPosition = strrpos($as, '\\');

108 if ($nsSeparatorPosition !== false && $nsSeparatorPosition !== 0 && $nsSeparatorPosition != strlen($as)) {

109 $as = substr($as, $nsSeparatorPosition + 1);

extprofile_mb.h (https://github.com/babannasd/hiphop-php.git) C Header · 323 lines

1 /*

2 +----------------------------------------------------------------------+

3 | HipHop for PHP |

4 +----------------------------------------------------------------------+

5 | Copyright (c) 2010- Facebook, Inc. (http://www.facebook.com) |

6 | Copyright (c) 1997-2010 The PHP Group |

7 +----------------------------------------------------------------------+

8 | This source file is subject to version 3.01 of the PHP license, |

9 | that is bundled with this package in the file LICENSE, and is |

10 | available through the world-wide-web at the following url: |

11 | http://www.php.net/license/3_01.txt |

12 | If you did not receive a copy of the PHP license and are unable to |

13 | obtain it through the world-wide-web, please send a note to |

14 | license@php.net so we can mail you a copy immediately. |

15 +----------------------------------------------------------------------+

16 */

WebServer.php (https://github.com/deviantintegral/symfony.git) PHP · 169 lines

1 <?php

2

3 /*

12 namespace Symfony\Bundle\WebServerBundle;

13

14 use Symfony\Component\Process\PhpExecutableFinder;

15 use Symfony\Component\Process\Process;

16 use Symfony\Component\Process\Exception\RuntimeException;

127

128 $address = file_get_contents($pidFile);

129 $pos = strrpos($address, ':');

130 $hostname = substr($address, 0, $pos);

131 $port = substr($address, $pos + 1);

146 private function createServerProcess(WebServerConfig $config)

147 {

148 $finder = new PhpExecutableFinder();

149 if (false === $binary = $finder->find(false)) {

150 throw new \RuntimeException('Unable to find the PHP binary.');

WebServer.php (https://github.com/gimler/symfony.git) PHP · 169 lines

1 <?php

2

3 /*

13

14 use Symfony\Component\Process\Exception\RuntimeException;

15 use Symfony\Component\Process\PhpExecutableFinder;

16 use Symfony\Component\Process\Process;

17

127

128 $address = file_get_contents($pidFile);

129 $pos = strrpos($address, ':');

130 $hostname = substr($address, 0, $pos);

131 $port = substr($address, $pos + 1);

146 private function createServerProcess(WebServerConfig $config)

147 {

148 $finder = new PhpExecutableFinder();

149 if (false === $binary = $finder->find(false)) {

150 throw new \RuntimeException('Unable to find the PHP binary.');

travelbook.php (https://github.com/ponlue/abktours.git) PHP · 130 lines

1 <?php

2 /**

3 * "TRAVELbook - JOOMLA! on Tour"

4 *

5 * @version $Id: travelbook.php 2 2010-04-13 13:37:46Z WEB $

6 * @copyright Copyright 2009-2010, $Author: WEB $

7 * @license GNU General Public License (GNU GPL) GPLv2,

55

56 // then the script itself

57 if (!empty($x_forwarded_for) && strrpos($x_forwarded_for, '.') > 0)

58 {

59 $arr = explode(',', $x_forwarded_for);

userapp_manage.php (https://gitlab.com/phamngsinh/baitaplon_sinhvien) PHP · 120 lines

1 <?php

2

3 /**

5 * This is NOT a freeware, use is subject to license terms

6 *

7 * $Id: userapp_manage.php 25889 2011-11-24 09:52:20Z monkey $

8 */

9

16 }

17

18 $uchUrl = getsiteurl().'userapp.php?mod=manage';

19

20 if(submitcheck('ordersubmit')) {

35 }

36

37 showmessage('do_success', 'userapp.php?mod=manage&ac=menu');

38 }

39

DomainLiteral.php (https://gitlab.com/hoangduys4k5/laravelproject) PHP · 212 lines

1 <?php

2 namespace Egulias\EmailValidator\Parser;

3

119 }

120

121 if ($colons !== strrpos($IPv6, '::')) {

122 $this->warnings[IPV6DoubleColon::CODE] = new IPV6DoubleColon();

123 return;

147 // Extract IPv4 part from the end of the address-literal (if there is one)

148 if ($IPv4Match > 0) {

149 $index = (int) strrpos($addressLiteralIPv4, $matchesIP[0]);

150 //There's a match but it is at the start

151 if ($index > 0) {

174

175 if ($IPv4Match > 0) {

176 $index = strrpos($addressLiteral, $matchesIP[0]);

177 //There's a match but it is at the start

178 if ($index === 0) {

users_create.php (https://github.com/ichraffsnicht/ClanSphere-Enhanced.git) PHP · 173 lines

1 <?php

2 // ClanSphere 2010 - www.clansphere.net

3 // $Id$

12 $data = array();

13

14 require_once('mods/gallery/functions.php');

15

16 $cs_option = cs_sql_option(__FILE__,'gallery');

30

31 if (file_exists('uploads/usersgallery/pics/' . $cs_gallery['users_id'] . '.' . $files_gl['picture']['name'])) {

32 $filename_tmp = ( str_split($files_gl['picture']['name'], strrpos($files_gl['picture']['name'], '.')) );

33 $filename_counter = 0;

34 while (file_exists('uploads/usersgallery/pics/' . $cs_gallery['users_id'] . '.' . $filename_tmp[0] . '_' . $filename_counter . $filename_tmp[1]))

94 }

95 if(extension_loaded('gd') AND !empty($gray)) {

96 require_once('mods/gallery/gd_2.php');

97 cs_gray($files_gl['picture']['tmp_name']);

98 }

Regex.php (https://github.com/DoghouseMedia/Airtime.git) PHP · 107 lines

1 <?php

2 /* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */

3

5 * Validates values using regular expressions

6 *

7 * PHP versions 4 and 5

8 *

9 * LICENSE: This source file is subject to version 3.01 of the PHP license

10 * that is available through the world-wide-web at the following URI:

11 * http://www.php.net/license/3_01.txt If you did not receive a copy of

12 * the PHP License and are unable to obtain it through the web, please

18 * @copyright 2001-2009 The PHP Group

19 * @license http://www.php.net/license/3_01.txt PHP License 3.01

20 * @version CVS: $Id: Regex.php,v 1.6 2009/04/04 21:34:04 avb Exp $

Regex.php (https://github.com/HumboldtStateUniversity/HSU-UNL-Event-Publisher.git) PHP · 107 lines

1 <?php

2 /* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */

3

5 * Validates values using regular expressions

6 *

7 * PHP versions 4 and 5

8 *

9 * LICENSE: This source file is subject to version 3.01 of the PHP license

10 * that is available through the world-wide-web at the following URI:

11 * http://www.php.net/license/3_01.txt If you did not receive a copy of

12 * the PHP License and are unable to obtain it through the web, please

18 * @copyright 2001-2010 The PHP Group

19 * @license http://www.php.net/license/3_01.txt PHP License 3.01

20 * @version CVS: $Id: Regex.php 304451 2010-10-17 07:31:18Z avb $

NameMapping.class.php (https://github.com/thekid/xp-experiments.git) PHP · 145 lines

1 <?php

2 /* This class is part of the XP framework

3 *

84 // If this class is the same as the current, use "self" keyword

85 return 'self';

86 } else if (substr($current, 0, strrpos($current, '.')) == substr($q, 0, strrpos($q, '.'))) {

87

88 // If this class is in the same package as the current omit package name

89 return substr($q, strrpos($q, '.')+ 1);

90 }

91

SimpleRouter.php (https://github.com/iguana007/Tabella-NetteAddon-for-PHP-5.3.git) PHP · 146 lines

1 <?php

2

3 /**

45 {

46 if (is_string($defaults)) {

47 $a = strrpos($defaults, ':');

48 if (!$a) {

49 throw new Nette\InvalidArgumentException("Argument must be array or string in format Presenter:action, '$defaults' given.");

ViewHelper.php (https://github.com/Shreef/zf2.git) PHP · 260 lines

1 <?php

2 /**

3 * Zend Framework

96 } else {

97 $type = $element->getType();

98 if ($pos = strrpos($type, '\\')) {

99 $type = substr($type, $pos + 1);

100 }

PhpClass.php (https://github.com/adaykin/zf2.git) PHP · 562 lines

26

27 /**

28 * @uses \Zend\CodeGenerator\Php\AbstractPhp

29 * @uses \Zend\CodeGenerator\PhpDocblock

147 * setPhpFile()

148 *

149 * @param Zend\CodeGenerator\Php\PhpFile $phpFile

150 */

151 public function setPhpFile(PhpFile $phpFile)

317 *

318 * @param array $properties

319 * @return \Zend\CodeGenerator\Php\PhpClass

320 */

321 public function setProperties(array $properties)

558 $this->_properties = new PhpMember\MemberContainer(PhpMember\MemberContainer::TYPE_PROPERTY);

559 $this->_methods = new PhpMember\MemberContainer(PhpMember\MemberContainer::TYPE_METHOD);

560 }

561

Cookie.php (https://github.com/ChuguluGames/mediawiki-svn.git) PHP · 248 lines

1 <?php

2 /**

3 * @defgroup HTTP HTTP

95

96 // Don't allow cookies for "co.uk" or "gov.uk", etc, but allow "supermarket.uk"

97 if ( strrpos( $domain, "." ) - strlen( $domain ) == -3 ) {

98 if ( ( count( $dc ) == 2 && strlen( $dc[0] ) <= 2 )

99 || ( count( $dc ) == 3 && strlen( $dc[0] ) == "" && strlen( $dc[1] ) <= 2 ) ) {

Url.php (https://github.com/vinnivinsachi/Vincent-DR.git) PHP · 117 lines

1 <?php

2 // vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4:

3 /**

4 * Url rule end renderer for Xhtml

5 *

6 * PHP versions 4 and 5

7 *

8 * @category Text

9 * @package Text_Wiki

10 * @author Paul M. Jones <pmjones@php.net>

11 * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1

12 * @version CVS: $Id: Url.php,v 1.13 2006/02/10 23:07:03 toggg Exp $

13 * @link http://pear.php.net/package/Text_Wiki

14 */

15

Method.php (https://gitlab.com/yousafsyed/easternglamor) PHP · 187 lines

33 * @see Zend_Reflection_Parameter

34 */

35 #require_once 'Zend/Reflection/Parameter.php';

36

37 /**

52 {

53 if ('' == $this->getDocComment()) {

54 #require_once 'Zend/Reflection/Exception.php';

55 throw new Zend_Reflection_Exception($this->getName() . ' does not have a docblock');

56 }

92 $zendReflection = new $reflectionClass($phpReflection->getName());

93 if (!$zendReflection instanceof Zend_Reflection_Class) {

94 #require_once 'Zend/Reflection/Exception.php';

95 throw new Zend_Reflection_Exception('Invalid reflection class provided; must extend Zend_Reflection_Class');

96 }

109 $phpReflections = parent::getParameters();

110 $zendReflections = array();

111 while ($phpReflections && ($phpReflection = array_shift($phpReflections))) {

112 $instance = new $reflectionClass(array($this->getDeclaringClass()->getName(), $this->getName()), $phpReflection->getName());

commands.php (https://github.com/jfefe/dolibarr.git) PHP · 280 lines

1 <?php

2 /*

3 * FCKeditor - The text editor for Internet - http://www.fckeditor.net

20 * == END LICENSE ==

21 *

22 * This is the File Manager Connector for PHP.

23 */

24

187

188 // Get the extension.

189 $sExtension = substr( $sFileName, ( strrpos($sFileName, '.') + 1 ) ) ;

190 $sExtension = strtolower( $sExtension ) ;

191

Router.php (https://bitbucket.org/kiids/fishpig-wordpress-integration.git) PHP · 139 lines

1 <?php

2 /**

3 * @category Fishpig

78 {

79 if (strpos($uri, '/') !== false) {

80 $postUri = substr($uri, 0, strrpos($uri, '/'));

81

82 header("HTTP/1.1 301 Moved Permanently");

125

126 // Forward certain request directly to WP

127 $this->addStaticRoute('/^index.php/i', 'forward');

128 $this->addStaticRoute('/^wp-content\/(.*)/i', 'forwardFile');

129 $this->addStaticRoute('/^wp-includes\/(.*)/i', 'forwardFile');

130 $this->addStaticRoute('/^wp-cron.php.*/', 'forwardFile');

131 $this->addStaticRoute('/^wp-admin[\/]{0,1}$/', 'wpAdmin');

132 $this->addStaticRoute('/^wp-pass.php.*/', 'applyPostPassword');

upload.php (https://github.com/roverwolf/plupload.git) PHP · 115 lines

1 <?php

2 /**

3 * upload.php

37 // Make sure the fileName is unique

38 if (file_exists($targetDir . DIRECTORY_SEPARATOR . $fileName)) {

39 $ext = strrpos($fileName, '.');

40 $fileName_a = substr($fileName, 0, $ext);

41 $fileName_b = substr($fileName, $ext);

98 if ($out) {

99 // Read binary input stream and append it to temp file

100 $in = fopen("php://input", "rb");

101

102 if ($in) {

Method.php (https://bitbucket.org/netglue/zf-1.12-release.git) PHP · 187 lines

33 * @see Zend_Reflection_Parameter

34 */

35 require_once 'Zend/Reflection/Parameter.php';

36

37 /**

52 {

53 if ('' == $this->getDocComment()) {

54 require_once 'Zend/Reflection/Exception.php';

55 throw new Zend_Reflection_Exception($this->getName() . ' does not have a docblock');

56 }

92 $zendReflection = new $reflectionClass($phpReflection->getName());

93 if (!$zendReflection instanceof Zend_Reflection_Class) {

94 require_once 'Zend/Reflection/Exception.php';

95 throw new Zend_Reflection_Exception('Invalid reflection class provided; must extend Zend_Reflection_Class');

96 }

109 $phpReflections = parent::getParameters();

110 $zendReflections = array();

111 while ($phpReflections && ($phpReflection = array_shift($phpReflections))) {

112 $instance = new $reflectionClass(array($this->getDeclaringClass()->getName(), $this->getName()), $phpReflection->getName());

NameContext.php (https://gitlab.com/madwanz64/laravel) PHP · 285 lines

1 <?php declare(strict_types=1);

2

3 namespace PhpParser;

4

5 use PhpParser\Node\Name;

6 use PhpParser\Node\Name\FullyQualified;

7 use PhpParser\Node\Stmt;

8

9 class NameContext

273

274 private function normalizeConstName(string $name) {

275 $nsSep = strrpos($name, '\\');

276 if (false === $nsSep) {

277 return $name;

ClassNotFoundFatalErrorHandler.php (https://gitlab.com/Laolballs/cbtapp) PHP · 197 lines

1 <?php

2

3 /*

50

51 $fullyQualifiedClassName = substr($error['message'], $prefixLen, -$notFoundSuffixLen);

52 if (false !== $namespaceSeparatorIndex = strrpos($fullyQualifiedClassName, '\\')) {

53 $className = substr($fullyQualifiedClassName, $namespaceSeparatorIndex + 1);

54 $namespacePrefix = substr($fullyQualifiedClassName, 0, $namespaceSeparatorIndex);

138

139 $classes = array();

140 $filename = $class.'.php';

141 foreach (new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($path), \RecursiveIteratorIterator::LEAVES_ONLY) as $file) {

142 if ($filename == $file->getFileName() && $class = $this->convertFileToClass($path, $file->getPathName(), $prefix)) {

159 $candidates = array(

160 // namespaced class

161 $namespacedClass = str_replace(array($path.DIRECTORY_SEPARATOR, '.php', '/'), array('', '', '\\'), $file),

162 // namespaced class (with target dir)

163 $namespacedClassTargetDir = $prefix.str_replace(array($path.DIRECTORY_SEPARATOR, '.php', '/'), array('', '', '\\'), $file),

ResourceTypeConfig.php (https://github.com/talesam/sgce.git) PHP · 357 lines

1 <?php

2 /*

3 * CKFinder

269 $pieces = explode('.', $fileName);

270

271 // First, check the last extension (ex. in file.php.jpg, the "jpg").

272 if ( !$this->checkSingleExtension( $pieces[sizeof($pieces)-1] ) ) {

273 return false;

288 }

289 else {

290 // Check only the last extension (ex. in file.php.jpg, only "jpg").

291 return $this->checkSingleExtension( substr($fileName, strrpos($fileName,'.')+1) );

ckfinder_php5.php (https://gitlab.com/endomorphosis/falkenstein) PHP · 231 lines

1 <?php

2 /*

3 * CKFinder

181 $dir = substr( $url, 0, strrpos( $url, "/" ) + 1 ) ;

182 $editorObj->Config['LinkUploadURL'] = $dir . urlencode( 'core/connector/php/connector.php?command=QuickUpload&type=Files' ) ;

183 $editorObj->Config['ImageUploadURL'] = $dir . urlencode( 'core/connector/php/connector.php?command=QuickUpload&type=') . ( empty( $imageType ) ? 'Images' : $imageType ) ;

184 $editorObj->Config['FlashUploadURL'] = $dir . urlencode( 'core/connector/php/connector.php?command=QuickUpload&type=') . ( empty( $flashType ) ? 'Flash' : $flashType ) ;

185 }

186

226 $dir = substr( $url, 0, strrpos( $url, "/" ) + 1 ) ;

227 $editorObj->config['filebrowserUploadUrl'] = $dir . 'core/connector/php/connector.php?command=QuickUpload&type=Files' ;

228 $editorObj->config['filebrowserImageUploadUrl'] = $dir . 'core/connector/php/connector.php?command=QuickUpload&type=' . ( empty( $imageType ) ? 'Images' : $imageType ) ;

229 $editorObj->config['filebrowserFlashUploadUrl'] = $dir . 'core/connector/php/connector.php?command=QuickUpload&type=' . ( empty( $flashType ) ? 'Flash' : $flashType ) ;

230 }

231 }

File.php (https://github.com/StandbyTaskForce/Ushahidi_Web.git) PHP · 245 lines

1 <?php defined('SYSPATH') OR die('No direct access allowed.');

2 /**

3 * File-based Cache driver.

4 *

5 * $Id: File.php 3917 2009-01-21 03:06:22Z zombor $

6 *

7 * @package Cache

8 * @author Kohana Team

9 * @copyright (c) 2007-2008 Kohana Team

10 * @license http://kohanaphp.com/license.html

11 */

12 class Cache_File_Driver implements Cache_Driver {

237 {

238 // Get the expiration time

239 $expires = (int) substr($file, strrpos($file, '~') + 1);

240

241 // Expirations of 0 are "never expire"

MultiByte.php (https://github.com/grandison/budo16.git) PHP · 153 lines

1 <?php

2 /**

3 * Zend Framework

17 * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)

18 * @license http://framework.zend.com/license/new-bsd New BSD License

19 * @version $Id: MultiByte.php 16971 2009-07-22 18:05:45Z mikaelkael $

20 */

21

61 $cutLength = iconv_strlen($subString, $charset) + 1;

62 } else {

63 $spacePos = iconv_strrpos($subString, ' ', $charset);

64

65 if ($spacePos !== false) {

function.iconv-strrpos.html (https://bitbucket.org/stillzhl/manuals.git) HTML · 131 lines

15 <h1 class="refname">iconv_strrpos</h1>

16 <p class="verinfo">(PHP 5)</p><p class="refpurpose"><span class="refname">iconv_strrpos</span> &mdash; <span class="dc-title">Finds the last occurrence of a needle within a haystack</span></p>

17

18 </div>

32 </p>

33 <p class="para">

34 In contrast to <span class="function"><a href="function.strrpos.html" class="function">strrpos()</a></span>, the return value of

35 <span class="function"><strong>iconv_strrpos()</strong></span> is the number of characters that

103 <p class="para">

104 If <em><code class="parameter">needle</code></em> is not found,

105 <span class="function"><strong>iconv_strrpos()</strong></span> will return <strong><code>FALSE</code></strong>.

106 </p>

107 <div class="warning"><strong class="warning">Warning</strong><p class="simpara">此函数可能返回布尔值

116 <p class="para">

117 <ul class="simplelist">

118 <li class="member"> <span class="function"><a href="function.strrpos.html" class="function" rel="rdfs-seeAlso">strrpos()</a> - 计算指定字符串在目标字符串中最后一次出现的位置</span></li>

119 <li class="member"> <span class="function"><a href="function.iconv-strpos.html" class="function" rel="rdfs-seeAlso">iconv_strpos()</a> - Finds position of first occurrence of a needle within a haystack</span></li>

120 <li class="member"> <span class="function"><a href="function.mb-strrpos.html" class="function" rel="rdfs-seeAlso">mb_strrpos()</a> - 查找字符串在一个字符串中最后出现的位置</span></li>

request.class.php (https://github.com/rspieker/konsolidate_breed.git) PHP · 169 lines

1 <?php

2

3 /**

31 $default = (bool) count($arg) ? array_shift($arg) : null;

32

33 $seperator = strrpos($key, $this->_objectSeparator);

34 if ($seperator !== false && ($module = $this->getModule(substr($key, 0, $seperator))) !== false)

35 {

CmsApplication.php (https://github.com/pimax/picms.git) PHP · 120 lines

1 <?php

2

3 class CmsApplication extends CWebApplication

21 //echo '<pre>', print_r($this->getRequest()->getUrl(), true), '</pre>';

22

23 if ($this->getRequest()->getUrl() != '/' && mb_strrpos($this->getRequest()->getUrl(), "/", 0, "utf8") === mb_strlen($this->getRequest()->getUrl(), "utf8") - 1) {

24 $this->getRequest()->redirect(mb_substr($this->getRequest()->getUrl(), 0, mb_strlen($this->getRequest()->getUrl(), "utf8") - 1, "utf8"), true, 301);

25 }

Abstract.php (https://github.com/grandison/budo16.git) PHP · 172 lines

1 <?php

2 /**

3 * SocialEngine

7 * @copyright Copyright 2006-2010 Webligo Developments

8 * @license http://www.socialengine.net/license/

9 * @version $Id: Abstract.php 7244 2010-09-01 01:49:53Z john $

10 * @author John Boehr <j@webligo.com>

11 */

124 // Skip dot files, package files and .svn or CVS folders

125 if( !$it->isDot() &&

126 substr(basename($subpath), 0, strrpos(basename($subpath), '.')) != 'package' &&

127 basename($subpath) != '.svn' &&

128 basename($subpath) != 'CVS' ) {

silentUpgrade.php (https://github.com/joshbhamilton/sugarcrm_dev.git) PHP · 106 lines

78 $php_dir = (isset($p_info['dirname']) && $p_info['dirname'] != '.') ? $p_info['dirname'] . '/' : '';

79

80 $step1 = $php_path."php -f {$php_dir}silentUpgrade_step1.php " . build_argument_string($argv);

81 passthru($step1, $output);

82

85 if(!$has_error) {

86 if($run_dce_upgrade) {

87 $step2 = $php_path."php -f {$php_dir}silentUpgrade_dce_step1.php " . build_argument_string($argv);

88 passthru($step2, $output);

89 } else {

96 $has_error = $output == 0 ? false : true;

97 if(!$has_error) {

98 $step3 = $php_path."php -f {$php_dir}silentUpgrade_dce_step2.php " . build_argument_string($argv);

99 passthru($step3, $output);

100 }

modifier.iconify.php (https://gitlab.com/ElvisAns/tiki) PHP · 159 lines

1 <?php

2

3 // (c) Copyright by authors of the Tiki Wiki CMS Groupware Project

31 $smarty->loadPlugin('smarty_function_icon');

32 $icon = '';

33 $ext = strtolower(substr($string, strrpos($string, '.') + 1));

34 if ($fileId && substr($filetype, 0, 6) == 'image/') {

35 // Special handling for file gallery images,

43 return "<img src=\"$icon\" width=\"$width\"/>";

44 } else {

45 include_once('lib/mime/mimetypes.php');

46 global $mimetypes;

47 $mimes = array_keys($mimetypes, $filetype);

121 case 'js':

122 case 'less':

123 case 'php':

124 case 'py':

125 case 'scss':

number.php (https://bitbucket.org/murtuza88/carolina-home-stone.git) PHP · 129 lines

1 <?php

2 /**

3 * Numeric validation can be configured to allow a range of numbers,

119 }

120 // We do some strrev trickery to count # of decimal places

121 elseif ($this->allow_decimals && strrpos(strrev($input), $this->decimal_separator) > $this->decimal_places) {

122 $this->error_msg = sprintf(__('The %s field cannot contain more than %s decimal places.', CCTM_TXTDOMAIN), $this->get_subject(), $this->decimal_places);

123 }

User.php (https://gitlab.com/Mrowa96/fluid-base-basic) PHP · 207 lines

1 <?php

2 namespace app\models;

3

152 }

153

154 $timestamp = (int) substr($token, strrpos($token, '_') + 1);

155 $expire = Yii::$app->params['user.passwordResetTokenExpire'];

156 return $timestamp + $expire >= time();

bootstrap.php (https://gitlab.com/remyvianne/krowkaramel) PHP · 244 lines

1 <?php

2 if (!defined('ABSPATH')) exit;

3 use MailPoetVendor\Symfony\Polyfill\Mbstring as p;

152 }

153 }

154 if (!\function_exists('mb_strrpos')) {

155 function mb_strrpos($s, $needle, $offset = 0, $enc = null)

156 {

157 return p\Mbstring::mb_strrpos($s, $needle, $offset, $enc);

158 }

159 }

SetCookie.php (https://github.com/sidealice/zf2.git) PHP · 399 lines

1 <?php

2

3 namespace Zend\Http\Header;

360 public function isValidForRequest($requestDomain, $path, $isSecure = false)

361 {

362 if ($this->getDomain() && (strrpos($requestDomain, $this->getDomain()) !== false)) {

363 return false;

364 }

User.php (https://gitlab.com/kursat/conews) PHP · 234 lines

1 <?php

2

3 namespace app\models;

141 }

142

143 $timestamp = (int) substr($token, strrpos($token, '_') + 1);

144 $expire = Yii::$app->params['user.passwordResetTokenExpire'];

145 return $timestamp + $expire >= time();

API.php (https://github.com/ktk070/Anopier.git) PHP · 335 lines

1 <?php

2 class ExtDirect_API {

3 private $_routerUrl = 'router.php';

210 $path = $settings['basePath'] . DIRECTORY_SEPARATOR .

211 $settings['subPath'] . DIRECTORY_SEPARATOR .

212 $class . '.php';

213 $path = str_replace('\\\\', '\\', $path);

214 } else {

238

239 echo ($this->_namespace ?

240 'Ext.ns(\'' . substr($this->_descriptor, 0, strrpos($this->_descriptor, '.')) . '\'); ' . $this->_descriptor:

241 'Ext.ns(\'Ext.app\'); ' . 'Ext.app.REMOTING_API'

242 );

246 }

247

248 public function setRouterUrl($routerUrl = 'router.php') {

249 if(isset($routerUrl)) {

250 $this->_routerUrl = $routerUrl;

UploadedFile.class.php (https://bitbucket.org/stk2k/charcoalphp2.1.git) PHP · 171 lines

1 <?php

2 /**

3 * アップロードされたファイル情報を保持するクラス

4 *

5 * PHP version 5

6 *

7 * @package class.util

8 * @author CharcoalPHP Development Team

9 * @copyright 2008 stk2k, sazysoft

10 */

117 public function getExtension()

118 {

119 $pos = strrpos( $this->name, '.' );

120 if ( is_int($pos) ){

121 return substr( $this->name, $pos );

Repository.php (https://bitbucket.org/shrikeh/aeronauticaimperialis.git) PHP · 275 lines

1 <?php

2 /**

3 * Zend Framework

18 * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)

19 * @license http://framework.zend.com/license/new-bsd New BSD License

20 * @version $Id: Repository.php 23775 2011-03-01 17:25:24Z ralph $

21 */

22

24 * @see Zend_Tool_Framework_Provider_Signature

25 */

26 require_once 'Zend/Tool/Framework/Provider/Signature.php';

27

28 /**

29 * @see Zend_Tool_Framework_Registry_EnabledInterface

30 */

31 require_once 'Zend/Tool/Framework/Registry/EnabledInterface.php';

32

33 /**

File.php (https://gitlab.com/hatemdigify/digifyblog) PHP · 136 lines

1 <?php

2

3 /*

129 {

130 $originalName = str_replace('\\', '/', $name);

131 $pos = strrpos($originalName, '/');

132 $originalName = false === $pos ? $originalName : substr($originalName, $pos + 1);

133

File.php (https://github.com/robertleeplummerjr/bluebox.git) PHP · 245 lines

1 <?php defined('SYSPATH') OR die('No direct access allowed.');

2 /**

3 * File-based Cache driver.

4 *

5 * $Id: File.php 3769 2008-12-15 00:48:56Z zombor $

6 *

7 * @package Cache

8 * @author Kohana Team

9 * @copyright (c) 2007-2008 Kohana Team

10 * @license http://kohanaphp.com/license.html

11 */

12 class Cache_File_Driver implements Cache_Driver {

237 {

238 // Get the expiration time

239 $expires = (int) substr($file, strrpos($file, '~') + 1);

240

241 // Expirations of 0 are "never expire"

Image.php (https://bitbucket.org/jokusafet/magento2.git) PHP · 282 lines

1 <?php

2 /**

3 * Magento

8 * that is bundled with this package in the file LICENSE.txt.

9 * It is also available through the world-wide-web at this URL:

10 * http://opensource.org/licenses/osl-3.0.php

11 * If you did not receive a copy of the license and are unable to

12 * obtain it through the world-wide-web, please send an email

22 * @package Mage_Media

23 * @copyright Copyright (c) 2012 X.commerce, Inc. (http://www.magentocommerce.com)

24 * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)

25 */

26

138 public function getExtension()

139 {

140 return substr($this->getFileName(), strrpos($this->getFileName(), '.')+1);

141 }

142

Files.php (https://github.com/Asherontas/Active-CMS.git) PHP · 215 lines

1 <?php

2 /**

3 * File Utilities.

4 * @author Wei Zhuo

5 * @version $Id: Files.php,v 1.2 2006/12/16 21:38:13 thierrybo Exp $

6 * @package ImageManager

7 */

15 * File Utilities

16 * @author Wei Zhuo

17 * @version $Id: Files.php,v 1.2 2006/12/16 21:38:13 thierrybo Exp $

18 * @package ImageManager

19 * @subpackage files

47 if($unique)

48 {

49 $dotIndex = strrpos($destination_file, '.');

50 $ext = '';

51 if(is_int($dotIndex))

down_nba.php (https://github.com/zhuifengshaonianhanlu/pikachu.git) PHP · 119 lines

6

7

8 $SELF_PAGE = substr($_SERVER['PHP_SELF'],strrpos($_SERVER['PHP_SELF'],'/')+1);

9

10 if ($SELF_PAGE = "unsafedownload.php"){

60 <div class="png" style="float: left">

61 <img src="download/rayal.png" /><br />

62 <a href="execdownload.php?filename=rayal.png" >雷.阿伦</a>

63 </div>

64

76 <div class="png" style="float: left">

77 <img src="download/pj.png" /><br />

78 <a href="execdownload.php?filename=pj.png" >斯托贾科维奇</a>

79 </div>

80

StringCaseManipulationInspector.java (https://github.com/kalessil/phpinspectionsea.git) Java · 116 lines

1 package com.kalessil.phpStorm.phpInspectionsEA.inspectors.apiUsage.strings;

2

3 import com.intellij.codeInspection.ProblemsHolder;

4 import com.intellij.psi.PsiElement;

5 import com.intellij.psi.PsiElementVisitor;

6 import com.jetbrains.php.lang.psi.elements.FunctionReference;

7 import com.kalessil.phpStorm.phpInspectionsEA.fixers.UseSuggestedReplacementFixer;

8 import com.kalessil.phpStorm.phpInspectionsEA.openApi.BasePhpElementVisitor;

9 import com.kalessil.phpStorm.phpInspectionsEA.openApi.BasePhpInspection;

10 import com.kalessil.phpStorm.phpInspectionsEA.utils.MessagesPresentationUtil;

11 import com.kalessil.phpStorm.phpInspectionsEA.utils.OpenapiTypesUtil;

12 import org.jetbrains.annotations.NotNull;

13 import org.jetbrains.annotations.Nullable;

19

20 /*

21 * This file is part of the Php Inspections (EA Extended) package.

22 *

23 * (c) Vladimir Reznichenko <kalessil@gmail.com>

lmbSingleByteStringsDriverTest.class.php (https://github.com/limb-php-framework/limb-app-buildman.git) PHP · 178 lines

1 <?php

2 /**

3 * Limb Web Application Framework

7 * @copyright Copyright &copy; 2004-2007 BIT

8 * @license LGPL http://www.gnu.org/copyleft/lesser.html

9 * @version $Id: lmbSingleByteStringsDriverTest.class.php 4998 2007-02-08 15:36:32Z pachanga $

10 * @package i18n

11 */

12 lmb_require('limb/i18n/src/charset/lmbSingleByteStringsDriver.class.php');

13

14 class lmbSingleByteStringsDriverTest extends UnitTestCase

77 }

78

79 function test_strrpos() {

80 $driver = new lmbSingleByteStringsDriver();

81

ws_GetVODMoviesBySubcategory.php (https://github.com/thekidrobot/adminSite.git) PHP · 157 lines

1 <?php

2 session_start();

3 // incluir libreria nusoap

4 require_once('conexion.inc.php');

5 require_once('lib/nusoap.php');

8 $soap_server = new nusoap_server();

9

10 $page = $_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF'];

11 $page = 'http://'.substr($page,0,strrpos($page,"/"));

Cookie.php (https://github.com/nguyennamtien/TaskBoxx.git) PHP · 287 lines

1 <?php

2

3 /*

135

136 $values['domain'] = $parts['host'];

137 $values['path'] = substr($parts['path'], 0, strrpos($parts['path'], '/'));

138 }

139

Image.php (https://bitbucket.org/kdms/sh-magento.git) PHP · 282 lines

1 <?php

2 /**

3 * Magento Enterprise Edition

138 public function getExtension()

139 {

140 return substr($this->getFileName(), strrpos($this->getFileName(), '.')+1);

141 }

142

167 public function getName()

168 {

169 return substr($this->getFileName(), 0, strrpos($this->getFileName(), '.'));

170 }

171

Cookie.php (https://bitbucket.org/hanutimes/hanutimes.git) PHP · 324 lines

1 <?php

2

3 /*

150

151 $values['domain'] = $urlParts['host'];

152 $values['path'] = substr($urlParts['path'], 0, strrpos($urlParts['path'], '/'));

153 }

154

RCCWP_Post.php (https://github.com/chuyskywalker/Magic-Fields.git) PHP · 233 lines

1 <?php

2

3 class RCCWP_Post

161

162 foreach( $_REQUEST['rc_cwp_meta_photos'] as $meta_name ) {

163 $slashPos = strrpos($_POST[$meta_name], "/");

164 if (!($slashPos === FALSE))

165 $_POST[$meta_name] = substr($_POST[$meta_name], $slashPos+1);

166

167 //Rename photo if it is edited using editnplace to avoid phpthumb cache

168 if ($_POST[$meta_name.'_dorename'] == 1){

169 $oldFilename = $_POST[$meta_name];

219

220 if (isset($customWritePanelId)) {

221 include_once('RCCWP_Application.php');

222 $customWritePanel = RCCWP_CustomWritePanel::Get($customWritePanelId);

223 }

ezmbstringmapper.php (https://github.com/zerustech/ezpublish.git) PHP · 190 lines

1 <?php

2 /**

3 * File containing the eZMBStringMapper class.

10

11 /*!

12 \class eZMBStringMapper ezmbstringmapper.php

13 \ingroup eZI18N

14 \brief The class eZMBStringMapper does

83 mb_strlen

84 mb_strpos

85 mb_strrpos

86 mb_strwidth

87 mb_substr

95 function_exists( "mb_strlen" ) and

96 function_exists( "mb_strpos" ) and

97 function_exists( "mb_strrpos" ) and

98 function_exists( "mb_strwidth" ) and

99 function_exists( "mb_substr" ) );

DashboardController.php (https://gitlab.com/Ankit77/motiv8) PHP · 249 lines

1 <?php

2

3 namespace App\Http\Controllers\Backend;

40 $imgtitle=$file->getClientOriginalName();

41

42 $newFileName = substr($imgtitle, 0 , (strrpos($imgtitle, ".")));

43 //echo $newFileName; die;

44 $fmove = $file->move(public_path() . '/images/background/', $image);

118 $imgtitle=$file->getClientOriginalName();

119

120 $newFileName = substr($imgtitle, 0 , (strrpos($imgtitle, ".")));

121 //echo $newFileName; die;

122 $fmove = $file->move(public_path() . '/images/background/', $image);

bootstrap.php (https://gitlab.com/jjpa2018/dashboard) PHP · 88 lines

1 <?php

2

3 /*

16 }

17

18 if (\PHP_VERSION_ID >= 80000) {

19 return require __DIR__.'/bootstrap80.php';

58 if (!function_exists('iconv_strrpos')) {

59 function iconv_strrpos($haystack, $needle, $encoding = null) { null === $encoding && $encoding = p\Iconv::$internalEncoding; return mb_strrpos($haystack, $needle, 0, $encoding); }

60 }

61 if (!function_exists('iconv_substr')) {

79 if (!function_exists('iconv_strrpos')) {

80 function iconv_strrpos($haystack, $needle, $encoding = null) { return p\Iconv::iconv_strrpos($haystack, $needle, $encoding); }

81 }

82 if (!function_exists('iconv_substr')) {

Repository.php (https://github.com/rakesh-sankar/PHP-Framework-Benchmark.git) PHP · 275 lines

1 <?php

2 /**

3 * Zend Framework

18 * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)

19 * @license http://framework.zend.com/license/new-bsd New BSD License

20 * @version $Id: Repository.php 23483 2010-12-10 03:40:01Z mjh_ca $

21 */

22

24 * @see Zend_Tool_Framework_Provider_Signature

25 */

26 require_once 'Zend/Tool/Framework/Provider/Signature.php';

27

28 /**

29 * @see Zend_Tool_Framework_Registry_EnabledInterface

30 */

31 require_once 'Zend/Tool/Framework/Registry/EnabledInterface.php';

32

33 /**

Repository.php (https://github.com/balupton/Zend-Framework-Mirror.git) PHP · 275 lines

1 <?php

2 /**

3 * Zend Framework

18 * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)

19 * @license http://framework.zend.com/license/new-bsd New BSD License

20 * @version $Id: Repository.php 23484 2010-12-10 03:57:59Z mjh_ca $

21 */

22

24 * @see Zend_Tool_Framework_Provider_Signature

25 */

26 require_once 'Zend/Tool/Framework/Provider/Signature.php';

27

28 /**

29 * @see Zend_Tool_Framework_Registry_EnabledInterface

30 */

31 require_once 'Zend/Tool/Framework/Registry/EnabledInterface.php';

32

33 /**

DBString.php (https://gitlab.com/djpmedia/silverstripe-framework) PHP · 215 lines

1 <?php

2

3 namespace SilverStripe\ORM\FieldType;

82

83 /**

84 * (non-PHPdoc)

85 * @see core/model/fieldtypes/DBField#exists()

86 */

158 '/[^\w_]+$/',

159 '',

160 mb_substr($value, 0, mb_strrpos($value, " "))

161 ) . $add;

162 return $value;

upload.php (https://github.com/holsinger/openfloor.git) PHP · 130 lines

1 <?php

2 /*

3 * FCKeditor - The text editor for Internet - http://www.fckeditor.net

20 * == END LICENSE ==

21 *

22 * This is the "File Uploader" for PHP.

23 */

24

25 require('config.php') ;

26 require('util.php') ;

37 // Check if this uploader has been enabled.

38 if ( !$Config['Enabled'] )

39 SendResults( '1', '', '', 'This file uploader is disabled. Please check the "editor/filemanager/upload/php/config.php" file' ) ;

40

41 // Check if the file has been correctly uploaded.

LoginInstitution.php (https://gitlab.com/abigabaw/dptt) PHP · 202 lines

1 <?php

2

3 namespace common\models;

116 }

117

118 $timestamp = (int) substr($token, strrpos($token, '_') + 1);

119 $expire = Yii::$app->params['user.passwordResetTokenExpire'];

120 return $timestamp + $expire >= time();

buscar_marca_proceso.php (https://github.com/cabenitez/factuweb.git) PHP · 83 lines

6 $consulta = "SELECT grupo.cod_grupo, grupo.descripcion, marca.cod_marca, marca.descripcion FROM marca INNER JOIN grupo ON grupo.cod_grupo = marca.cod_grupo";

7 $consulta2 = " where ";

8 include ("cascada_marcas.php");

9 $pag_consulta = $consulta . " " . "ORDER BY grupo.cod_grupo, marca.cod_marca";

10 //echo $pag_consulta;

15 $estilo_pag_info = "caja"; //OPCIONAL Cadena. Contiene el nombre del estilo CSS para la pagina actual.

16

17 include("paginador.php"); //OBLIGATORIO Incluimos el script de paginaci�n. �ste ya ejecuta la consulta autom�ticamente

18 //---------------------Fin Paginacion------------------------------------------------------------------------------------//

19 if($pag_filas > 0){

70

71 //================================ OBTIENE LA CONSULTA PARA IMPRIMIR ==================================================================================//

72 $posicion_limit = strrpos ($pag_consulta, "limit");

73 $consulta_informe = substr($pag_consulta, 0,$posicion_limit); // obtiene solo la info de la impresora

74 $consulta_informe = ereg_replace("'","@@",$consulta_informe);

File.php (https://github.com/AlinT/socorro.git) PHP · 245 lines

1 <?php defined('SYSPATH') or die('No direct script access.');

2 /**

3 * File-based Cache driver.

4 *

5 * $Id: File.php 3160 2008-07-20 16:03:48Z Shadowhand $

6 *

7 * @package Cache

8 * @author Kohana Team

9 * @copyright (c) 2007-2008 Kohana Team

10 * @license http://kohanaphp.com/license.html

11 */

12 class Cache_File_Driver implements Cache_Driver {

237 {

238 // Get the expiration time

239 $expires = (int) substr($file, strrpos($file, '~') + 1);

240

241 // Expirations of 0 are "never expire"

Yammer.php (https://gitlab.com/alfianfaiz/appstar) PHP · 279 lines

1 <?php

2 /*!

3 * HybridAuth

66 public $curl_ssl_verifypeer = false;

67 public $curl_header = array();

68 public $curl_useragent = "OAuth/2 Simple PHP Client v0.1; HybridAuth http://hybridauth.sourceforge.net/";

69 public $curl_authenticate_method = "POST";

70 public $curl_proxy = null;

161 public function api( $url, $method = "GET", $parameters = array() )

162 {

163 if ( strrpos($url, 'http://') !== 0 && strrpos($url, 'https://') !== 0 ) {

164 $url = $this->api_base_url . $url;

165 }

EntityRepositoryGenerator.php (https://gitlab.com/martinstti/silex-microframework-rest) PHP · 171 lines

1 <?php

2 /*

3 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS

36

37 protected static $_template =

38 '<?php

39

40 <namespace>

76 private function getClassNamespace($fullClassName)

77 {

78 $namespace = substr($fullClassName, 0, strrpos($fullClassName, '\\'));

79

80 return $namespace;

95

96 if ($namespace) {

97 $className = substr($fullClassName, strrpos($fullClassName, '\\') + 1, strlen($fullClassName));

98 }

99

ProjectParser.php (https://github.com/RichardDownes/PHPCodeParser.git) PHP · 198 lines

1 <?php

2 namespace Parser\Impl;

3 /*

17 */

18

19 use Meta\PHPNamespace;

20 use Meta\AbstractPHPStructure;

65 *

66 * @param string $directory The directory to parse

67 * @return \Meta\PHPNamespace[]

68 */

69 public function parse($directory)

106 * Responsible for adding a structure to the correct namespace

107 *

108 * @param \Meta\AbstractPHPStructure $structure The structure to add

109 * @return void

110 */

AbstractClassMetadataFactory.php (https://gitlab.com/remyvianne/krowkaramel) PHP · 246 lines

1 <?php

2 namespace MailPoetVendor\Doctrine\Persistence\Mapping;

3 if (!defined('ABSPATH')) exit;

20 use function str_replace;

21 use function strpos;

22 use function strrpos;

23 use function substr;

24 abstract class AbstractClassMetadataFactory implements ClassMetadataFactory

236 public function resolveClassName(string $className) : string

237 {

238 $pos = strrpos($className, '\\' . Proxy::MARKER . '\\');

239 if ($pos === \false) {

240 return $className;

Autoloader.php (https://github.com/ThaDeanesta/Hydrogen.git) PHP · 120 lines

1 <?php

2 /*

3 * Copyright (c) 2009 - 2011, Frosted Design

11 /**

12 * The Autoloader class extends Hydrogen's class autoloading capabilities to

13 * any other namespace within a PHP app.

14 */

15 class Autoloader {

19

20 /**

21 * Load a specified class from its PHP file. This function should only

22 * ever be called by the PHP autoloading system, and registered through

34 if (isset(static::$namespaces[$rootNamespace])) {

35 $subNamespace = '';

36 if ($lastSlash = strrpos($class, '\\')) {

37 $fileName = substr($class, $lastSlash + 1);

38 if ($firstSlash < $lastSlash) {

Bundle.php (https://gitlab.com/reasonat/test8) PHP · 233 lines

1 <?php

2

3 /*

121 $class = get_class($this);

122

123 return substr($class, 0, strrpos($class, '\\'));

124 }

125

160

161 $name = get_class($this);

162 $pos = strrpos($name, '\\');

163

164 return $this->name = false === $pos ? $name : substr($name, $pos + 1);

186

187 $finder = new Finder();

188 $finder->files()->name('*Command.php')->in($dir);

189

190 $prefix = $this->getNamespace().'\\Command';

EntityRepositoryGenerator.php (https://github.com/maartendekeizer/doctrine2.git) PHP · 83 lines

1 <?php

2 /*

3 * $Id$

25 * Class to generate entity repository classes

26 *

27 * @license http://www.opensource.org/licenses/lgpl-license.php LGPL

28 * @link www.doctrine-project.org

29 * @since 2.0

37 {

38 protected static $_template =

39 '<?php

40

41 namespace <namespace>;

55 public function generateEntityRepositoryClass($fullClassName)

56 {

57 $namespace = substr($fullClassName, 0, strrpos($fullClassName, '\\'));

58 $className = substr($fullClassName, strrpos($fullClassName, '\\') + 1, strlen($fullClassName));

String.class.php (https://github.com/treuter/xp-framework.git) PHP · 344 lines

1 <?php

2 /* This class is part of the XP framework

3 *

15 static function substr($buf, $start, $length) { return mb_substr($buf, $start, $length); }

16 static function pos($buf, $needle, $start) { return mb_strpos($buf, $needle, $start); }

17 static function rpos($buf, $needle) { return mb_strrpos($buf, $needle); }

18 }

19 } else {

23 static function substr($buf, $start, $length) { return iconv_substr($buf, $start, $length); }

24 static function pos($buf, $needle, $start) { return iconv_strpos($buf, $needle, $start); }

25 static function rpos($buf, $needle) { return iconv_strrpos($buf, $needle); }

26 }

27 }

core.php (https://github.com/shafiqissani/Jewelery-Ecommerce-.git) PHP · 90 lines

1 <?php

2 /**

3 * @version $Id: core.php 10381 2008-06-01 03:35:53Z pasamio $

38 /**

39 * Assumes mbstring internal encoding is set to UTF-8

40 * Wrapper around mb_strrpos

41 * Find position of last occurrence of a char in a string

42 * @param string haystack

47 * @subpackage strings

48 */

49 function utf8_strrpos($str, $search, $offset = FALSE){

50 if ( $offset === FALSE ) {

51 # Emulate behaviour of strrpos rather than raising warning

53 return FALSE;

54 }

55 return mb_strrpos($str, $search);

56 } else {

57 if ( !is_int($offset) ) {

Bundle.php (https://github.com/jdewit/symfony.git) PHP · 203 lines

1 <?php

2

3 /*

112 $class = get_class($this);

113

114 return substr($class, 0, strrpos($class, '\\'));

115 }

116

158

159 $name = get_class($this);

160 $pos = strrpos($name, '\\');

161

162 return $this->name = false === $pos ? $name : substr($name, $pos + 1);

180

181 $finder = new Finder();

182 $finder->files()->name('*Command.php')->in($dir);

183

184 $prefix = $this->getNamespace().'\\Command';

Oauth.php (https://github.com/houdunwang/video.git) PHP · 128 lines

1 <?php namespace houdunwang\qq\build;

2 /* PHP SDK

6 */

7

8 //require_once(CLASS_PATH."Recorder.class.php");

9 //require_once(CLASS_PATH."URL.class.php");

10 //require_once(CLASS_PATH."ErrorCase.class.php");

11

12 class Oauth {

79

80 $lpos = strpos( $response, "(" );

81 $rpos = strrpos( $response, ")" );

82 $response = substr( $response, $lpos + 1, $rpos - $lpos - 1 );

83 $msg = json_decode( $response );

Method.php (https://github.com/cosmocommerce/magento-mirror.git) PHP · 187 lines

28 * @see Zend_Reflection_Docblock

29 */

30 #require_once 'Zend/Reflection/Docblock.php';

31

32 /**

33 * @see Zend_Reflection_Parameter

34 */

35 #require_once 'Zend/Reflection/Parameter.php';

36

37 /**

95 throw new Zend_Reflection_Exception('Invalid reflection class provided; must extend Zend_Reflection_Class');

96 }

97 unset($phpReflection);

98 return $zendReflection;

99 }

109 $phpReflections = parent::getParameters();

110 $zendReflections = array();

111 while ($phpReflections && ($phpReflection = array_shift($phpReflections))) {

112 $instance = new $reflectionClass(array($this->getDeclaringClass()->getName(), $this->getName()), $phpReflection->getName());

ClassTools.php (https://gitlab.com/Isaki/le331.fr) PHP · 142 lines

1 <?php

2

3 /**

28 public static function classname($qualifiedName)

29 {

30 if (false !== $pos = strrpos($qualifiedName, '.')) {

31 return substr($qualifiedName, $pos + 1); // start just after '.'

32 } elseif (false !== $pos = strrpos($qualifiedName, '\\')) {

52 * @return string The constructed file path.

53 */

54 public static function getFilePath($path, $classname = null, $extension = '.php')

55 {

56 $path = strtr(ltrim($path, '.'), '.', '/');

70 * @return string The constructed file path.

71 */

72 public static function createFilePath($path, $classname = null, $extension = '.php')

73 {

74 if ($classname !== null) {

loader.php (http://lazycms.googlecode.com/svn/trunk/) PHP · 115 lines

1 <?php

2 /**

3 * +---------------------------------------------------------------------------+

28 define('NO_REDIRECT', true);

29 // ??????

30 include ADMIN_PATH.'/admin.php'; error_reporting(0);

31 // ??????

32 $type = isset($_GET['type']) ? $_GET['type'] : null;

85 if (isset($loads[$js])) {

86 foreach ($loads[$js] as $src) {

87 $index = strrpos($src, '.');

88 $src_min = substr($src, 0, $index).'.min'.substr($src, $index);

89 // min??????

imgupload_helper.php (https://github.com/mwq27/turnerphotography.git) PHP · 125 lines

1 <?php

2

3 function custom_upload($type, $id){

26 // Make sure the fileName is unique but only if chunking is disabled

27 if ($chunks < 2 && file_exists($targetDir . DIRECTORY_SEPARATOR . $fileName)) {

28 $ext = strrpos($fileName, '.');

29 $fileName_a = substr($fileName, 0, $ext);

30 $fileName_b = substr($fileName, $ext);

103 if ($out) {

104 // Read binary input stream and append it to temp file

105 $in = fopen("php://input", "rb");

106

107 if ($in) {

StringUtil.php (https://github.com/fruux/sabre-dav.git) PHP · 91 lines

1 <?php declare (strict_types=1);

2

3 namespace Sabre\DAV;

59 return strpos($haystack, $needle) === 0;

60 case 'ends-with' :

61 return strrpos($haystack, $needle) === strlen($haystack) - strlen($needle);

62 default :

63 throw new Exception\BadRequest('Match-type: ' . $matchType . ' is not supported');

GenericPrefixMap.php (https://gitlab.com/bossagna/meik) PHP · 241 lines

1 <?php

2

3 namespace Drupal\xautoload\ClassFinder;

21 * When looking for a class \Aaa\Bbb\Ccc_Ddd, the class finder will

22 * 1. Determine that this class is within a namespace.

23 * 2. Transform that into "Aaa/Bbb/Ccc/Ddd.php".

24 * 3. Check if the namespace map evaluator has anything registered for

25 * 3.1. "Aaa/Bbb/"

31 * 1. Determine that this class is NOT within a namespace.

32 * 2. Check if a file is explicitly registered for the class itself.

33 * 3. Transform the class name into "Aaa/Bbb/Ccc.php".

34 * 4. Check if the prefix map evaluator has anything registered for

35 * 4.1. "Aaa/Bbb/"

174 }

175

176 $pos = strrpos($logical_base_path, '/', -2);

177 }

178

LexerNeedle.php (https://github.com/bshaffer/ChartDown.git) PHP · 238 lines

1 <?php

2

3 /*

208 public function rtrim($text)

209 {

210 if (strlen($this->text) -1 === ($pos = strrpos($this->text, $text))) {

211 $this->text = substr($this->text, 0, $pos);

212 }

DefaultNamingStrategy.php (https://gitlab.com/mario.uriarte/doctrine2.5-tutorial) PHP · 94 lines

1 <?php

2

3 /*

37 {

38 if (strpos($className, '\\') !== false) {

39 return substr($className, strrpos($className, '\\') + 1);

40 }

41

Delete.php (https://github.com/friendica/friendica.git) PHP · 73 lines

1 <?php

2 /**

3 * @copyright Copyright (C) 2010-2022, the Friendica project

44 // and the last part of it is most likely the GUID.

45 if (strpos($guid, '/')) {

46 $guid = substr($guid, strrpos($guid, '/') + 1);

47 }

48 // Now that we have the GUID, drop those items, which will also delete the

XmlParser.php (https://gitlab.com/thallian/freebsd-roles) PHP · 229 lines

1 <?php

2

3 namespace PicoFeed\Parser;

92 libxml_use_internal_errors(true);

93

94 if (version_compare(PHP_VERSION, '5.4.0', '>=')) {

95 $dom->loadHTML($input, LIBXML_NONET);

96 } else {

154

155 if (strpos($data, '<?xml') !== false) {

156 $data = substr($data, 0, strrpos($data, '?>'));

157 $data = str_replace("'", '"', $data);

158

Attachment.php (https://gitlab.com/3dplex/3d-plex-main-site) PHP · 179 lines

1 <?php

2

3 /*

164 <<<<<<< HEAD

165 $extension = strtolower(substr(

166 $file->getPath(), strrpos($file->getPath(), '.') + 1

167 ));

168 =======

169 $extension = strtolower(substr($file->getPath(), strrpos($file->getPath(), '.') + 1));

170 >>>>>>> update grav cms

171

ViewHelper.php (https://bitbucket.org/yeahyahoo/yeahyahoo.bitbucket.org.git) PHP · 267 lines

1 <?php

2 /**

3 * Zend Framework

20

21 /** Zend_Form_Decorator_Abstract */

22 require_once 'Zend/Form/Decorator/Abstract.php';

23

24 /**

40 * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)

41 * @license http://framework.zend.com/license/new-bsd New BSD License

42 * @version $Id: ViewHelper.php 24873 2012-06-02 02:54:34Z adamlundrigan $

43 */

44 class Zend_Form_Decorator_ViewHelper extends Zend_Form_Decorator_Abstract

91 } else {

92 $type = $element->getType();

93 if ($pos = strrpos($type, '_')) {

94 $type = substr($type, $pos + 1);

95 }

hasone.php (git://github.com/fuel/orm.git) PHP · 238 lines

1 <?php

2 /**

3 * Fuel is a fast, lightweight, community driven PHP 5.4+ framework.

8 * @license MIT License

9 * @copyright 2010 - 2019 Fuel Development Team

10 * @link https://fuelphp.com

11 */

12

74 'join_on' => array(),

75 'columns' => $this->select($alias_to),

76 'rel_name' => strpos($rel_name, '.') ? substr($rel_name, strrpos($rel_name, '.') + 1) : $rel_name,

77 'relation' => $this,

78 'where' => \Arr::get($conditions, 'where', array()),

BasePasswordEncoder.php (https://github.com/Exercise/symfony.git) PHP · 91 lines

1 <?php

2

3 /*

34 $password = $mergedPasswordSalt;

35 $salt = '';

36 $saltBegins = strrpos($mergedPasswordSalt, '{');

37

38 if (false !== $saltBegins && $saltBegins + 1 < strlen($mergedPasswordSalt)) {

58 }

59

60 if (false !== strrpos($salt, '{') || false !== strrpos($salt, '}')) {

61 throw new \InvalidArgumentException('Cannot use { or } in salt.');

62 }

ms-files.php (https://gitlab.com/endomorphosis/reservationtelco) PHP · 83 lines

1 <?php

2 /**

3 * Multisite upload handler.

10

11 define( 'SHORTINIT', true );

12 require_once( dirname( dirname( __FILE__ ) ) . '/wp-load.php' );

13

14 if( !is_multisite() )

37 $mimetype = $mime[ 'type' ];

38 else

39 $mimetype = 'image/' . substr( $_SERVER[ 'REQUEST_URI' ], strrpos( $_SERVER[ 'REQUEST_URI' ], '.' ) + 1 );

40

41 header( 'Content-type: ' . $mimetype ); // always send this

ClassUtils.php (https://gitlab.com/cuza/Clinic_Recods) PHP · 70 lines

1 <?php

2

3 /*

62

63 // fallback in case doctrine common is not installed

64 if (false === $pos = strrpos($class, '\\'.self::MARKER.'\\')) {

65 return $class;

66 }

Config.php (https://gitlab.com/x33n/ImpressPages) PHP · 172 lines

1 <?php

2 /**

3 * @package ImpressPages

38 $this->config['baseUrl'] = $server["HTTP_HOST"];

39

40 $baseUrl = substr($server['SCRIPT_NAME'], 0, strrpos($server['SCRIPT_NAME'], '/') + 1);

41 if (DIRECTORY_SEPARATOR == '/') { // unix system

42 if (strpos($server['REQUEST_URI'], $baseUrl) !== 0) {

43 // show instructions how to set baseUrl manually

44 include __DIR__ . '/Internal/Config/view/couldNotDetectBaseUrl.php';

45 exit();

46 }

48 if (strpos(strtolower($server['REQUEST_URI']), strtolower($baseUrl)) !== 0) {

49 // show instructions how to set baseUrl manually

50 include __DIR__ . '/Internal/Config/view/couldNotDetectBaseUrl.php';

51 exit();

52 }

voucher.php (https://gitlab.com/hazelnuts23/unitedfoodstuff) PHP · 52 lines

1 <?php

2 class ModelTotalVoucher extends Model {

3 public function getTotal(&$total_data, &$total, &$taxes) {

32

33 $start = strpos($order_total['title'], '(') + 1;

34 $end = strrpos($order_total['title'], ')');

35

36 if ($start && $end) {

Extension.php (https://github.com/leerbag/zf2.git) PHP · 251 lines

1 <?php

2 /**

3 * Zend Framework

207

208 if ($file !== null) {

209 $info['extension'] = substr($file['name'], strrpos($file['name'], '.') + 1);

210 } else {

211 $info = pathinfo($value);

Asset.php (https://github.com/jasteele12/concrete5.git) PHP · 425 lines

1 <?php

2 namespace Concrete\Core\Asset;

3

279 public function getAssetURLPath()

280 {

281 return substr($this->getAssetURL(), 0, strrpos($this->getAssetURL(), '/'));

282 }

283

Regex.php (git://pkgs.fedoraproject.org/php-pear-HTML-QuickForm) PHP · 107 lines

1 <?php

2 /* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */

3

5 * Validates values using regular expressions

6 *

7 * PHP versions 4 and 5

8 *

9 * LICENSE: This source file is subject to version 3.01 of the PHP license

10 * that is available through the world-wide-web at the following URI:

11 * http://www.php.net/license/3_01.txt If you did not receive a copy of

12 * the PHP License and are unable to obtain it through the web, please

18 * @copyright 2001-2011 The PHP Group

19 * @license http://www.php.net/license/3_01.txt PHP License 3.01

20 * @version CVS: $Id: Regex.php 317587 2011-10-01 07:55:53Z avb $

GuessContentType.php (https://github.com/bouthors/gallery3-contrib.git) PHP · 97 lines

1 <?php

2

3 /**

89

90 // Just grabbing the extension

91 $extension = substr($fileName,strrpos($fileName,'.')+1);

92 if (isset($this->extensionMap[$extension]))

93 return $this->extensionMap[$extension];

DatabaseMap.php (https://github.com/fzaninotto/Propel2.git) PHP · 211 lines

179 $this->addTableFromMapClass($tmClass);

180

181 return $this->tablesByPhpName[$phpName];

182 }

183

184 if (class_exists($tmClass = substr_replace($phpName, '\\Map\\', strrpos($phpName, '\\'), 1) . 'TableMap')

185 || class_exists($tmClass = '\\Map\\' .$phpName . 'TableMap')) {

186 $this->addTableFromMapClass($tmClass);

187

188 if (isset($this->tablesByPhpName[$phpName])) {

189 return $this->tablesByPhpName[$phpName];

196 }

197

198 throw new TableNotFoundException(sprintf('Cannot fetch TableMap for undefined table phpName: %s.', $phpName));

199 }

200

Cookie.php (https://gitlab.com/link233/bootmw) PHP · 208 lines

1 <?php

2 /**

3 * Cookie for HTTP requests.

118

119 // Don't allow cookies for "co.uk" or "gov.uk", etc, but allow "supermarket.uk"

120 if ( strrpos( $domain, "." ) - strlen( $domain ) == -3 ) {

121 if ( ( count( $dc ) == 2 && strlen( $dc[0] ) <= 2 )

122 || ( count( $dc ) == 3 && strlen( $dc[0] ) == "" && strlen( $dc[1] ) <= 2 ) ) {

plog-comment.php (https://github.com/eatenbyagrue/Rebuilding-Together.git) PHP · 156 lines

1 <?php

2 /* Plogger comment script: writes comment information to the database and links it to the picture using the pictures ID */

3

4 include_once(dirname(__FILE__).'/plog-load-config.php');

5

6 // Remove plog-comment from the end, if present .. is there a better way to determine the full url?

7 // Workaround for never-ending comment loop

8 $is_comment = strpos($config['baseurl'], 'plog-comment.php');

9 if ($is_comment !== false) {

10 $config['baseurl'] = substr($config['baseurl'], 0, $is_comment);

25 // Based on the is_email function from WordPress with some additional checks

26 // Check that there is an @, a dot, no double dots, does not start with a dot, or have a dot next to the @ symbol

27 if (strpos($email, '@') !== false && strpos($email, '.') !== false && strpos($email, '..') === false && $email[0] != '.' && $email[strrpos($email, '@')-1] != '.') {

28 // check for the correct syntax

29 if (preg_match("/^([a-z0-9+_]|\\-|\\.)+@(([a-z0-9_]|\\-)+\\.)+[a-z]{2,}\$/i", $email)) {

DataPart.php (https://gitlab.com/hoangduys4k5/laravelproject) PHP · 173 lines

1 <?php

2

3 /*

55 {

56 if (null === $contentType) {

57 $ext = strtolower(substr($path, strrpos($path, '.') + 1));

58 if (null === self::$mimeTypes) {

59 self::$mimeTypes = new MimeTypes();

fortune.php (https://github.com/Excito/horde3.git) PHP · 139 lines

1 <?php

2

3 /* Disable block if not configured. */

8

9 /**

10 * $Horde: horde/lib/Block/fortune.php,v 1.14.10.4 2007/12/20 15:01:35 jan Exp $

11 *

12 * @package Horde_Block

81 if (!$status) {

82 for ($i = 1; $i < count($output); $i++) {

83 $fortune = substr($output[$i], strrpos($output[$i], ' ') + 1);

84 if (isset($descriptions[$fortune])) {

85 $values[$fortune] = $descriptions[$fortune];

120 global $conf;

121

122 require_once 'Horde/Text/Filter.php';

123

124 if (isset($conf['fortune']['exec_path']) &&

TestListener.php (https://gitlab.com/Pasantias/pasantiasASLG) PHP · 154 lines

15 * @author Nicolas Grekas <p@tchwork.com>

16 */

17 class TestListener extends \PHPUnit_Framework_TestSuite implements \PHPUnit_Framework_TestListener

18 {

19 public static $enabledPolyfills;

95 }

96 if (!$warnings && null === $defLine) {

97 $warnings[] = new \PHPUnit_Framework_SkippedTestCase('No Polyfills found in bootstrap.php for '.$testClass);

98 } else {

99 $mainSuite->addTest(new static($suite));

124 }

125

126 public function addFailure(\PHPUnit_Framework_Test $test, \PHPUnit_Framework_AssertionFailedError $e, $time)

127 {

128 $this->addError($test, $e, $time);

Psr4Autoloader.php (https://github.com/markn86/moodle.git) PHP · 148 lines

1 <?php

2

3 namespace Box\Spout\Autoloader;

5 /**

6 * Class Psr4Autoloader

7 * @see https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-4-autoloader-examples.md#class-example

8 */

9 class Psr4Autoloader

73 // work backwards through the namespace names of the fully-qualified

74 // class name to find a mapped file name

75 while (($pos = \strrpos($prefix, '\\')) !== false) {

76 // retain the trailing namespace separator in the prefix

77 $prefix = \substr($class, 0, $pos + 1);

87

88 // remove the trailing namespace separator for the next iteration

89 // of strrpos()

90 $prefix = \rtrim($prefix, '\\');

91 }

Files.php (https://github.com/strogo/Newscoop.git) PHP · 215 lines

1 <?php

2 /**

3 * File Utilities.

4 * @author $Author: paul $

5 * @version $Id: Files.php 5087 2006-06-01 21:54:08Z paul $

6 * @package ImageManager

7 */

15 * File Utilities

16 * @author $Author: paul $

17 * @version $Id: Files.php 5087 2006-06-01 21:54:08Z paul $

18 * @package ImageManager

19 * @subpackage files

47 if($unique)

48 {

49 $dotIndex = strrpos($destination_file, '.');

50 $ext = '';

51 if(is_int($dotIndex))

ip_handling_include.php (https://github.com/necrophcodr/Muks.git) PHP · 72 lines

1 <?php

2 /*-------------------------------------------------------+

3 | PHP-Fusion Content Management System

4 | Copyright (C) 2002 - 2011 Nick Jones

5 | http://www.php-fusion.co.uk/

6 +--------------------------------------------------------+

7 | Filename: ip_handling_include.php

43 // Mixed IPv4 and IPv6

44 define("USER_IP_TYPE", 5);

45 $last_pos = strrpos(FUSION_IP, ":");

46 $ipv4 = substr(FUSION_IP, $last_pos+1);

47 $ipv6 = substr(FUSION_IP, 0, $last_pos);

functions_bmz_image_handler.php (https://github.com/happyxlq/lt_svn.git) PHP · 98 lines

1 <?php

2 /**

3 * functions_bmz_image_handler.php

8 * @copyright Copyright 2005-2006 breakmyzencart.com

9 * @license http://www.gnu.org/licenses/gpl.txt GNU General Public License V2.0

10 * @version $Id: functions_bmz_image_handler.php,v 1.7 2006/05/01 12:20:02 tim Exp $

11 */

12

13 require_once(DIR_FS_CATALOG . DIR_WS_CLASSES . 'bmz_image_handler.class.php');

14 $ihConf['version'] = '2.0';

15

63 } else {

64 // default to standard Zen-Cart fallback behavior for large -> medium -> small images

65 $image_ext = substr($src, strrpos($src, '.'));

66 $image_base = substr($src, strlen(DIR_WS_IMAGES), -strlen($image_ext));

67 if (strrpos($src, IMAGE_SUFFIX_LARGE) && !is_file(DIR_FS_CATALOG . $src)) {

String.php (https://github.com/willvdmerwe/PHPFrame.git) PHP · 206 lines

1 <?php

2 /**

3 * PHPFrame/Base/String.php

4 *

5 * PHP version 5

6 *

7 * @category PHPFrame

8 * @package Base

9 * @author Lupo Montero <lupo@e-noise.com>

11 * @license http://www.opensource.org/licenses/bsd-license.php New BSD License

12 * @link http://github.com/PHPFrame/PHPFrame

13 */

14

22 * @license http://www.opensource.org/licenses/bsd-license.php New BSD License

23 * @link http://github.com/PHPFrame/PHPFrame

24 * @since 1.0

25 */

CCodeFile.php (https://bitbucket.org/kananina/testsite2.git) PHP · 135 lines

1 <?php

2 /**

3 * CCodeFile class file.

13 *

14 * @property string $relativePath The code file path relative to the application base path.

15 * @property string $type The code file extension (e.g. php, txt).

16 *

17 * @author Qiang Xue <qiang.xue@gmail.com>

18 * @version $Id: CCodeFile.php 3426 2011-10-25 00:01:09Z alexander.makarow $

19 * @package system.gii

20 * @since 1.1.2

124

125 /**

126 * @return string the code file extension (e.g. php, txt)

127 */

128 public function getType()

ClassTools.php (https://bitbucket.org/ferOnti/processmaker.git) PHP · 107 lines

1 <?php

2 /*

3 * $Id: ClassTools.php 536 2007-01-10 14:30:38Z heltem $

17 * This software consists of voluntary contributions made by many individuals

18 * and is licensed under the LGPL. For more information please see

19 * <http://propel.phpdb.org>.

20 */

21

37 public static function classname($qualifiedName)

38 {

39 $pos = strrpos($qualifiedName, '.');

40 if ($pos === false) {

41 return $qualifiedName; // there is no '.' in the qualifed name

56 * @return string

57 */

58 public static function getFilePath($path, $classname = null, $extension = '.php')

59 {

60 $path = strtr(ltrim($path, '.'), '.', '/');

SourceContextProvider.php (https://github.com/pulzarraider/symfony.git) PHP · 126 lines

1 <?php

2

3 /*

91 if (false === $name) {

92 $name = str_replace('\\', '/', $file);

93 $name = substr($name, strrpos($name, '/') + 1);

94 }

95

cite.inc.php (https://gitlab.com/mucill/majalengka) PHP · 88 lines

1 <?php

2 /**

3 *

37 $cite_style = strtolower(trim($_GET['style']));

38 }

39 $cite_style_template = SB.'template'.DS.'citation'.DS.$cite_style.'_style_template.php';

40 if (!file_exists($cite_style_template)) {

41 exit(__('Sorry, no cite template available.'));

43 */

44

45 require SIMBIO.'simbio_FILE/simbio_directory.inc.php';

46 $dir = new simbio_directory(SB.'template'.DS.$sysconf['template']['theme'].DS.'citation');

47 $style_files = $dir->getFileList();

61 // invert first author name if it is not inverted

62 if ($a == 0 && stripos($auth['author_name'], ',', 2) === false) {

63 $last_name = strrpos($auth['author_name'], ' ') + 1;

64 $name = substr($auth['author_name'], $last_name);

65 die($name);

Abstract.php (https://gitlab.com/LisovyiEvhenii/ismextensions) PHP · 87 lines

1 <?php

2 /**

3 * Magento

8 * that is bundled with this package in the file LICENSE.txt.

9 * It is also available through the world-wide-web at this URL:

10 * http://opensource.org/licenses/osl-3.0.php

11 * If you did not receive a copy of the license and are unable to

12 * obtain it through the world-wide-web, please send an email

22 * @package Mage_Archive

23 * @copyright Copyright (c) 2006-2016 X.commerce, Inc. and affiliates (http://www.magento.com)

24 * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)

25 */

26

81 $file = str_replace(dirname($source) . DS, '', $source);

82 if (!$withExtension) {

83 $file = substr($file, 0, strrpos($file, '.'));

84 }

85 return $file;

FileManager.php (https://gitlab.com/Spilky/diplomova_prace) PHP · 120 lines

1 <?php

2

3 namespace App\Model\Service;

99 private function generateName(FileUpload $file)

100 {

101 $fileExt = strtolower(mb_substr($file->getSanitizedName(), strrpos($file->getSanitizedName(), ".")));

102

103 do {

Libupload.php (https://github.com/ekoisa/pyrocms-shop.git) PHP · 256 lines

1 <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

2 /**

3 * Name: Libupload

203 function getExtension($str) {

204

205 $i = strrpos($str,".");

206 if (!$i) { return ""; }

207

Locale.php (https://bitbucket.org/cryofrost/portal.git) PHP · 208 lines

1 <?php

2

3 /*

200 }

201

202 if (false === $pos = strrpos($locale, '_')) {

203 return self::getDefault();

204 }