100+ results for 'php strstr'

Not the results you expected?

Editor.php (https://github.com/lazenge/zf2.git) PHP · 601 lines

1 <?php

2 /**

3 * Zend Framework

481 {

482 $stylesheets = $this->getStyleSheets();

483 if (strstr($stylesheets, ';')) {

484 $stylesheets = explode(';', $stylesheets);

485 } elseif (!empty($stylesheets)) {

ResponseHeader.php (https://github.com/Shreef/zf2.git) PHP · 395 lines

1 <?php

2 /**

3 * Zend Framework

15 * @category Zend

16 * @package Zend_Test

17 * @subpackage PHPUnit

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

23 * @namespace

24 */

25 namespace Zend\Test\PHPUnit\Constraint;

26 use Zend\Controller\Response;

27

28 /**

29 * Response header PHPUnit Constraint

30 *

31 * @uses PHPUnit_Framework_Constraint

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

30 * @uses \Zend\CodeGenerator\Php\Exception

31 * @uses \Zend\CodeGenerator\Php\PhpMember\MemberContainer

32 * @uses \Zend\CodeGenerator\Php\PhpMethod

147 * setPhpFile()

148 *

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

150 */

151 public function setPhpFile(PhpFile $phpFile)

331 * setProperty()

332 *

333 * @param array|\Zend\CodeGenerator\Php\PhpProperty $property

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

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

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

560 }

561

module.audio-video.nsv.php (https://github.com/robertleeplummerjr/bluebox.git) PHP · 224 lines

1 <?php

2 /////////////////////////////////////////////////////////////////

3 /// getID3() by James Heinrich <info@getid3.org> //

8 /////////////////////////////////////////////////////////////////

9 // //

10 // module.audio.nsv.php //

11 // module for analyzing Nullsoft NSV files //

12 // dependencies: NONE //

189 $CommentPairArray = explode("\x01".' ', $ThisFileInfo['nsv']['NSVf']['metadata']);

190 foreach ($CommentPairArray as $CommentPair) {

191 if (strstr($CommentPair, '='."\x01")) {

192 list($key, $value) = explode('='."\x01", $CommentPair, 2);

193 $ThisFileInfo['nsv']['comments'][strtolower($key)][] = trim(str_replace("\x01", '', $value));

global_functions.php (https://github.com/jcohenho/OLLCF-SRS.git) PHP · 184 lines

1 <?php

2

3 function dbConnect(){

114

115 // get the next whole word of the right length in the file

116 while (strlen($word)< $min_length || strlen($word)>$max_length || strstr($word, "'"))

117 {

118 if (feof($fp))

170 {

171 $email = mysql_result($result, 0, 'email');

172 $from = "From: support@phpbookmark \r\n";

173 $mesg = "Your PHPBookmark password has been changed to $password \r\n"

175

176

177 if (mail($email, 'PHPBookmark login information', $mesg, $from))

178 return true;

179 else

BrowserCache.php (https://github.com/sharpmachine/wakeupmedia.com.git) PHP · 332 lines

1 <?php

2

3 /**

8 }

9

10 require_once W3TC_LIB_W3_DIR . '/Plugin.php';

11

12 /**

161 if (in_array($extension, $extensions)) {

162 $url = w3_remove_query($url);

163 $url .= (strstr($url, '?') !== false ? '&amp;' : '?') . $id;

164

165 return sprintf('%s="%s"', $attr, $url);

259 */

260 function _get_cssjs_types() {

261 $mime_types = include W3TC_INC_DIR . '/mime/cssjs.php';

262

263 return $mime_types;

class-lp-breadcrumb.php (https://gitlab.com/gregtyka/lfmawordpress) PHP · 354 lines

1 <?php

2

3 if ( !defined( 'ABSPATH' ) ) {

106

107 // If permalinks contain the courses page in the URI prepend the breadcrumb with courses

108 if ( $courses_page_id && $courses_page /*&& strstr( $permalinks['lp_course_base'], '/' . $courses_page->post_name )*/ && get_option( 'page_on_front' ) != $courses_page_id ) {

109 $this->add_crumb( get_the_title( $courses_page ), get_permalink( $courses_page ) );

110 }

actions.php (https://gitlab.com/Ltaimao/wecenter) PHP · 544 lines

1 <?php

2 /*

3 +--------------------------------------------------------------------------

354 $associate_action = ACTION_LOG::ADD_QUESTION;

355

356 if (strstr($actions, ','))

357 {

358 $associate_action = explode(',', $actions);

network-simulator.php (https://gitlab.com/brian0218/rk3066_r-box_android4.2.2_sdk) PHP · 186 lines

1 <?php

2 require_once 'portabilityLayer.php';

68 } else {

69 // A little securuty checking can't hurt.

70 if (strstr($path, ".."))

71 exit;

72

reader.php (https://bitbucket.org/crevillo/enetcall.git) PHP · 279 lines

1 <?php

2 /**

3 * File containing the ezcDbSchemaMysqlReader class.

10

11 /**

12 * Handler for files containing PHP arrays that represent DB schema.

13 *

14 * @package DatabaseSchema

133

134 $fieldAutoIncrement = false;

135 if ( strstr ( $row['extra'], 'auto_increment' ) !== false )

136 {

137 $fieldAutoIncrement = true;

FormCheckbox.php (https://github.com/MontmereLimited/ZendFramework-v1.git) PHP · 163 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: FormCheckbox.php 23775 2011-03-01 17:25:24Z ralph $

21 */

22

25 * Abstract class for extension

26 */

27 // // // // // // // // require_once 'Zend/View/Helper/FormElement.php';

28

29

90 // build the element

91 $xhtml = '';

92 if (!$disable && !strstr($name, '[]')) {

93 $xhtml = $this->_hidden($name, $checkedOptions['uncheckedValue']);

94 }

FormCheckbox.php (https://github.com/ftaiolivista/Zend-Framework-Namespaced-.git) PHP · 167 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: FormCheckbox.php 20096 2010-01-06 02:05:09Z bkarwin $

21 */

22

29 * Abstract class for extension

30 */

31 require_once 'Zend/View/Helper/FormElement.php';

32

33

94 // build the element

95 $xhtml = '';

96 if (!$disable && !strstr($name, '[]')) {

97 $xhtml = $this->_hidden($name, $checkedOptions['uncheckedValue']);

98 }

Main.java (https://gitlab.com/brian0218/rk3288_r-box_android4.4.2_sdk) Java · 269 lines

213

214 static void testMulti() {

215 Object strStrStrArray;

216 int[] dimensions = { 1, 2, 3 };

217

218 strStrStrArray = Array.newInstance(String.class, dimensions);

219 String[][][] array3 = (String[][][]) strStrStrArray;

230

231 try {

232 String[][] array2 = (String[][]) strStrStrArray;

233 throw new RuntimeException("expecting bad cast");

234 }

244

245 int[] dimensions2 = { 1, 2 };

246 strStrStrArray = Array.newInstance(String[].class, dimensions2);

247 array3 = (String[][][]) strStrStrArray;

Getopt.php (https://gitlab.com/ealexis.t/trends) PHP · 163 lines

1 <?php

2 /*

3 * This file is part of PHPUnit.

4 *

5 * (c) Sebastian Bergmann <sebastian@phpunit.de>

6 *

7 * For the full copyright and license information, please view the LICENSE

14 * @since Class available since Release 3.0.0

15 */

16 class PHPUnit_Util_Getopt

17 {

18 public static function getopt(array $args, $short_options, $long_options = null)

78 $opt_arg = null;

79

80 if (($spec = strstr($short_options, $opt)) === false ||

81 $arg[$i] == ':') {

82 throw new PHPUnit_Framework_Exception(

FilesSizeTest.php (https://github.com/WebTricks/WebTricks-CMS.git) PHP · 235 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: FilesSizeTest.php 20454 2010-01-20 22:50:59Z thomas $

21 */

22

23 // Call Zend_Validate_File_FilesSizeTest::main() if this source file is executed directly.

24 if (!defined("PHPUnit_MAIN_METHOD")) {

25 define("PHPUnit_MAIN_METHOD", "Zend_Validate_File_FilesSizeTest::main");

29 * Test helper

30 */

31 require_once dirname(__FILE__) . '/../../../TestHelper.php';

32

33 /**

Query.php (https://bitbucket.org/khuongduybui/openfisma.git) PHP · 314 lines

1 <?php

2 /**

3 * Zend Framework

23 * @see Zend_Dom_Query_Css2Xpath

24 */

25 // require_once 'Zend/Dom/Query/Css2Xpath.php';

26

27 /**

28 * @see Zend_Dom_Query_Result

29 */

30 // require_once 'Zend/Dom/Query/Result.php';

31

32 /**

127 return $this->setDocumentXml($document, $encoding);

128 }

129 if (strstr($document, 'DTD XHTML')) {

130 return $this->setDocumentXhtml($document, $encoding);

131 }

function.html_image.php (https://gitlab.com/florianocomercial/centreon) PHP · 142 lines

1 <?php

2 /**

3 * Smarty plugin

24 * Examples: {html_image file="/images/masthead.gif"}

25 * Output: <img src="/images/masthead.gif" width=400 height=23>

26 * @link http://smarty.php.net/manual/en/language.function.html.image.php {html_image}

27 * (Smarty online manual)

28 * @author Monte Ohrt <monte at ohrt dot com>

110 if ($smarty->security &&

111 ($_params = array('resource_type' => 'file', 'resource_name' => $_image_path)) &&

112 (require_once(SMARTY_CORE_DIR . 'core.is_secure.php')) &&

113 (!smarty_core_is_secure($_params, $smarty)) ) {

114 $smarty->trigger_error("html_image: (secure) '$_image_path' not in secure directory", E_USER_NOTICE);

125

126 if(isset($params['dpi'])) {

127 if(strstr($server_vars['HTTP_USER_AGENT'], 'Mac')) {

128 $dpi_default = 72;

129 } else {

jwc.php (https://github.com/hit-moodle/moodle-enrol_jwc.git) PHP · 182 lines

1 <?php

2

3 class jwc_helper {

124 if ($ret) {

125 // 是否出错

126 if (!strstr(strip_tags($ret), 'success')) {

127 $return_msg = trim(strip_tags($ret));

128 $ret = false;

159 $url = $url_base.'?'.$param;

160

161 require_once("$CFG->libdir/filelib.php");

162 return download_file_content($url);

163 }

InspectorTest.php (https://gitlab.com/mohamed_hussein/prodt) PHP · 267 lines

1 <?php

2

3 /**

8 namespace Drupal\Tests\Component\Assertion;

9

10 use PHPUnit\Framework\TestCase;

11 use Drupal\Component\Assertion\Inspector;

12

195

196 /**

197 * Tests asserting strstr() or stristr() match.

198 *

199 * @covers ::assertAllMatch

op-awardbydate_test.php (https://github.com/micheleberg/Calontir-OP.git) PHP · 224 lines

1 <?php

2

3 if ( $submit == "clear" )

20 {

21 $line = fgets($file, 1024);

22 if ( strstr($line, "insert content here") )

23 {

24 break;

44 print("<TD VALIGN=top>\n");

45

46 print("<FORM METHOD=post ACTION='op-awardbydate_test.php'>\n");

47

48 print("<TABLE CELLPADDING=2 CELLSPACING=1 BORDER=0>\n");

188 $popReason = mysql_result($awardRS,$i,"Reason");

189

190 echo "<TD WIDTH=250><SPAN STYLE=\"font-weight: bold;\"><A HREF=\"op-name.php?passName=$popName\">$popName</SPAN>\n";

191

192 echo "<TD WIDTH=250>$popReason</TD>\n";

create.class.php (https://github.com/enigmatic-user/revolution.git) PHP · 205 lines

1 <?php

2 require_once (dirname(__DIR__).'/create.class.php');

65 $outputProperties = array();

66 foreach ($properties as $key => $value) {

67 $res = strstr($key,'prop_');

68 if ($res !== false) {

69 $outputProperties[str_replace('prop_','',$key)] = $value;

82 $inputProperties = array();

83 foreach ($properties as $key => $value) {

84 $res = strstr($key,'inopt_');

85 if ($res !== false) {

86 $inputProperties[str_replace('inopt_','',$key)] = $value;

MapperDbTable.php (https://github.com/ArchiCroc/Tower-Web-Platform.git) PHP · 156 lines

1 <?php

2

3 /*

4 * ApikeyMapperDbTable.php

5 *

6 * Copyright (c) 2011 Matthew Doll <mdoll at homenet.me>.

22 */

23

24 require_once "MapperInterface.php";

25

26 /**

114 $row->save();

115 } catch (Exception $e) {

116 if (strstr($e->getMessage(), '1062 Duplicate')) {

117 throw new DuplicateEntryException("URL Already Exists");

118 } elseif (strstr($e->getMessage(), '1048 Column')) {

OneToManySelfReferentialAssociationTest.php (https://github.com/jaikdean/doctrine2.git) PHP · 127 lines

1 <?php

2

3 declare(strict_types=1);

8 use Doctrine\Tests\Models\ECommerce\ECommerceCategory;

9 use Doctrine\Tests\OrmFunctionalTestCase;

10 use function strstr;

11

12 /**

28 $this->firstChild->setName('Java books');

29 $this->secondChild = new ECommerceCategory();

30 $this->secondChild->setName('Php books');

31 }

32

85 self::assertInstanceOf(ECommerceCategory::class, $children[0]);

86 self::assertSame($parent, $children[0]->getParent());

87 self::assertEquals(' books', strstr($children[0]->getName(), ' books'));

88 self::assertInstanceOf(ECommerceCategory::class, $children[1]);

89 self::assertSame($parent, $children[1]->getParent());

eina_test_strbuf.c (https://github.com/kakaroto/e17.git) C · 449 lines

404 Eina_Strbuf *buf;

405 const size_t runs = 40960;

406 const char target_pattern[] = "strsstrstring";

407 const char *str;

408 size_t i, target_pattern_size;

Json.php (https://github.com/komola/ZendFramework.git) PHP · 240 lines

1 <?php

2 /**

3 * Zend Framework

23 * @see Zend_Config

24 */

25 require_once 'Zend/Config.php';

26

27 /**

28 * @see Zend_Json

29 */

30 require_once 'Zend/Json.php';

31

32 /**

83 {

84 if (empty($json)) {

85 require_once 'Zend/Config/Exception.php';

86 throw new Zend_Config_Exception('Filename is not set');

87 }

replaceHyphens.php (https://github.com/clyfe/DEXonline.git) PHP · 132 lines

1 <?php

2

3 require_once '../../phplib/util.php';

4

5 define("MAX_LEN", 40); // Ignore suffixes after this length

82 } else {

83 $newRep .= $chunk;

84 print "***** http://dexonline.ro/search.php?cuv={$lexem->unaccented} *****\n";

85 print "{$rep}\n";

86 print " * Nu știu ce să fac cu [{$chunk}] la poziția {$i}, lexem {$lexem->form}, model {$lexem->modelType}{$lexem->modelNumber}{$lexem->restriction}\n";

114 $suffix = text_unicodeToLower($suffix);

115 $suffixExpl = str_replace($GLOBALS['text_accented'], $GLOBALS['text_explicitAccent'], $suffix);

116 $formHasAccent = (strstr($form, "'") !== false);

117 $suffixHasAccent = (strstr($suffixExpl, "'") !== false);

create.class.php (https://github.com/Mark-H/revolution.git) PHP · 214 lines

1 <?php

2 /*

3 * This file is part of MODX Revolution.

9 */

10

11 require_once (dirname(__DIR__).'/create.class.php');

12 /**

13 * Create a Template Variable.

74 $outputProperties = array();

75 foreach ($properties as $key => $value) {

76 $res = strstr($key,'prop_');

77 if ($res !== false) {

78 $outputProperties[str_replace('prop_','',$key)] = $value;

91 $inputProperties = array();

92 foreach ($properties as $key => $value) {

93 $res = strstr($key,'inopt_');

94 if ($res !== false) {

95 $inputProperties[str_replace('inopt_','',$key)] = $value;

FormElement.php (https://github.com/massiveart/ZF-ZOOLU.git) PHP · 204 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: FormElement.php 20096 2010-01-06 02:05:09Z bkarwin $

21 */

22

24 * @see Zend_View_Helper_HtmlElement

25 */

26 require_once 'Zend/View/Helper/HtmlElement.php';

27

28 /**

67 $this->_translator = $translator->getAdapter();

68 } else {

69 require_once 'Zend/View/Exception.php';

70 $e = new Zend_View_Exception('Invalid translator specified');

71 $e->setView($this->view);

ModifyInf.c (https://gitlab.com/envieidoc/Clover) C · 339 lines

5 are licensed and made available under the terms and conditions of the BSD License

6 which accompanies this distribution. The full text of the license may be found at

7 http://opensource.org/licenses/bsd-license.php

8

9 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,

173 //

174 if (*Pattern == '-') {

175 if (strstr (Line, Pattern + 1)) {

176 return 0;

177 } else {

204 // Apply patterns

205 //

206 Pattern1 = strstr (Pattern, "==");

207 Pattern2 = strstr (Pattern, "+=");

213 if (!strncmp (Line, Pattern, Pattern1 - Pattern)) {

214 Pattern1 += 2;

215 Ptr = strstr (Line, "=");

216 if (!Ptr) {

217 return -1;

TestCase.php (https://github.com/asakusuma/sugarcrm_dev.git) PHP · 217 lines

46 */

47

48 require_once 'PHPUnit/Extensions/Story/Scenario.php';

49 require_once 'PHPUnit/Framework.php';

50 require_once 'PHPUnit/Util/Filter.php';

51

52 PHPUnit_Util_Filter::addFileToFilter(__FILE__, 'PHPUNIT');

53

54 /**

60 * @author Sebastian Bergmann <sb@sebastian-bergmann.de>

61 * @copyright 2002-2009 Sebastian Bergmann <sb@sebastian-bergmann.de>

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

63 * @version Release: 3.3.17

64 * @link http://www.phpunit.de/

66 * @abstract

67 */

68 abstract class PHPUnit_Extensions_Story_TestCase extends PHPUnit_Framework_TestCase

69 {

70 /**

Query.php (https://github.com/solomonjames/Trove-ComicMashup.git) PHP · 314 lines

1 <?php

2 /**

3 * Zend Framework

23 * @see Zend_Dom_Query_Css2Xpath

24 */

25 require_once 'Zend/Dom/Query/Css2Xpath.php';

26

27 /**

28 * @see Zend_Dom_Query_Result

29 */

30 require_once 'Zend/Dom/Query/Result.php';

31

32 /**

127 return $this->setDocumentXml($document, $encoding);

128 }

129 if (strstr($document, 'DTD XHTML')) {

130 return $this->setDocumentXhtml($document, $encoding);

131 }

actions.class.php (https://github.com/eMerzh/Darwin.git) PHP · 178 lines

1 <?php

2

3 /**

7 * @subpackage mineralogy

8 * @author DB team <darwin-ict@naturalsciences.be>

9 * @version SVN: $Id: actions.class.php 12479 2008-10-31 10:54:40Z fabien $

10 */

11 class mineralogyActions extends DarwinActions

15 public function preExecute()

16 {

17 if (! strstr('view',$this->getActionName()) && ! strstr('index',$this->getActionName()) && ! strstr('searchForLimited',$this->getActionName()) && ! strstr('search',$this->getActionName()) )

18 {

19 if(! $this->getUser()->isAtLeast(Users::ENCODER))

KDLMediaInfoLoader.php (https://github.com/richhl/kalturaCE.git) PHP · 241 lines

1 <?php

2 include_once("StringTokenizer.php");

3 include_once("KDLMediaDataSet.php");

4 include_once 'KDLUtils.php';

35 $sectionID = 0;

36

37 if(strstr($tok,"general")==true)

38 $section = "general";

39 else if(strstr($tok,KDLConstants::VideoIndex)==true)

40 $section = KDLConstants::VideoIndex;

41 else if(strstr($tok,KDLConstants::AudioIndex)==true)

42 $section = KDLConstants::AudioIndex;

43 else if(strstr($tok,KDLConstants::ImageIndex)==true)

freshcomments.plugin.php (https://github.com/somefool/habari-extras.git) PHP · 200 lines

1 <?php

2 /**

3 * Fresh Comments

67 public function validate_uint( $value )

68 {

69 if ( !ctype_digit( $value ) || strstr( $value, '.' ) || $value < 0 ) {

70 return array( _t( 'This field must be positive integer.', 'freshcomments' ) );

71 }

189 $this->cache_name = Site::get_url( 'habari', true ) . 'freshcomments';

190 $this->load_text_domain( 'freshcomments' );

191 $this->add_template( 'block.freshcomments', dirname( __FILE__ ) . '/block.freshcomments.php' );

192 }

193

router_config.php (https://github.com/ameximes/akelos.git) PHP · 106 lines

1 <?php

2

3 # This file is part of the Akelos Framework

39 && $_SERVER['REDIRECT_STATUS'] == 200

40 && isset($_SERVER['REDIRECT_QUERY_STRING'])

41 && strstr($_SERVER['REDIRECT_QUERY_STRING'],'ak=')){

42

43 if(strstr($_SERVER['REDIRECT_QUERY_STRING'],'&')){

85 }elseif (isset($_SERVER['REDIRECT_URL']) && $_SERVER['REDIRECT_URL'] == '/' && isset($_SERVER['REDIRECT_STATUS']) && $_SERVER['REDIRECT_STATUS'] == 200){

86 $url_rewrite_test_url = AK_URL.'mod_rewrite_test';

87 if(!empty($_SERVER['PHP_AUTH_USER']) && !empty($_SERVER['PHP_AUTH_PW'])){

88 $url_rewrite_test_url = AK_PROTOCOL.$_SERVER['PHP_AUTH_USER'].':'.$_SERVER['PHP_AUTH_PW'].'@'.AK_HOST.'/mod_rewrite_test';

94 register_shutdown_function(create_function('',"AkFileSystem::file_put_contents(AkConfig::getDir('config').DS.'config.php',

95 str_replace('<?php\n','<?php\n\n$AK_URL_REWRITE_ENABLED',AkFileSystem::file_get_contents(AkConfig::getDir('config').DS.'config.php')));"));

96 }

97

test_logging.c (https://gitlab.com/athena_tor/tor) C · 173 lines

112 tt_int_op(smartlist_len(lines), OP_GE, 5);

113

114 if (strstr(smartlist_get(lines, 0), "opening new log file"))

115 smartlist_del_keeporder(lines, 0);

116 tt_assert(strstr(smartlist_get(lines, 0), "Say, this isn't too cool"));

Moneybookers.php (https://github.com/craig1709/mis.git) PHP · 196 lines

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

2 /**

3 * MoneyBookers Payment Driver

4 *

5 * $Id: MoneyBookers.php

6 *

7 * @package Payment

8 * @author Josh Domagala

9 * @copyright (c) 2008 Kohana Team

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

11 */

12 class Payment_Moneybookers_Driver implements Payment_Driver

181 if($this->fields['action'] == "status_od")

182 {

183 return (strstr($response, "Status: 0")) ? true : false;

184 }

185

page_data_model.php (https://bitbucket.org/chiamingyen/cmsimple-and-plugins.git) PHP · 304 lines

1 <?php

2 /* utf8-marker = äöüß */

3 /**

10 * @author Martin Damken

11 * @link http://www.zeichenkombinat.de

12 * @version $Id: page_data_model.php 250 2012-08-13 10:47:40Z cmb69 $

13 * @package pluginloader

14 * @subpackage page_data

122 $results = array();

123 foreach($this->data as $id => $page){

124 if(strstr($page[$field],$value)){

125 $results[$id] = $page;

126 }

271 }

272

273 $data_string = "<?php \n";

274 $data_string.= "/* utf8-marker = äöüß */ \n";

275 $data_string .= "################## Data fields ############\n";

tag_list.php (https://github.com/akelos/acts-as-taggable.git) PHP · 248 lines

1 <?php

2

3 class TagList extends AkObject

72

73 function _sanitizeTagName($tag) {

74 if (strstr($tag,$this->_separator) && !preg_match('/^".*?"$/',$tag)) {

75 $tag = '"'.str_replace('"','\"',$tag).'"';

76 }

Yaml.php (https://bitbucket.org/Yuri_m/clean-zfext-by-yuri-git.git) PHP · 162 lines

1 <?php

2

3 /**

141 {

142 foreach (self::_getConstants() as $constant) {

143 if (strstr($value, $constant)) {

144 $value = str_replace($constant, constant($constant), $value);

145 }

AppInfo.php (https://github.com/kronda/kronda.git) PHP · 237 lines

1 <?php

2

3 /**

62

63 // The $host parameter is sort of internal. We don't include it in the param list because

64 // we don't want it to be included in the documentation. Use PHP arg list hacks to get at

65 // it.

66 $host = null;

77 /**

78 * Loads a JSON file containing information about your app. At a minimum, the file must include

79 * the "key" and "secret" fields. Run 'php authorize.php' in the examples directory

80 * for details about what this file should look like.

81 *

95 /**

96 * Loads a JSON file containing information about your app. At a minimum, the file must include

97 * the "key" and "secret" fields. Run 'php authorize.php' in the examples directory

98 * for details about what this file should look like.

99 *

class-wc-breadcrumb.php (https://gitlab.com/haque.mdmanzurul/soundkreationsfinal) PHP · 351 lines

1 <?php

2

3 if ( ! defined( 'ABSPATH' ) ) {

101

102 // If permalinks contain the shop page in the URI prepend the breadcrumb with shop

103 if ( $shop_page_id && $shop_page && strstr( $permalinks['product_base'], '/' . $shop_page->post_name ) && get_option( 'page_on_front' ) != $shop_page_id ) {

104 $this->add_crumb( get_the_title( $shop_page ), get_permalink( $shop_page ) );

105 }

ArticleSearchDAO.inc.php (https://github.com/mcrider/pkpUpgradeTestSuite.git) PHP · 209 lines

1 <?php

2

3 /**

4 * ArticleSearchDAO.inc.php

5 *

6 * Copyright (c) 2003-2004 The Public Knowledge Project

11 * DAO class for article search index.

12 *

13 * $Id: ArticleSearchDAO.inc.php,v 1.23 2006/01/17 19:57:25 alec Exp $

14 */

15

78 }

79 $sqlFrom .= 'article_search_object_keywords o'.$i.' NATURAL JOIN article_search_keyword_list k'.$i;

80 if (strstr($phrase[$i], '%') === false) $sqlWhere .= 'k'.$i.'.keyword_text = ?';

81 else $sqlWhere .= 'k'.$i.'.keyword_text LIKE ?';

82 if ($i > 0) $sqlWhere .= ' AND o0.object_id = o'.$i.'.object_id AND o0.pos+'.$i.' = o'.$i.'.pos';

ResponseHeader.php (https://bitbucket.org/haichau59/manga.git) PHP · 400 lines

123

124 if (!in_array($assertType, $this->_assertTypes)) {

125 //require_once 'Zend/Test/PHPUnit/Constraint/Exception.php';

126 throw new Zend_Test_PHPUnit_Constraint_Exception(sprintf('Invalid assertion type "%s" provided to %s constraint', $assertType, __CLASS__));

164 case self::ASSERT_HEADER_REGEX:

165 if (4 > $argc) {

166 //require_once 'Zend/Test/PHPUnit/Constraint/Exception.php';

167 throw new Zend_Test_PHPUnit_Constraint_Exception('Both a header name and content to match are required for ' . __FUNCTION__);

173 : $this->_headerRegex($response, $header, $match);

174 default:

175 //require_once 'Zend/Test/PHPUnit/Constraint/Exception.php';

176 throw new Zend_Test_PHPUnit_Constraint_Exception('Invalid assertion type ' . __FUNCTION__);

190 public function fail($other, $description, $not = false)

191 {

192 //require_once 'Zend/Test/PHPUnit/Constraint/Exception.php';

193 switch ($this->_assertType) {

194 case self::ASSERT_RESPONSE_CODE:

PregReplace.php (https://bitbucket.org/zbahij/eprojets_app.git) PHP · 162 lines

1 <?php

2 /**

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

153 }

154

155 if (false !== strstr($matches['modifier'], 'e')) {

156 throw new Exception\InvalidArgumentException(sprintf(

157 'Pattern for a PregReplace filter may not contain the "e" pattern modifier; received "%s"',

friend.php (http://praized.googlecode.com/svn/trunk/) PHP · 358 lines

14 * Template function: Tests if a valid friend object is set.

15 *

16 * <code><?php if ( pzdc_has_friend() ) : ?>...<?php endif; ?></code>

17 *

18 * @param string $identifier Optional user identifier (login) for custom template development (see bundled praized-php lib)

166 *

167 * @param boolean $echo Defines if the output should be echoed or simpy returned, defaults to TRUE

168 * @param string $identifier Optional friend identifier (login) for custom template development (see bundled praized-php lib)

169 * @return string

170 * @since 2.0

296 global $PraizedCommunity;

297 $out = $PraizedCommunity->tpt_attribute_helper('friend', 'updated_at', FALSE, $identifier);

298 if ( strstr($format, '%') )

299 $out = pzdc_date($out, $format);

300 if ( $echo )

flickrfeed.plugin.php (https://github.com/somefool/habari-extras.git) PHP · 195 lines

1 <?php

2 /**

3 * FlickrFeed Plugin: Show the images from Flickr feed

20 public function validate_uint( $value )

21 {

22 if ( !ctype_digit( $value ) || strstr( $value, '.' ) || $value < 0 ) {

23 return array( _t( 'This field must be positive integer.', 'flickrfeed' ) );

24 }

44 switch ( $block->feed_type ) {

45 case 'user':

46 return 'http://api.flickr.com/services/feeds/photos_public.gne?id=' . $block->user_id . '&tags=' . $block->image_tags . '&format=php_serial';

47 break;

48 case 'friends':

49 return 'http://api.flickr.com/services/feeds/photos_friends.gne?user_id=' . $block->user_id . '&format=php_serial';

50 break;

51 case 'faves':

config.php (https://github.com/svrsreeraj/PHPFrame.git) PHP · 125 lines

1 <?php

2 /**************************************************************************************

3 Created by :Sreeraj

7 class configModel extends modelclass

8 {

9 public $configPath = "../config.inc.php";

10 public $lineBreak = "\r\n";

11 public $bcpDirs = "../Backup/Config";

14 public $adminPanelModules = "modules";

15 public $adminPanelCore = "core";

16 public $adminPanelCorePath = "../adminpanel/core/conf/coreConfig.php";

17

18 public function Listing()

24 if(is_dir($this->bcpDirs) && is_file($this->configPath))

25 {

26 copy($this->configPath, $this->bcpDirs."/config.inc.".strtotime("now").".php");

27 }

28

glew_head.c (https://gitlab.com/dannywillems/mass_collide) C · 247 lines

228

229 /*

230 * Search for name in the extensions string. Use of strstr()

231 * is not sufficient because extension names can be prefixes of

232 * other extension names. Could use strtok() but the constant

xls.php (https://gitlab.com/phamngsinh/baitaplon_sinhvien) PHP · 195 lines

1 <?php

2 /* $Id: xls.php 8964 2006-04-26 19:16:52Z nijel $ */

5 // Check if we have native MS Excel export using PEAR class Spreadsheet_Excel_Writer

6 if (!empty($GLOBALS['cfg']['TempDir'])) {

7 @include_once('Spreadsheet/Excel/Writer.php');

8 if (class_exists('Spreadsheet_Excel_Writer')) {

9 $xls = TRUE;

19 if (isset($plugin_list)) {

20 $plugin_list['xls'] = array(

21 'text' => 'strStrucNativeExcel',

22 'extension' => 'xls',

23 'mime_type' => 'application/vnd.ms-excel',

28 array('type' => 'hidden', 'name' => 'data'),

29 ),

30 'options_text' => 'strStrucNativeExcelOptions',

31 );

32 } else {

libc.rb (https://github.com/postmodern/ffi-libc.git) Ruby · 220 lines

88 attach_function :strchr, [:buffer_in, :int], :pointer

89 attach_function :strrchr, [:buffer_in, :int], :pointer

90 attach_function :strstr, [:buffer_in, :string], :pointer

91 attach_function :strerror, [:int], :string

92

Scaffold.php (https://github.com/mathiasrw/Scaffold.git) PHP · 250 lines

1 <?php

2 /**

3 * Scaffold

7 * @author Anthony Short <anthonyshort@me.com>

8 * @copyright 2009-2010 Anthony Short. All rights reserved.

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

10 * @link https://github.com/anthonyshort/csscaffold/master

11 */

144 public function getSource ( $file = null, $config = array() ) {

145 if ( $file || ($file = $_GET['f']) ) {

146 if ( strstr($file, 'http') )

147 $source = new Scaffold_Source_Url($file);

148 else

DbCacheAdminEnvironment.php (https://gitlab.com/juanito.abelo/nlmobile) PHP · 158 lines

1 <?php

2

3 /**

103 return;

104 } elseif (!$this->db_check_old_add_in()) {

105 w3_require_once(W3TC_INC_FUNCTIONS_DIR . '/other.php');

106 w3_require_once(W3TC_INC_FUNCTIONS_DIR . '/ui.php');

107 if (isset($_GET['page']))

108 $url = 'admin.php?page=' . $_GET['page'] . '&amp;';

109 else

110 $url = basename(w3_remove_query($_SERVER['REQUEST_URI'])) . '?page=w3tc_dashboard&amp;';

111 $remove_url = w3_admin_url($url . 'w3tc_default_remove_add_in=dbcache');

112 throw new FilesystemOperationException(

113 sprintf(__('The Database add-in file db.php is not a W3 Total Cache drop-in.

114 Remove it or disable Database Caching. %s', 'w3-total-cache'),

115 w3tc_button_link(__('Remove it for me', 'w3-total-cache'), wp_nonce_url($remove_url,'w3tc'))));

enhanced-open-graph.php (https://gitlab.com/remyvianne/krowkaramel) PHP · 172 lines

1 <?php

2 /**

3 * Enhanced Open Graph for Jetpack.

8 if ( ! class_exists( 'Jetpack_Media_Summary' ) ) {

9 if ( defined( 'IS_WPCOM' ) && IS_WPCOM ) {

10 include WP_CONTENT_DIR . '/lib/class.wpcom-media-summary.php';

11 } else {

12 jetpack_require_lib( 'class.media-summary' );

138

139 if ( preg_match( '/((youtube|vimeo)\.com|youtu.be)/', $video_url ) ) {

140 if ( strstr( $video_url, 'youtube' ) ) {

141 $id = jetpack_get_youtube_id( $video_url );

142 $video_url = 'http://www.youtube.com/embed/' . $id;

143 $secure_video_url = 'https://www.youtube.com/embed/' . $id;

144 } elseif ( strstr( $video_url, 'vimeo' ) ) {

145 preg_match( '|vimeo\.com/(\d+)/?$|i', $video_url, $match );

146 $id = (int) $match[1];

perf-call-graph.php (https://gitlab.com/iranjith4/hhvm) PHP · 159 lines

1 #!/usr/local/bin/php -j

2 <?php

3

4 require(__DIR__.'/perf-lib.php');

5

6 # Returns true iff $sample contains a line containing $func.

7 function contains_frame(Vector $sample, string $func): bool {

8 foreach ($sample as $frame) {

9 if (strstr($frame, $func) !== false) return true;

10 }

11 return false;

Query.php (https://github.com/massiveart/ZF-ZOOLU.git) PHP · 223 lines

1 <?php

2 /**

3 * Zend Framework

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

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

19 * @version $Id: Query.php 20096 2010-01-06 02:05:09Z bkarwin $

20 */

21

23 * @see Zend_Dom_Query_Css2Xpath

24 */

25 require_once 'Zend/Dom/Query/Css2Xpath.php';

26

27 /**

28 * @see Zend_Dom_Query_Result

29 */

30 require_once 'Zend/Dom/Query/Result.php';

31

32 /**

html.inc.php (https://github.com/BenBE/ispCP.git) PHP · 201 lines

100 // --------------

101

102 // Original code comes from http://www.phpbuilder.com/columns/tim20000821.php3?print_mode=1

103 // Written by Tim Perdue, and released under the GPL license

104 //

160 elseif ($what == "platform") {

161

162 if ( strstr($http_user_agent, 'BlackBerry') ||

163 strstr($http_user_agent, 'DoCoMo') ||

164 strstr($http_user_agent, 'Nokia') ||

165 strstr($http_user_agent, 'Palm') ||

166 strstr($http_user_agent, 'SonyEricsson') ||

169 $BROWSER_PLATFORM = 'Mobile';

170 }

171 elseif (strstr($http_user_agent, 'iPhone') || strstr($http_user_agent, 'iPod')) {

172 $BROWSER_PLATFORM = 'iPhone';

173 }

cache.php (https://github.com/severnaya99/Sg-2010.git) PHP · 206 lines

1 <?php

2 //

3 // +----------------------------------------------------------------------+

6 // | Copyright (c) 2003 The zen-cart developers |

7 // | |

8 // | http://www.zen-cart.com/index.php |

9 // | |

10 // | Portions Copyright (c) 2003 osCommerce |

18 // | license@zen-cart.com so we can mail you a copy immediately. |

19 // +----------------------------------------------------------------------+

20 // $Id: cache.php 801 2004-12-13 23:50:33Z wilt $

21 //

22

166 if ($za_dir = @dir(DIR_FS_SQL_CACHE)) {

167 while ($zv_file = $za_dir->read()) {

168 if (strstr($zv_file, '.sql') && strstr($zv_file, 'zc_')) {

169 @unlink(DIR_FS_SQL_CACHE . '/' . $zv_file);

170 }

phptool.c (https://gitlab.com/TSnake41/httpBat) C · 191 lines

1 /*

2 PHP_Tool - HTTPBAT

3

4 This tool is used for multiples utilities

5 like fix a bug in PHP 5, pass headers to clients,

6 and help HTTPBAT to be faster for basics tasks which

7 can't be realised in batch with enought performances !

39

40 /* Mains Functions */

41 void PHP(FILE*);

42 void POST();

43 void help();

59 /* 'h' like "Headers" */

60 case 'h':

61 PHP(OpenFile(argc[2]));

62 break;

63

string.c (https://bitbucket.org/Don2x/mod-kernel-m7-sources.git) C · 588 lines

478 #endif

479

480 #ifndef __HAVE_ARCH_STRSTR

481 char *strstr(const char *s1, const char *s2)

495 return NULL;

496 }

497 EXPORT_SYMBOL(strstr);

498 #endif

499

lxcmntent.c (https://gitlab.com/Red54/lxc) C · 193 lines

178 char *rest = mnt->mnt_opts, *p;

179

180 while ((p = strstr (rest, opt)) != NULL)

181 {

182 if ((p == rest || p[-1] == ',')

Redirect.php (https://bitbucket.org/DragonBe/zfform.git) PHP · 306 lines

23 /** @see PHPUnit_Framework_Constraint */

24 require_once 'PHPUnit/Framework/Constraint.php';

25

26 /**

107 {

108 if (!$other instanceof Zend_Controller_Response_Abstract) {

109 require_once 'Zend/Test/PHPUnit/Constraint/Exception.php';

110 throw new Zend_Test_PHPUnit_Constraint_Exception('Redirect constraint assertions require a response object');

139 case self::ASSERT_REDIRECT_REGEX:

140 if (3 > $argc) {

141 require_once 'Zend/Test/PHPUnit/Constraint/Exception.php';

142 throw new Zend_Test_PHPUnit_Constraint_Exception('No pattern provided against which to match redirect');

170 public function fail($other, $description, $not = false)

171 {

172 require_once 'Zend/Test/PHPUnit/Constraint/Exception.php';

173 switch ($this->_assertType) {

174 case self::ASSERT_REDIRECT_TO:

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

1 <?php

2 /**

3 * This file contains the code for the SOAP date/time clas.

4 *

5 * PHP versions 4 and 5

6 *

7 * LICENSE: This source file is subject to version 2.02 of the PHP license,

8 * that is bundled with this package in the file LICENSE, and is available at

9 * through the world-wide-web at http://www.php.net/license/2_02.txt. If you

10 * did not receive a copy of the PHP license and are unable to obtain it

19 * @copyright 2003-2005 The PHP Group

20 * @license http://www.php.net/license/2_02.txt PHP License 2.02

21 * @link http://pear.php.net/package/SOAP

class-breakpoints.php (https://github.com/nk-o/ghostkit.git) PHP · 415 lines

1 <?php

2 /**

3 * Breakpoints

7

8 if ( ! function_exists( 'is_plugin_active' ) ) {

9 require_once ABSPATH . 'wp-admin/includes/plugin.php';

10 }

11

12 // phpcs:ignore

13 $pro_version = false;

14

15 if ( is_plugin_active( 'ghostkit-pro/class-ghost-kit-pro.php' ) ) {

16 // phpcs:ignore

EchoExtension.php (https://github.com/jaugustin/AdmingeneratorGeneratorBundle.git) PHP · 266 lines

1 <?php

2

3 namespace Admingenerator\GeneratorBundle\Twig\Extension;

47 {

48 return array(

49 'as_php' => new \Twig_Filter_Method($this, 'asPhp'),

50 'convert_as_form' => new \Twig_Filter_Method($this, 'convertAsForm'),

51 );

57 * eg type option for collection type

58 *

59 * @param string $options the string as php

60 * @param string $formType the form type

61 *

91 }

92

93 public function asPhp($variable)

94 {

95 if (!is_array($variable)) {

FileStream.php (https://bitbucket.org/rchlmrtn/chiari.git) PHP · 144 lines

1 <?php

2 /**

3 * Copyright 2012 GroupDocs.

53 } else if ($this->fileName == null and $this->downloadDirectory != null){

54 // guess from url

55 $this->fileName = basename(parse_url($this->requestUrl, PHP_URL_PATH));

56 }

57 return $this->fileName;

86

87 $len = strlen($string);

88 if( !strstr($string, ':') ) {

89 return $len;

90 }

97 if( count($parts) > 1 ) {

98 foreach($parts AS $crumb) {

99 if( strstr($crumb, '=') ) {

100 list($pname, $pval) = explode('=', $crumb);

101 $pname = trim($pname);

Request.php (https://bitbucket.org/emerido/test.git) PHP · 360 lines

1 <?php

2 /**

3 * Smart - PHP 5 Content Management Framework

168 {

169 if (null === $this->content) {

170 $this->content = trim(file_get_contents('php://input'));

171 }

172 return $this->content;

333 public function isFlash()

334 {

335 return (strstr(strtolower($this->header->get('User-Agent')), ' flash')) ? true : false;

336 }

337

CheckboxTest.php (https://github.com/leerbag/zf2.git) PHP · 218 lines

1 <?php

2 /**

3 * Zend Framework

26 Zend\Form\Element,

27 Zend\Form\Decorator,

28 Zend\View\PhpRenderer as View;

29

30 /**

38 * @group Zend_Form

39 */

40 class CheckboxTest extends \PHPUnit_Framework_TestCase

41 {

42 /**

209 $this->assertEquals(2, count($matches[1]));

210 foreach ($matches[1] as $element) {

211 if (strstr($element, 'hidden')) {

212 $this->assertContains($this->element->getUncheckedValue(), $element);

213 } else {

ResponseHeader34.php (https://gitlab.com/yousafsyed/easternglamor) PHP · 406 lines

125

126 if (!in_array($assertType, $this->_assertTypes)) {

127 #require_once 'Zend/Test/PHPUnit/Constraint/Exception.php';

128 throw new Zend_Test_PHPUnit_Constraint_Exception(sprintf('Invalid assertion type "%s" provided to %s constraint', $assertType, __CLASS__));

166 case self::ASSERT_HEADER_REGEX:

167 if (4 > $argc) {

168 #require_once 'Zend/Test/PHPUnit/Constraint/Exception.php';

169 throw new Zend_Test_PHPUnit_Constraint_Exception('Both a header name and content to match are required for ' . __FUNCTION__);

175 : $this->_headerRegex($response, $header, $match);

176 default:

177 #require_once 'Zend/Test/PHPUnit/Constraint/Exception.php';

178 throw new Zend_Test_PHPUnit_Constraint_Exception('Invalid assertion type ' . __FUNCTION__);

192 public function fail($other, $description, $not = false)

193 {

194 #require_once 'Zend/Test/PHPUnit/Constraint/Exception.php';

195 switch ($this->_assertType) {

196 case self::ASSERT_RESPONSE_CODE:

extprofile_mb.h (https://github.com/zsj888/hiphop-php.git) C Header · 307 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 */

helper.forms.php (https://github.com/Eyenrique/ZanPHP.git) PHP · 429 lines

1 <?php

2 /**

3 * Access from index.php:

12 *

13 *

14 * @package ZanPHP

15 * @subpackage Core

16 * @category Helpers

212 $ID = (isset($ID)) ? ' id="'. $ID .'"' : NULL;

213 $legend = (isset($legend)) ? "<legend>$legend</legend>" . "\n" : NULL;

214 $action = (strstr($action, "http://")) ? $action : _webBase . _sh . $action;

215

216 $HTML = '<form'. $ID .' action="'. $action .'" method="'. $method .'" class="'. $class .'" enctype="'. $enctype .'">' . "\n\t";

format.php (https://github.com/bobpuffer/1.9.12-LAE1.3.git) PHP · 432 lines

1 <?php // $Id: format.php 68 2009-07-31 18:23:01Z dlandau $

2

3 ////////////////////////////////////////////////////////////////////////////

9 ////////////////////////////////////////////////////////////////////////////

10

11 // Based on default.php, included by ../import.php

12 /**

13 * @package questionbank

16 require_once ("$CFG->libdir/xmlize.php");

17 require_once ("$CFG->libdir/tcpdf/html_entity_decode_php4.php");

18

19 class qformat_blackboard extends qformat_default {

141 // put questiontext in question object

142 if ($ishtml) {

143 $question->questiontext = html_entity_decode_php4(trim($thisquestion["#"]["BODY"][0]["#"]["TEXT"][0]["#"]));

144 }

145 $question->questiontext = addslashes($question->questiontext);

ClassCommentSniff.php (https://github.com/benlumley/Elastica.git) PHP · 211 lines

45 * @license http://matrix.squiz.net/developer/tools/php_cs/licence BSD Licence

46 * @version Release: 1.0.1

47 * @link http://pear.php.net/package/PHP_CodeSniffer

48 */

49 class Xodoa_Sniffs_Commenting_ClassCommentSniff extends Xodoa_Sniffs_Commenting_FileCommentSniff

107 $newlineToken = $phpcsFile->findNext(T_WHITESPACE, ($commentEnd + 1), $stackPtr, false, $phpcsFile->eolChar);

108 if ($newlineToken !== false) {

109 $newlineToken = $phpcsFile->findNext(T_WHITESPACE, ($newlineToken + 1), $stackPtr, false, $phpcsFile->eolChar);

110 if ($newlineToken !== false) {

111 // Blank line between the class and the doc block.

123 // Parse the class comment.docblock.

124 try {

125 $this->commentParser = new PHP_CodeSniffer_CommentParser_ClassCommentParser($comment, $phpcsFile);

126 $this->commentParser->parse();

127 } catch (PHP_CodeSniffer_CommentParser_ParserException $e) {

settings.php (https://github.com/DoFken/forkcms.git) PHP · 148 lines

1 <?php

2

3 /*

110 {

111 // check if http:// is set and add if necessary

112 $feedburner = !strstr($feedburnerURL->getValue(), 'http://') ? 'http://' . $feedburnerURL->getValue() : $feedburnerURL->getValue();

113

114 // check if feedburner URL is valid

Stream.php (https://gitlab.com/reasonat/test8) PHP · 328 lines

1 <?php

2 /**

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

191

192 return (

193 strstr($mode, 'x')

194 || strstr($mode, 'w')

195 || strstr($mode, 'c')

196 || strstr($mode, 'a')

232 $mode = $meta['mode'];

233

234 return (strstr($mode, 'r') || strstr($mode, '+'));

235 }

236

CommentQuery.php (https://github.com/engram-design/Comments.git) PHP · 347 lines

1 <?php

2 namespace verbb\comments\elements\db;

3

337 if ($this->orderBy) {

338 if (is_string($this->orderBy)) {

339 return strstr($this->orderBy, 'votes');

340 } else if (is_array($this->orderBy)) {

341 return isset($this->orderBy['votes']);

Token.php (https://github.com/GunioRobot/phpca.git) PHP · 433 lines

1 <?php

2 /**

3 * Copyright (c) 2009 Stefan Priebsch <stefan@priebsch.de>

30 * POSSIBILITY OF SUCH DAMAGE.

31 *

32 * @package PHPca

33 * @author Stefan Priebsch <stefan@priebsch.de>

34 * @copyright Stefan Priebsch <stefan@priebsch.de>. All rights reserved.

36 */

37

38 namespace spriebsch\PHPca;

39

40 /**

41 * The Token class wraps one PHP tokenizer token.

42 * Each token knows its line and column in the source file.

43 * Where no PHP tokens exist (brackets, braces, etc.),

topcrashersbyurl.php (https://github.com/AlinT/socorro.git) PHP · 274 lines

1 <?php

2 /**

3 * Manage data in the `topcrashers` table.

66 if (strpos($domain, '@') !== false) {

67 return 'username_detected_BLOCKED';

68 } elseif (!strstr($domain, '.')) {

69 return 'invalid_domain_detected_BLOCKED';

70 } else {

update.php (https://github.com/mul14/revolution.git) PHP · 197 lines

1 <?php

2 /**

3 * Updates a TV

57 $output_properties = array();

58 foreach ($scriptProperties as $key => $value) {

59 $res = strstr($key,'prop_');

60 if ($res !== false) {

61 $output_properties[str_replace('prop_','',$key)] = $value;

65 $input_properties = array();

66 foreach ($scriptProperties as $key => $value) {

67 $res = strstr($key,'inopt_');

68 if ($res !== false) {

69 $input_properties[str_replace('inopt_','',$key)] = $value;

wc-page-functions.php (https://gitlab.com/webkod3r/tripolis) PHP · 261 lines

1 <?php

2 /**

3 * WooCommerce Page Functions

94

95 if ( get_option( 'permalink_structure' ) ) {

96 if ( strstr( $permalink, '?' ) ) {

97 $query_string = '?' . parse_url( $permalink, PHP_URL_QUERY );

174 if ( ! empty( $customer_logout ) ) {

175 foreach ( $items as $key => $item ) {

176 if ( strstr( $item->url, $customer_logout ) ) {

177 unset( $items[ $key ] );

178 }

header.php (https://github.com/tchouamou/camaroes.git) PHP · 229 lines

6 */

7

8 require_once 'PHPUnit.php';

9 require_once 'HTTP/Header.php';

10

11 class HTTP_HeaderTest extends PHPUnit_TestCase

12 {

13 function HTTP_HeaderTest($name)

18 function setUp()

19 {

20 $this->testScript = 'http://local/www/mike/pear/HTTP_Header/tests/response.php';

21 }

22

125 $r->sendRequest();

126 $this->assertEquals(302, $r->getResponseCode(), 'test for response code 302');

127 $this->assertTrue(strstr($r->getResponseHeader('location'), 'response.php'));

128 unset($h, $r);

129 }

function.html_image.php (https://gitlab.com/fiesta-framework/Documentation) PHP · 163 lines

1 <?php

2 /**

3 * Smarty plugin

24 * </pre>

25 *

26 * @link http://www.smarty.net/manual/en/language.function.html.image.php {html_image}

27 * (Smarty online manual)

28 * @author Monte Ohrt <monte at ohrt dot com>

39 function smarty_function_html_image($params, $template)

40 {

41 require_once(SMARTY_PLUGINS_DIR . 'shared.escape_special_chars.php');

42

43 $alt = '';

109 if (isset($template->smarty->security_policy)) {

110 if ($protocol) {

111 // remote resource (or php stream, …)

112 if (!$template->smarty->security_policy->isTrustedUri($params['file'])) {

113 return;

Parser.php (https://gitlab.com/madwanz64/laravel) PHP · 204 lines

1 <?php declare(strict_types=1);

2 /*

3 * This file is part of sebastian/cli-parser.

4 *

5 * (c) Sebastian Bergmann <sebastian@phpunit.de>

6 *

7 * For the full copyright and license information, please view the LICENSE

28 use function strlen;

29 use function strpos;

30 use function strstr;

31 use function substr;

32

117 $optionArgument = null;

118

119 if ($arg[$i] === ':' || ($spec = strstr($shortOptions, $option)) === false) {

120 throw new UnknownOptionException('-' . $option);

121 }

product_variation.class.php (https://github.com/coolio197/woocommerce.git) PHP · 215 lines

1 <?php

2 /**

3 * Product Variation Class

37 foreach ($product_custom_fields as $name => $value) :

38

39 if (!strstr($name, 'attribute_')) continue;

40

41 $this->variation_data[$name] = $value[0];

Query.php (https://github.com/richjoslin/rivety.git) PHP · 223 lines

1 <?php

2 /**

3 * Zend Framework

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

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

19 * @version $Id: Query.php 20908 2010-02-04 19:00:54Z matthew $

20 */

21

23 * @see Zend_Dom_Query_Css2Xpath

24 */

25 require_once 'Zend/Dom/Query/Css2Xpath.php';

26

27 /**

28 * @see Zend_Dom_Query_Result

29 */

30 require_once 'Zend/Dom/Query/Result.php';

31

32 /**

AppInfo.php (https://gitlab.com/x33n/ampache) PHP · 238 lines

1 <?php

2 namespace Dropbox;

3

63

64 // The $host parameter is sort of internal. We don't include it in the param list because

65 // we don't want it to be included in the documentation. Use PHP arg list hacks to get at

66 // it.

67 $host = null;

78 /**

79 * Loads a JSON file containing information about your app. At a minimum, the file must include

80 * the "key" and "secret" fields. Run 'php authorize.php' in the examples directory

81 * for details about what this file should look like.

82 *

96 /**

97 * Loads a JSON file containing information about your app. At a minimum, the file must include

98 * the "key" and "secret" fields. Run 'php authorize.php' in the examples directory

99 * for details about what this file should look like.

100 *

Validator.php (https://gitlab.com/yousafsyed/easternglamor) PHP · 201 lines

1 <?php

2 /**

3 * Copyright © 2016 Magento. All rights reserved.

9

10 /**

11 * @SuppressWarnings(PHPMD.CouplingBetweenObjects)

12 */

13 abstract class Validator

186 // Maybe array with file info came in

187 if (is_array($fileInfo)) {

188 return strstr($fileInfo['type'], 'image/');

189 }

190

update_check.php (https://github.com/robertleeplummerjr/bluebox.git) PHP · 107 lines

1 <?PHP

2 /**

3 * Endpoint Manager Update Check File

13 while (!feof($rfh)) {

14 $line = fgets($rfh);

15 if (strstr($line,"AMPDBUSER=")) {

16 $temp=explode("=",$line);

17 $temp[1]=trim($temp[1]);

18 $ampdata['user'] = $temp[1];

19 }elseif (strstr($line,"AMPDBPASS=")) {

20 $temp=explode("=",$line);

21 $temp[1]=trim($temp[1]);

OneToManySelfReferentialAssociationTest.php (https://github.com/maartendekeizer/doctrine2.git) PHP · 123 lines

1 <?php

2

3 namespace Doctrine\Tests\ORM\Functional;

7 use Doctrine\ORM\Mapping\ClassMetadata;

8

9 require_once __DIR__ . '/../../TestInit.php';

10

11 /**

27 $this->firstChild->setName('Java books');

28 $this->secondChild = new ECommerceCategory();

29 $this->secondChild->setName('Php books');

30 }

31

82 $this->assertInstanceOf('Doctrine\Tests\Models\ECommerce\ECommerceCategory', $children[0]);

83 $this->assertSame($parent, $children[0]->getParent());

84 $this->assertEquals(' books', strstr($children[0]->getName(), ' books'));

85 $this->assertInstanceOf('Doctrine\Tests\Models\ECommerce\ECommerceCategory', $children[1]);

86 $this->assertSame($parent, $children[1]->getParent());

ResponseHeader.php (https://github.com/Martin1982/IBMessagingWorkshopServer.git) PHP · 400 lines

123

124 if (!in_array($assertType, $this->_assertTypes)) {

125 // require_once 'Zend/Test/PHPUnit/Constraint/Exception.php';

126 throw new Zend_Test_PHPUnit_Constraint_Exception(sprintf('Invalid assertion type "%s" provided to %s constraint', $assertType, __CLASS__));

164 case self::ASSERT_HEADER_REGEX:

165 if (4 > $argc) {

166 // require_once 'Zend/Test/PHPUnit/Constraint/Exception.php';

167 throw new Zend_Test_PHPUnit_Constraint_Exception('Both a header name and content to match are required for ' . __FUNCTION__);

173 : $this->_headerRegex($response, $header, $match);

174 default:

175 // require_once 'Zend/Test/PHPUnit/Constraint/Exception.php';

176 throw new Zend_Test_PHPUnit_Constraint_Exception('Invalid assertion type ' . __FUNCTION__);

190 public function fail($other, $description, $not = false)

191 {

192 // require_once 'Zend/Test/PHPUnit/Constraint/Exception.php';

193 switch ($this->_assertType) {

194 case self::ASSERT_RESPONSE_CODE:

vfsStreamDirectory.php (https://bitbucket.org/ajalovec/aura.demo.git) PHP · 235 lines

1 <?php

2 /**

3 * This file is part of vfsStream.

32 public function __construct($name, $permissions = null)

33 {

34 if (strstr($name, '/') !== false) {

35 throw new vfsStreamException('Directory name can not contain /.');

36 }

91 public function rename($newName)

92 {

93 if (strstr($newName, '/') !== false) {

94 throw new vfsStreamException('Directory name can not contain /.');

95 }

translation.php (https://github.com/F5/zetacomponents.git) PHP · 214 lines

1 <?php

2 /**

3 *

124 // if there is just a percent sign in the string without a valid

125 // parameter-identifier, but we can live with that.

126 if ( strstr( $translatedString, '%' ) === false )

127 {

128 return $translatedString;

174 *

175 * This method returns a translated string and substitutes the parameters $param

176 * in the localized string with PHP code to place the variable data into

177 * the string at a later moment. Instead of the values for each of the

178 * parameters, an expression to get to the data should be sumbitted into

202 // if there is just a percent sign in the string without a valid

203 // parameter-identifier, but we can live with that.

204 if ( strstr( $translatedString, '%' ) === false )

205 {

206 return $translatedString;

FormCheckbox.php (https://github.com/eschabell/openshift-zendframework.git) PHP · 163 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: FormCheckbox.php 23775 2011-03-01 17:25:24Z ralph $

21 */

22

25 * Abstract class for extension

26 */

27 require_once 'Zend/View/Helper/FormElement.php';

28

29

90 // build the element

91 $xhtml = '';

92 if (!$disable && !strstr($name, '[]')) {

93 $xhtml = $this->_hidden($name, $checkedOptions['uncheckedValue']);

94 }

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;

158 }

159 }

160 if (!\function_exists('mb_strstr')) {

161 function mb_strstr($s, $needle, $part = \false, $enc = null)

162 {

163 return p\Mbstring::mb_strstr($s, $needle, $part, $enc);

164 }

165 }

gtickets.php (https://gitlab.com/BaseX/BaseX) PHP · 209 lines

1 <?php

2 // GIJOE's Ticket Class (based on Marijuana's Oreteki XOOPS)

3 // nobunobu's suggestions are applied

136 // check area or referer

137 if( @$found_stub['area'] == $area ) $area_check = true ;

138 if( ! empty( $found_stub['referer'] ) && strstr( @$_SERVER['HTTP_REFERER'] , $found_stub['referer'] ) ) $referer_check = true ;

139

140 // if( empty( $area_check ) || empty( $referer_check ) ) { // restrict

ResponseHeader.php (https://github.com/ftaiolivista/Zend-Framework-Namespaced-.git) PHP · 406 lines

119 {

120 if (!$other instanceof Response\AbstractResponse) {

121 require_once 'Zend/Test/PHPUnit/Constraint/Exception.php';

122 throw new Exception('Header constraint assertions require a response object');

123 }

142 case self::ASSERT_RESPONSE_CODE:

143 if (3 > $argc) {

144 require_once 'Zend/Test/PHPUnit/Constraint/Exception.php';

145 throw new Exception('No response code provided against which to match');

146 }

196 public function fail($other, $description, $not = false)

197 {

198 require_once 'Zend/Test/PHPUnit/Constraint/Exception.php';

199 switch ($this->_assertType) {

200 case self::ASSERT_RESPONSE_CODE:

InteractsWithInput.php (https://gitlab.com/jjpa2018/dashboard) PHP · 540 lines

1 <?php

2

3 namespace Illuminate\Http\Concerns;

61 $header = substr($header, $position + 7);

62

63 return strpos($header, ',') !== false ? strstr(',', $header, true) : $header;

64 }

65 }

CheckboxTest.php (https://github.com/Exercise/zf2.git) PHP · 219 lines

1 <?php

2 /**

3 * Zend Framework

39 * @group Zend_Form

40 */

41 class CheckboxTest extends \PHPUnit_Framework_TestCase

42 {

43 /**

210 $this->assertEquals(2, count($matches[1]));

211 foreach ($matches[1] as $element) {

212 if (strstr($element, 'hidden')) {

213 $this->assertContains($this->element->getUncheckedValue(), $element);

214 } else {

LPFilter.cc (https://freespeech.svn.sourceforge.net/svnroot/freespeech) C++ · 116 lines ✨ Summary

This C++ code defines a class LPFilter that represents a Low-Pass Filter node in a signal processing system. It takes parameters such as length and theta, and initializes its internal value with a pre-calculated sequence of values based on these parameters. The node provides an output value that can be accessed through the getOutput method.

19 #include "Vector.h"

20 #include "ObjectParser.h"

21 #include <strstream>

22 #include <math.h>

23

PathObj.cpp (https://jetpp.svn.sourceforge.net/svnroot/jetpp) C++ · 2829 lines ✨ Summary

This C++ code is part of a 3D animation system, specifically handling time line modifications for an object’s position and rotation in a scene. It updates the object’s transformation based on user input, enabling or disabling specific channels (e.g., translation, rotation) depending on the channel type. The code also handles object creation, destruction, and reference management, ensuring seamless interaction with the animation system.

228 assert(strip);

229

230 ptr = strstr(str, strip);

231

232 if (!ptr)

ttobjs.c (http://angel-engine.googlecode.com/svn/trunk/) C · 944 lines ✨ Summary

This C code is part of a FreeType library implementation for TrueType fonts. It provides functions and structures for initializing, finalizing, and managing font drivers, slots, and contexts. The code handles font scaling, transformation, and glyph loading, enabling the use of TrueType fonts in various applications.

290 {

291 if ( ttface->family_name &&

292 ft_strstr( ttface->family_name, trick_names[nn] ) )

293 {

294 unpatented_hinting = 1;

doh.h (https://swig.svn.sourceforge.net/svnroot/swig) C++ Header · 447 lines ✨ Summary

This is a C++ header file that provides a set of data structures and functions for working with objects, strings, files, and other data types. It defines classes and functions for managing memory, performing operations on data, and handling errors. The code appears to be part of a larger library or framework, providing a way to interact with various types of data in a consistent and efficient manner.

98 #define DohStrcmp DOH_NAMESPACE(Strcmp)

99 #define DohStrncmp DOH_NAMESPACE(Strncmp)

100 #define DohStrstr DOH_NAMESPACE(Strstr)

101 #define DohStrchr DOH_NAMESPACE(Strchr)

102 #define DohNewFile DOH_NAMESPACE(NewFile)

284 extern int DohStrcmp(const DOHString_or_char *s1, const DOHString_or_char *s2);

285 extern int DohStrncmp(const DOHString_or_char *s1, const DOHString_or_char *s2, int n);

286 extern char *DohStrstr(const DOHString_or_char *s1, const DOHString_or_char *s2);

287 extern char *DohStrchr(const DOHString_or_char *s1, int ch);

288

420 #define Strcmp DohStrcmp

421 #define Strncmp DohStrncmp

422 #define Strstr DohStrstr

423 #define Strchr DohStrchr

424 #define Copyto DohCopyto

emit.cxx (https://swig.svn.sourceforge.net/svnroot/swig) C++ · 525 lines ✨ Summary

This C++ code is part of a Python-to-C++ compiler, specifically responsible for generating wrapper code and exception handling for Python functions. It processes Python function definitions, including contracts (pre- and post-conditions), exceptions, and return types, to produce efficient C++ code that can be compiled into native binaries.

363 tm = Copy(tm);

364 if ((tm) && Len(tm) && (Strcmp(tm, "1") != 0)) {

365 if (Strstr(tm, "$")) {

366 Replaceall(tm, "$name", Getattr(n, "name"));

367 Replaceall(tm, "$symname", Getattr(n, "sym:name"));

372 Replaceall(tm, "$overname", overloaded ? Char(Getattr(n, "sym:overname")) : "");

373

374 if (Strstr(tm, "$decl")) {

375 String *decl = Swig_name_decl(n);

376 Replaceall(tm, "$decl", decl);

377 Delete(decl);

378 }

379 if (Strstr(tm, "$fulldecl")) {

380 String *fulldecl = Swig_name_fulldecl(n);

381 Replaceall(tm, "$fulldecl", fulldecl);

i386-gen.c (https://bitbucket.org/freebsd/freebsd-head/) C · 395 lines ✨ Summary

This C code generates two tables for i386 architecture: register table and opcode table. It reads configuration files (i386-reg.tbl and i386-opcode.tbl) to populate these tables, then prints them in a human-readable format. The output is intended to be used as part of an emulator or compiler for the i386 architecture.

119

120 /* Skip comments. */

121 str = strstr (p, "//");

122 if (str != NULL)

123 str[0] = '\0';

270

271 /* Skip comments. */

272 str = strstr (p, "//");

273 if (str != NULL)

274 str[0] = '\0';

dhd_common.c (http://omnia2droid.googlecode.com/svn/trunk/) C · 1733 lines ✨ Summary

This C code snippet appears to be part of a wireless networking driver, specifically related to Wi-Fi scanning and management. It provides functions for requesting Wi-Fi scans, deleting BSS (Basic Service Set) entries, and retrieving partial scan results. The code also handles various error conditions and manages internal data structures, such as the iscan_chain buffer.

7 * agreement governing use of this software, this software is licensed to you

8 * under the terms of the GNU General Public License version 2 (the "GPL"),

9 * available at http://www.broadcom.com/licenses/GPLv2.php, with the

10 * following added to such license:

11 *

791 */

792 p = (char *)&buf[MSGTRACE_HDRLEN];

793 while ((s = strstr(p, "\n")) != NULL) {

794 *s = '\0';

795 printf("%s\n", p);