100+ results for 'php ob_end_clean'

Not the results you expected?

Template.php (https://gitlab.com/arthur_quiroga/dystawork) PHP · 413 lines

1 <?php

2

3 /*

373 } catch (Throwable $e) {

374 while (ob_get_level() > $level) {

375 ob_end_clean();

376 }

377

GifCreator.php (https://gitlab.com/billyprice1/mc-skintools) PHP · 349 lines

1 <?php

2

3 namespace GifCreator;

8 * @link https://github.com/Sybio/GifCreator

9 * @author Sybio (Clément Guillemain / @Sybio01)

10 * @license http://opensource.org/licenses/gpl-license.php GNU Public License

11 * @copyright Clément Guillemain

12 * @modified by Max Korlaar

100 imagegif($frames[$i]);

101 $this->frameSources[] = ob_get_contents();

102 ob_end_clean();

103

104 } elseif (is_string($frames[$i])) { // File path or URL or Binary source code

114 imagegif($resourceImg);

115 $this->frameSources[] = ob_get_contents();

116 ob_end_clean();

117

118 } else { // Fail

unicode.php (https://github.com/akelos/v1.git) PHP · 269 lines

1 <?php

2 /**

3 * @version $Id: unicode.php,v 1.2 2006/02/26 13:20:44 harryf Exp $

8 * Portions created by the Initial Developer are Copyright (C) 1998

9 * the Initial Developer. All Rights Reserved.

10 * Ported to PHP by Henri Sivonen (http://hsivonen.iki.fi)

11 * Slight modifications to fit with phputf8 library by Harry Fuecks (hfuecks gmail com)

12 * @see http://lxr.mozilla.org/seamonkey/source/intl/uconv/src/nsUTF8ToUnicode.cpp

13 * @see http://lxr.mozilla.org/seamonkey/source/intl/uconv/src/nsUnicodeToUTF8.cpp

14 * @see http://hsivonen.iki.fi/php-utf8/

15 * @package utf8

16 * @subpackage unicode

24 * are not allowed.

25 * Returns false if the input string isn't a valid UTF-8 octet sequence

26 * and raises a PHP error at level E_USER_WARNING

27 * Note: this function has been modified slightly in this library to

28 * trigger errors on encountering bad bytes

unicode.php (https://github.com/MaBelleEcole/Main.git) PHP · 269 lines

1 <?php

2 /**

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

8 * Portions created by the Initial Developer are Copyright (C) 1998

9 * the Initial Developer. All Rights Reserved.

10 * Ported to PHP by Henri Sivonen (http://hsivonen.iki.fi)

11 * Slight modifications to fit with phputf8 library by Harry Fuecks (hfuecks gmail com)

12 * @see http://lxr.mozilla.org/seamonkey/source/intl/uconv/src/nsUTF8ToUnicode.cpp

13 * @see http://lxr.mozilla.org/seamonkey/source/intl/uconv/src/nsUnicodeToUTF8.cpp

14 * @see http://hsivonen.iki.fi/php-utf8/

15 * @package utf8

16 * @subpackage unicode

24 * are not allowed.

25 * Returns false if the input string isn't a valid UTF-8 octet sequence

26 * and raises a PHP error at level E_USER_WARNING

27 * Note: this function has been modified slightly in this library to

28 * trigger errors on encountering bad bytes

unicode.php (https://github.com/pacoqueen/callao_chico.git) PHP · 269 lines

1 <?php

2 /**

3 * @version $Id: unicode.php 16235 2010-04-20 04:13:25Z pasamio $

8 * Portions created by the Initial Developer are Copyright (C) 1998

9 * the Initial Developer. All Rights Reserved.

10 * Ported to PHP by Henri Sivonen (http://hsivonen.iki.fi)

11 * Slight modifications to fit with phputf8 library by Harry Fuecks (hfuecks gmail com)

12 * @see http://lxr.mozilla.org/seamonkey/source/intl/uconv/src/nsUTF8ToUnicode.cpp

13 * @see http://lxr.mozilla.org/seamonkey/source/intl/uconv/src/nsUnicodeToUTF8.cpp

14 * @see http://hsivonen.iki.fi/php-utf8/

15 * @package utf8

16 * @subpackage unicode

24 * are not allowed.

25 * Returns false if the input string isn't a valid UTF-8 octet sequence

26 * and raises a PHP error at level E_USER_WARNING

27 * Note: this function has been modified slightly in this library to

28 * trigger errors on encountering bad bytes

dumper.php (https://bitbucket.org/laborautonomo/laborautonomo-site.git) PHP · 359 lines

1 <?php

2 /**

3 * base include file for SimpleTest

4 * @package SimpleTest

5 * @subpackage UnitTester

6 * @version $Id: dumper.php 1782 2008-04-25 17:09:06Z pp11 $

7 */

8 /**

353 print_r($variable);

354 $formatted = ob_get_contents();

355 ob_end_clean();

356 return $formatted;

357 }

sitemailer_.php (https://gitlab.com/nvtdn2006/azora) PHP · 384 lines

1 <?php

2 class SiteMailer

3 {

51

52 $this->headers .= "MIME-Version: 1.0\r\n";

53 //$this->headers .= "Content-Type: multipart/mixed; boundary=\"PHP-mixed-" . $this->randomHash . "\"\r\n";

54 $this->headers .= "Content-Type: text/html; charset=ISO-8859-1\r\n";

55 }

89 /*if ($this->attachment != '')

90 {

91 $this->msgBody .= "\r\n--PHP-mixed-" . $this->randomHash . "--";

92 $this->msgBody .= $this->attachment;

93 $this->msgBody .= "\r\n--PHP-mixed-" . $this->randomHash . "--";

107 include($filepath);

108 $content = ob_get_contents();

109 ob_end_clean();

110 return $content;

111 }

Template.php (https://gitlab.com/fbi/web) PHP · 374 lines

1 <?php

2

3 /*

210 } catch (Exception $e) {

211 while (ob_get_level() > $level) {

212 ob_end_clean();

213 }

214

Core.php (https://github.com/tsnoad/Irondata.git) PHP · 291 lines

1 <?php

2

3 /**

4 * Core.php

5 *

6 * Contains the Core object.

119

120 /**

121 * This iterates through all the available options from the reports (index.php)

122 * page. If an option is not in this this or the user doesn't have permission to

123 * perform the action they will be directed to a permission denied screen.

135 $main = "";

136 if (!$_GET) {

137 include("help.php");

138 $main = $help;

139 $maintitle = "Welcome ".$_SESSION['displayname']."";

views.class.php (https://github.com/cjuarez/Come-en-Colima.git) PHP · 147 lines

1 <?php

2 /* ===========================

3

4 FlavorPHP - because php should have a better taste

5 homepage: http://www.flavorphp.com/

6 git repository: https://github.com/Axloters/FlavorPHP

7

8 FlavorPHP is a free software licensed under the MIT license

18 =========================== */

19 ?>

20 <?php

21

22 class views {

core.php (https://github.com/cookcrowd/Backend.git) PHP · 422 lines

1 <?php

2 namespace Zurv;

3

372 include $this->_template;

373 $render = ob_get_contents();

374 ob_end_clean();

375

376 return $render;

plugin.test.php (https://github.com/tsep/tsep1.git) PHP · 263 lines

7 * PHP versions 4 and 5

8 *

9 * CakePHP : Rapid Development Framework (http://cakephp.org)

10 * Copyright 2006-2010, Cake Software Foundation, Inc.

11 *

14 *

15 * @copyright Copyright 2006-2010, Cake Software Foundation, Inc.

16 * @link http://cakephp.org CakePHP Project

17 * @package cake

18 * @subpackage cake.tests.cases.console.libs.tasks

19 * @since CakePHP v 1.3.0

20 * @license MIT License (http://www.opensource.org/licenses/mit-license.php)

33 }

34

35 require_once CAKE . 'console' . DS . 'libs' . DS . 'tasks' . DS . 'plugin.php';

36 require_once CAKE . 'console' . DS . 'libs' . DS . 'tasks' . DS . 'model.php';

unicode.php (https://github.com/mcrider/pkpUpgradeTestSuite.git) PHP · 269 lines

1 <?php

2 /**

3 * @version $Id: unicode.php,v 1.1 2008/10/10 20:52:53 mj Exp $

8 * Portions created by the Initial Developer are Copyright (C) 1998

9 * the Initial Developer. All Rights Reserved.

10 * Ported to PHP by Henri Sivonen (http://hsivonen.iki.fi)

11 * Slight modifications to fit with phputf8 library by Harry Fuecks (hfuecks gmail com)

12 * @see http://lxr.mozilla.org/seamonkey/source/intl/uconv/src/nsUTF8ToUnicode.cpp

13 * @see http://lxr.mozilla.org/seamonkey/source/intl/uconv/src/nsUnicodeToUTF8.cpp

14 * @see http://hsivonen.iki.fi/php-utf8/

15 * @package utf8

16 * @subpackage unicode

24 * are not allowed.

25 * Returns false if the input string isn't a valid UTF-8 octet sequence

26 * and raises a PHP error at level E_USER_WARNING

27 * Note: this function has been modified slightly in this library to

28 * trigger errors on encountering bad bytes

index.php (https://github.com/cybernet/CyBerFuN-xBTiT.git) PHP · 94 lines

1 <?php

2 ob_start();

3 if ($CURUSER["uid"] > 1)

10 <table class=lista width="474" align="center">

11 <tr>

12 <td class=header align=center width="26"><?php echo $language["OPTION"] ?></td>

13 <td class=header align=center width="319"><?php echo $language["WHAT_ABOUT"] ?></td>

14 <td class=header align=center width="41"><?php echo $language["POINTS"] ?></td>

15 <td class=header align=center width="62"><?php echo $language["EXCHANGE"] ?> </td>

16 </tr>

17 <?php

18 $uid=$CURUSER['uid'];

19 $r=do_sqlquery("SELECT * from {$TABLE_PREFIX}users where id=$uid");

Template.php (https://github.com/clamz/chemin-du-son.git) PHP · 323 lines

1 <?php

2

3 /*

192 $count = 100;

193 while (ob_get_level() && --$count) {

194 ob_end_clean();

195 }

196

renderer.php (https://github.com/markn86/moodle.git) PHP · 173 lines

1 <?php

2 // This file is part of Moodle - http://moodle.org/

3 //

53 $form->display();

54 $html .= ob_get_contents();

55 ob_end_clean();

56

57 $this->page->requires->yui_module('moodle-report_eventlist-eventfilter', 'Y.M.report_eventlist.EventFilter.init',

114

115 if (isset($eventinformation['parentclass'])) {

116 $url = new moodle_url('eventdetail.php', array('eventname' => $eventinformation['parentclass']));

117 $html .= html_writer::tag('dt', get_string('parentevent', 'report_eventlist'));

118 $html .= html_writer::tag('dd', html_writer::link($url, $eventinformation['parentclass']));

template.php (https://github.com/amet17/webstar.git) PHP · 475 lines

1 <?php

2 /**

3 *

27

28 /**

29 * A hack to support __construct() on PHP 4

30 * Hint: descendant classes have no PHP4 class_name() constructors,

123

124 /**

125 * A hack to support __construct() on PHP 4

126 * Hint: descendant classes have no PHP4 class_name() constructors,

256 function load( $template ) {

257

258 $templateFileName = $this->getRoot().DS.$template.'.php';

259

260 if (!is_file($templateFileName)) {

view.php (https://bitbucket.org/tumivn/phpexamples.git) PHP · 437 lines

1 <?php

2 /**

3 *

4 * @View Class

5 *

6 * @copyright Copyright (C) 2009 PHPRO.ORG. All rights reserved.

7 *

8 * @license new bsd http://www.opensource.org/licenses/bsd-license.php

176 include($template_file);

177 $output = ob_get_contents();

178 ob_end_clean();

179 }

180 else

ExportToValue.php (https://bitbucket.org/gfelizola/pacaembu-institucional.git) PHP · 270 lines

1 <?php

2 /*

3 "Contact Form to Database" Copyright (C) 2011-2012 Michael Simpson (email : michael.d.simpson@gmail.com)

20 */

21

22 require_once('ExportBase.php');

23 require_once('CFDBExport.php');

248 }

249 $output = ob_get_contents();

250 ob_end_clean();

251 // If called from a shortcode, need to return the text,

252 // otherwise it can appear out of order on the page

dumper.php (https://github.com/quarkness/piwik.git) PHP · 360 lines

1 <?php

2 /**

3 * base include file for SimpleTest

4 * @package SimpleTest

5 * @subpackage UnitTester

6 * @version $Id: dumper.php 1723 2008-04-08 00:34:10Z lastcraft $

7 */

8 /**

354 print_r($variable);

355 $formatted = ob_get_contents();

356 ob_end_clean();

357 return $formatted;

358 }

task_test.php (https://github.com/markn86/moodle.git) PHP · 237 lines

1 <?php

2 // This file is part of Moodle - http://moodle.org/

3 //

24

25 defined('MOODLE_INTERNAL') || die();

26 require_once('data_privacy_testcase.php');

27

28 use tool_dataprivacy\api;

233 $task = \core\task\manager::get_scheduled_task($task);

234 $task->execute();

235 ob_end_clean();

236 }

237 }

Ajax.php (https://gitlab.com/che234/adn) PHP · 183 lines

1 <?php

2 /**

3 * @version $Id: Ajax.php 10831 2013-05-29 19:32:17Z btowles $

69 set_exception_handler(array('RokCommon_Ajax', 'exception_handler'));

70

71 while (@ob_end_clean()) ; // clean any pending output buffers

72 ob_start(); // start a fresh one

73

133 echo "ERROR [$errno] $errstr\n";

134 echo " Fatal error on line $errline in file $errfile";

135 echo ", PHP " . PHP_VERSION . " (" . PHP_OS . ")\n";

136 echo "Aborting...\n";

137 exit(1);

151 }

152

153 /* Don't execute PHP internal error handler */

154 return true;

155 }

dumper.php (https://github.com/greevex/mzz-framework-blank-application.git) PHP · 360 lines

1 <?php

2 /**

3 * base include file for SimpleTest

4 * @package SimpleTest

5 * @subpackage UnitTester

6 * @version $Id: dumper.php 2460 2008-04-08 21:03:22Z mz $

7 */

8 /**

354 print_r($variable);

355 $formatted = ob_get_contents();

356 ob_end_clean();

357 return $formatted;

358 }

bloggers.php (https://bitbucket.org/pastor399/newcastleunifc.git) PHP · 79 lines

8 * is derivative of works licensed under the GNU General Public License or

9 * other free or open source software licenses.

10 * See COPYRIGHT.php for copyright notices and details.

11 */

12 defined('_JEXEC') or die('Restricted access');

18 function fetchElement($name, $value, &$node, $control_name)

19 {

20 require_once( JPATH_ROOT . DIRECTORY_SEPARATOR . 'components' . DIRECTORY_SEPARATOR . 'com_easyblog' . DIRECTORY_SEPARATOR . 'constants.php' );

21 require_once( EBLOG_HELPERS . DIRECTORY_SEPARATOR . 'helper.php' );

56 ob_start();

57 ?>

58 <select name="<?php echo $control_name;?>[<?php echo $name;?>]">

59 <option value="0"<?php echo $value == 0 ? ' selected="selected"' :'';?>><?php echo JText::_('Select a blogger');?></option>

66 $selected = $blogger->id == $value ? ' selected="selected"' : '';

67 ?>

68 <option value="<?php echo $blogger->id;?>"<?php echo $selected;?>><?php echo $blogger->name . ' (' . $blogger->username . ')'; ?></option>

69 <?php

Class.php (https://github.com/scy/val.git) PHP · 265 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: Class.php 24032 2011-05-10 21:08:20Z mabe $

21 */

22

24 * @see Zend_Cache_Core

25 */

26 require_once 'Zend/Cache/Core.php';

27

28

232 $this->save($data, $id, $this->_tags, $this->_specificLifetime, $this->_priority);

233 } catch (Exception $e) {

234 ob_end_clean();

235 throw $e;

236 }

ajaxlib.php (https://github.com/markn86/moodle.git) PHP · 82 lines

1 <?php

2 // This file is part of Moodle - http://moodle.org/

3 //

25

26 /**

27 * You need to call this function if you wish to use the set_user_preference method in javascript_static.php, to white-list the

28 * preference you want to update from JavaScript, and to specify the type of cleaning you expect to be done on values.

29 *

67 // Retrieve the output - there should be none.

68 $output = ob_get_contents();

69 ob_end_clean();

70

71 if (!empty($output)) {

Route.php (https://gitlab.com/sulistiana/api-mrbn) PHP · 357 lines

1 <?php

2 /**

3 * Slim Framework (http://slimframework.com)

4 *

5 * @link https://github.com/slimphp/Slim

6 * @copyright Copyright (c) 2011-2016 Josh Lockhart

7 * @license https://github.com/slimphp/Slim/blob/3.x/LICENSE.md (MIT License)

326 $output = ob_get_clean();

327 } catch (Exception $e) {

328 ob_end_clean();

329 throw $e;

330 }

344 if ($this->outputBuffering === 'prepend') {

345 // prepend output buffer content

346 $body = new Http\Body(fopen('php://temp', 'r+'));

347 $body->write($output . $response->getBody());

348 $response = $response->withBody($body);

Spawn.php (https://github.com/Spawnm/Spawn-Framework.git) PHP · 201 lines

1 <?php

2 /**

3 * Spawn Framework

40

41 /**

42 * load bootstrap.php

43 */

44 public function bootstrap($di)

136

137 if(Config::load('Uri')->get('base') != $base) {

138 $config = include(ROOT_PATH.'Bin/Config/Uri.php');

139

140 $config['base'] = $base;

141 Config::load('Uri')->set('base',$base);

142

143 $data = '<?php '.PHP_EOL.'return $config = '.var_export($config, true).';';

144 file_put_contents(ROOT_PATH.'Bin/Config/Uri.php', $data);

ca039f4b8d9ec9dadbda9a728bcd.php (https://github.com/fabiorestrepo/PGE.git) PHP · 190 lines

1 <?php

2

3 /* WebProfilerBundle:Collector:events.html.twig */

171 }

172 } catch(Exception $e) {

173 ob_end_clean();

174

175 throw $e;

cache.class.php (https://bitbucket.org/AliGH/ghsaffron.git) PHP · 85 lines

1 <?php

2

3 /* ===================================

57 public function end() {

58 $buffer = ob_get_contents();

59 ob_end_clean();

60

61 $this->cache_on and $this->write($buffer);

libgd00100.php (https://github.com/tstarling/hiphop-php.git) PHP · 109 lines

1 <?php

2 $im = imagecreatetruecolor(256, 256);

3

102 imagepng($im);

103 $png = ob_get_contents();

104 ob_end_clean();

105

106 echo md5($png);

notifications_test.php (https://github.com/kordan/moodle.git) PHP · 271 lines

1 <?php

2 // This file is part of Moodle - http://moodle.org/

3 //

45 $this->runAdhocTasks('\core\task\send_login_notifications');

46 $output = ob_get_contents();

47 ob_end_clean();

48 $messages = $sink->get_messages();

49 $sink->close();

75 $this->runAdhocTasks('\core\task\send_login_notifications');

76 $output = ob_get_contents();

77 ob_end_clean();

78 $messages = $sink->get_messages();

79 $sink->close();

104 $this->runAdhocTasks('\core\task\send_login_notifications');

105 $output = ob_get_contents();

106 ob_end_clean();

107 $messages = $sink->get_messages();

108 $sink->close();

kunena.karma.php (https://github.com/rich20/Kunena-1.6.git) PHP · 199 lines

1 <?php

2 /**

3 * @version $Id$

50 <td>

51 <center>

52 <?php

53 //This checks:

54 // - if the karma function is activated by the admin

65 $this->_app->enqueueMessage ( JText::_ ( 'COM_KUNENA_ERROR_TOKEN' ), 'error' );

66 if ($pid) {

67 while (@ob_end_clean());

68 $kunena_app->redirect ( CKunenaLink::GetLatestPageAutoRedirectURL ( $pid, $kunena_config->messages_per_page, $catid) );

69 } else {

70 while (@ob_end_clean());

71 $kunena_app->redirect ( CKunenaLink::GetMyProfileURL ( $userid) );

72 }

Class.php (https://github.com/ftaiolivista/Zend-Framework-Namespaced-.git) PHP · 265 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: Class.php 23051 2010-10-07 17:01:21Z mabe $

21 */

22

30 * @see Zend_Cache_Core

31 */

32 require_once 'Zend/Cache/Core.php';

33

34

232 $this->save($data, $id, $this->_tags, $this->_specificLifetime, $this->_priority);

233 } catch (\Exception $e) {

234 ob_end_clean();

235 throw $e;

236 }

authlib_test.php (https://bitbucket.org/kudutest1/moodlegit.git) PHP · 194 lines

1 <?php

2 // This file is part of Moodle - http://moodle.org/

3 //

19 *

20 * @package core_auth

21 * @category phpunit

22 * @copyright 2012 Petr Skoda {@link http://skodak.org}

23 * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later

33 public function test_lockout() {

34 global $CFG;

35 require_once("$CFG->libdir/authlib.php");

36

37 $this->resetAfterTest();

178 ob_start(); // Prevent nomailever notice.

179 $result = authenticate_user_login('username1', 'nopass', false, $reason);

180 ob_end_clean();

181 $this->assertFalse($result);

182 $this->assertEquals(AUTH_LOGIN_FAILED, $reason);

home.php (https://github.com/essa/sharetronix_ja.git) PHP · 134 lines

1 <?php

2

3 if( $this->user->is_logged ) {

5 }

6

7 $this->load_langfile('inside/global.php');

8 $this->load_langfile('outside/global.php');

9 $this->load_langfile('inside/dashboard.php');

10 $this->load_langfile('outside/home.php');

92 $D->parsedpost_attfile_maxlen -= 12;

93 }

94 $this->load_template('single_post.php');

95 }

96 unset($D->p);

teamblogs.php (https://bitbucket.org/pastor399/newcastleunifc.git) PHP · 62 lines

8 * is derivative of works licensed under the GNU General Public License or

9 * other free or open source software licenses.

10 * See COPYRIGHT.php for copyright notices and details.

11 */

12 defined('_JEXEC') or die('Restricted access');

18 function fetchElement($name, $value, &$node, $control_name)

19 {

20 require_once( JPATH_ROOT . DIRECTORY_SEPARATOR . 'components' . DIRECTORY_SEPARATOR . 'com_easyblog' . DIRECTORY_SEPARATOR . 'constants.php' );

21 require_once( EBLOG_HELPERS . DIRECTORY_SEPARATOR . 'helper.php' );

39 ob_start();

40 ?>

41 <select name="<?php echo $control_name;?>[<?php echo $name;?>]">

42 <option value="0"<?php echo $value == 0 ? ' selected="selected"' :'';?>><?php echo JText::_('Select a team');?></option>

49 $selected = $team->id == $value ? ' selected="selected"' : '';

50 ?>

51 <option value="<?php echo $team->id;?>"<?php echo $selected;?>><?php echo '(' . $team->id . ') ' . $team->title; ?></option>

52 <?php

view.php (https://github.com/dimkalinux/punbb_extensions.git) PHP · 344 lines

1 <?php

2 /**

3 * Acts as an object wrapper for HTML pages with embedded PHP, called "views".

9 * @author Kohana Team

10 * @copyright (c) 2008-2009 Kohana Team

11 * @license http://kohanaphp.com/license

12 */

13 class Kohana_View {

64 // {

65 // Delete the output buffer

66 // ob_end_clean();

67

68 // Re-throw the exception

194 * isset($view->foo);

195 *

196 * [!!] `NULL` variables are not considered to be set by [isset](http://php.net/isset).

197 *

198 * @param string variable name

StatusCheckTest.php (https://gitlab.com/axeltizon/magento-demopoweraccess) PHP · 108 lines

1 <?php

2 /**

3 * Copyright © 2016 Magento. All rights reserved.

6 namespace Magento\Update;

7

8 class StatusCheckTest extends \PHPUnit_Framework_TestCase

9 {

10 const REQUEST_TYPE_AJAX = 'ajax';

27 protected function setUp()

28 {

29 $this->indexScript = UPDATER_BP . '/index.php';

30 $this->status = new \Magento\Update\Status();

31 $this->status->clear();

89

90 /**

91 * Return response of index.php, according to the request type

92 *

93 * @param string|null $requestType

dumper.php (https://github.com/kugu/limb.git) PHP · 360 lines

1 <?php

2 /**

3 * base include file for SimpleTest

4 * @package SimpleTest

5 * @subpackage UnitTester

6 * @version $Id: dumper.php 7198 2008-11-01 11:57:17Z korchasa $

7 */

8 /**

354 print_r($variable);

355 $formatted = ob_get_contents();

356 ob_end_clean();

357 return $formatted;

358 }

Renderer.php (https://gitlab.com/szlongshu/manaphp) PHP · 174 lines

20 public function __construct()

21 {

22 $this->_registeredEngines['.phtml'] = 'ManaPHP\Mvc\View\Renderer\Engine\Php';

23 $this->_registeredEngines['.tpl'] = 'ManaPHP\Mvc\View\Renderer\Engine\Smarty';

30 * @return \ManaPHP\Mvc\View\Renderer\EngineInterface

31 * @throws \ManaPHP\Mvc\View\Renderer\Exception

32 */

33 protected function _loadEngine($extension)

42

43 if (!$engine instanceof EngineInterface) {

44 throw new Exception('Invalid template engine: it is not implements \ManaPHP\Mvc\Renderer\EngineInterface');

45 }

46

146 *<code>

147 *$renderer->registerEngines(array(

148 * ".phtml" => "ManaPHP\Mvc\View\Renderer\Engine\Php",

149 * ".html" => "ManaPHP\Mvc\View\Renderer\Engine\Html",

Roam.php (https://github.com/tjeastmond/Rome-CMS.git) PHP · 191 lines

1 <?php

2

3 class Roam

58

59 static public function classNameToFileName($className) {

60 return str_replace('_', '/', $className) . '.php';

61 }

62

88

89 static public function render($file, array $elements = array(), $layout = 'layout', $noLayout = false) {

90 $content = self::_output(self::viewsPath() . $file . '.php', $elements);

91 print ($noLayout)? $content : self::_output(

92 self::layoutPath() . $layout . '.php',

96

97 static public function partial($file, array $elements = array()) {

98 return self::_output(self::viewsPath() . $file . '.php', $elements);

99 }

100

template_class.php (https://github.com/sseshachala/Open-Web-Analytics.git) PHP · 201 lines

1 <?php

2

3 //

109 include($file); // Include the file

110 $contents = ob_get_contents(); // Get the contents of the buffer

111 ob_end_clean(); // End buffering and discard

112 return $contents; // Return the contents

113 }

admin-css-js-in.inc.php (https://gitlab.com/Gashler/dp) PHP · 120 lines

1 <?php

2 /**

3 * Administrative CSS/JS for menu pages (inner processing routines).

52 header("Pragma: no-cache");

53

54 while (@ob_end_clean ()); // Clean any existing output buffers.

55

56 $u = $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["dir_url"];

95 header("Pragma: no-cache");

96

97 while (@ob_end_clean ()); // Clean any existing output buffers.

98

99 $u = $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["dir_url"];

dynamic-cache-test.php (https://github.com/chopsuei3/oscc.git) PHP · 113 lines

1 <?php

2

3 /*

64 // See dynamic_output_buffer_test_safety() for an example. You must add this

65 // to avoid the following error:

66 // "PHP Fatal error: ob_start(): Cannot use output buffering in output buffering display handlers in..."

67 //

68 // Steps to run example plugin:

79 echo "<p>This is a test. The current time on the server is: " . date( 'H:i:s' ) . "</p>";

80 $text = ob_get_contents();

81 ob_end_clean();

82

83 if ( $cachedata === 0 ) // called directly from the theme so store the output

84 define( 'DYNAMIC_OB_TEXT', $text );

85 else // called via the wpsc_cachedata filter. We only get here in cached pages in wp-cache-phase1.php

86 return str_replace( DYNAMIC_OUTPUT_BUFFER_TAG, $text, $cachedata );

87

DiffFormatter.php (https://gitlab.com/mohamed_hussein/prodt) PHP · 197 lines

1 <?php

2

3 namespace Drupal\Component\Diff;

147 protected function _end_diff() {

148 $val = ob_get_contents();

149 ob_end_clean();

150 return $val;

151 }

renderer.php (https://github.com/vadimonus/moodle.git) PHP · 175 lines

1 <?php

2 // This file is part of Moodle - http://moodle.org/

3 //

54 $form->display();

55 $html .= ob_get_contents();

56 ob_end_clean();

57

58 $PAGE->requires->yui_module('moodle-report_eventlist-eventfilter', 'Y.M.report_eventlist.EventFilter.init',

116

117 if (isset($eventinformation['parentclass'])) {

118 $url = new moodle_url('eventdetail.php', array('eventname' => $eventinformation['parentclass']));

119 $html .= html_writer::tag('dt', get_string('parentevent', 'report_eventlist'));

120 $html .= html_writer::tag('dd', html_writer::link($url, $eventinformation['parentclass']));

View.php (https://bitbucket.org/alexpozdnyakov/kohana.git) PHP · 351 lines

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

2 /**

3 * Acts as an object wrapper for HTML pages with embedded PHP, called "views".

64 {

65 // Delete the output buffer

66 ob_end_clean();

67

68 // Re-throw the exception

193 * isset($view->foo);

194 *

195 * [!!] `NULL` variables are not considered to be set by [isset](http://php.net/isset).

196 *

197 * @param string $key variable name

Function.php (https://github.com/anathor/SilverStripeCantabileMusic.git) PHP · 130 lines

1 <?php

2 /**

3 * Zend Framework

24 * @see Zend_Cache_Core

25 */

26 require_once 'Zend/Cache/Core.php';

27

28

101 $return = call_user_func_array($name, $parameters);

102 $output = ob_get_contents();

103 ob_end_clean();

104 $data = array($output, $return);

105 $this->save($data, $id, $tags, $specificLifetime, $priority);

ezsoapserver.php (https://bitbucket.org/ericsagnes/ezpublish-multisite.git) PHP · 231 lines

1 <?php

2 /**

3 * File containing the eZSOAPServer class.

10

11 /*!

12 \class eZSOAPServer ezsoapserver.php

13 \ingroup eZSOAP

14 \brief The class eZSOAPServer handles SOAP server requensts

72

73 if ( ob_get_length() )

74 ob_end_clean();

75

76 print( $payload );

OutputTestCase.php (https://github.com/quimateur/SIFO.git) PHP · 211 lines

45 */

46

47 require_once 'PHPUnit/Framework.php';

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

49

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

51

52 /**

54 *

55 * @category Testing

56 * @package PHPUnit

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

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

62 * @since Class available since Release 3.0.0

63 */

64 abstract class PHPUnit_Extensions_OutputTestCase extends PHPUnit_Framework_TestCase

65 {

66 /**

function.ob-get-length.html (https://bitbucket.org/thncr/manuals.git) HTML · 80 lines

10 <div class="next" style="text-align: right; float: right;"><a href="function.ob-get-level.html">ob_get_level</a></div>

11 <div class="up"><a href="ref.outcontrol.html">Output Control 函数</a></div>

12 <div class="home"><a href="index.html">PHP Manual</a></div>

13 </div><hr /><div id="function.ob-get-length" class="refentry">

14 <div class="refnamediv">

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

16 <p class="verinfo">(PHP 4 &gt;= 4.0.2, PHP 5)</p><p class="refpurpose"><span class="refname">ob_get_length</span> &mdash; <span class="dc-title">返回输出缓冲区内容的长度</span></p>

17

18 </div>

47 <div class="phpcode"><code><span style="color: #000000">

48 <span style="color: #0000BB">&lt;?php<br /><br />ob_start</span><span style="color: #007700">();<br /><br />echo&nbsp;</span><span style="color: #DD0000">"Hello&nbsp;"</span><span style="color: #007700">;<br /><br /></span><span style="color: #0000BB">$len1&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">ob_get_length</span><span style="color: #007700">();<br /><br />echo&nbsp;</span><span style="color: #DD0000">"World"</span><span style="color: #007700">;<br /><br /></span><span style="color: #0000BB">$len2&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">ob_get_length</span><span style="color: #007700">();<br /><br /></span><span style="color: #0000BB">ob_end_clean</span><span style="color: #007700">();<br /><br />echo&nbsp;</span><span style="color: #0000BB">$len1&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #DD0000">",&nbsp;."&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">$len2</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">?&gt;</span>

49 </span>

50 </code></div>

77 <div class="next" style="text-align: right; float: right;"><a href="function.ob-get-level.html">ob_get_level</a></div>

78 <div class="up"><a href="ref.outcontrol.html">Output Control 函数</a></div>

79 <div class="home"><a href="index.html">PHP Manual</a></div>

80 </div></body></html>

81

Class.php (https://gitlab.com/Ltaimao/wecenter) PHP · 275 lines

1 <?php

2 /**

3 * Zend Framework

24 * @see Zend_Cache_Core

25 */

26 //require_once 'Zend/Cache/Core.php';

27

28

243 );

244 } catch (Exception $e) {

245 ob_end_clean();

246 throw $e;

247 }

StoryTestCase.php (https://github.com/ewandor/horde.git) PHP · 177 lines

1 <?php

2 /**

3 * Base for scenario based testing of this package.

4 *

5 * PHP version 5

6 *

7 * @category Kolab

10 * @author Gunnar Wrobel <wrobel@pardus.de>

11 * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1

12 * @link http://pear.horde.org/index.php?package=Kolab_Filter

13 */

14

26 * @author Gunnar Wrobel <wrobel@pardus.de>

27 * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1

28 * @link http://pear.horde.org/index.php?package=Kolab_Filter

29 */

30 class Horde_Kolab_Filter_StoryTestCase

Class.php (https://gitlab.com/rsilveira1987/Expresso) PHP · 275 lines

1 <?php

2 /**

3 * Zend Framework

24 * @see Zend_Cache_Core

25 */

26 require_once 'Zend/Cache/Core.php';

27

28

243 );

244 } catch (Exception $e) {

245 ob_end_clean();

246 throw $e;

247 }

Class.php (https://gitlab.com/yousafsyed/easternglamor) PHP · 275 lines

1 <?php

2 /**

3 * Zend Framework

24 * @see Zend_Cache_Core

25 */

26 #require_once 'Zend/Cache/Core.php';

27

28

243 );

244 } catch (Exception $e) {

245 ob_end_clean();

246 throw $e;

247 }

AssetDispatcherTest.php (https://gitlab.com/manuperazafa/elsartenbackend) PHP · 219 lines

1 <?php

2 /**

3 * CakePHP(tm) Tests <http://book.cakephp.org/view/1196/Testing>

4 * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)

5 *

9 *

10 * @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)

11 * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests

12 * @package Cake.Test.Case.Routing.Filter

13 * @since CakePHP(tm) v 2.2

14 * @license http://www.opensource.org/licenses/mit-license.php MIT License

15 */

16

140 ob_start();

141 $this->assertSame($response, $filter->beforeDispatch($event));

142 ob_end_clean();

143 $this->assertEquals(200, $response->statusCode());

144 $this->assertEquals($time->format('D, j M Y H:i:s') . ' GMT', $response->modified());

callback.php (https://github.com/pacoqueen/callao_chico.git) PHP · 165 lines

1 <?php

2 /**

3 * @version $Id: callback.php 19705 2010-11-30 18:29:50Z chdemko $

28 *

29 * The callback definition can be in several forms:

30 * - Standard PHP Callback array <http://php.net/callback> [recommended]

31 * - Function name as a string eg. 'foo' for function foo()

32 * - Static method name as a string eg. 'MyClass::myMethod' for method myMethod() of class MyClass

60 // Normalize callback

61 if (is_array($callback)) {

62 // We have a standard php callback array -- do nothing

63 } elseif (strstr($callback, '::')) {

64 // This is shorthand for a static method callback classname::methodname

69 * This is a really not so smart way of doing this... we provide this for backward compatability but this

70 * WILL! disappear in a future version. If you are using this syntax change your code to use the standard

71 * PHP callback array syntax: <http://php.net/callback>

72 *

73 * We have to use some silly global notation to pull it off and this is very unreliable

Template.php (https://gitlab.com/trungthao379/phpmyadmin) PHP · 166 lines

1 <?php

2 /* vim: set expandtab sw=4 ts=4 sts=4: */

3 /**

160 return $content;

161 } catch (\LogicException $e) {

162 ob_end_clean();

163 throw new \LogicException($e->getMessage());

164 }

walker_menubar_start_el.php (https://gitlab.com/relacilia/cakra) PHP · 112 lines

1 <?php

2 function walker_menubar_start_el( $item_output, $item, $depth, $args ){

3 global $wp_registered_widgets, $wp_registered_sidebars;

86

87 $menubar_widgets_output .= ob_get_contents();

88 ob_end_clean();

89 }

90

model.test.php (https://github.com/geeknbar/projet-tut-site-web.git) PHP · 109 lines

1 <?php

2 /* SVN FILE: $Id$ */

3 /**

8 * PHP versions 4 and 5

9 *

10 * CakePHP : Rapid Development Framework (http://cakephp.org)

11 * Copyright 2006-2010, Cake Software Foundation, Inc.

12 *

15 *

16 * @copyright Copyright 2006-2010, Cake Software Foundation, Inc.

17 * @link http://cakefoundation.org/projects/info/cakephp CakePHP Project

18 * @package cake

19 * @subpackage cake.tests.cases.console.libs.tasks

20 * @since CakePHP v 1.2.6

21 * @license http://www.opensource.org/licenses/mit-license.php The MIT License

error.php (https://github.com/Keilaron/TweetBeagle.git) PHP · 236 lines

1 <?php

2 /**

3 * Fuel is a fast, lightweight, community driven PHP5 framework.

8 * @license MIT License

9 * @copyright 2010 - 2011 Fuel Development Team

10 * @link http://fuelphp.com

11 */

12

40

41 /**

42 * Native PHP shutdown handler

43 *

44 * @return string

56 if ((\Fuel::$is_cli) || (\Fuel::$env != Fuel::PRODUCTION))

57 {

58 static::show_php_error(new \ErrorException($last_error['message'], $last_error['type'], 0, $last_error['file'], $last_error['line']));

59 }

60 else

insert-update-user.php (https://github.com/Doap/Janrain-Sample-Code.git) PHP · 116 lines

1 <?php

2 ob_start();

3 $debug = array();

112 }

113 $json = json_encode($out_array);

114 ob_end_clean();

115 echo $json;

116 ?>

Route.php (https://gitlab.com/mlassabe/LASSABE) PHP · 381 lines

1 <?php

2 /**

3 * Slim Framework (http://slimframework.com)

4 *

5 * @link https://github.com/slimphp/Slim

6 * @copyright Copyright (c) 2011-2016 Josh Lockhart

7 * @license https://github.com/slimphp/Slim/blob/3.x/LICENSE.md (MIT License)

346 // @codeCoverageIgnoreStart

347 } catch (Throwable $e) {

348 ob_end_clean();

349 throw $e;

350 // @codeCoverageIgnoreEnd

351 } catch (Exception $e) {

352 ob_end_clean();

353 throw $e;

354 }

modscript.class.php (https://github.com/christianhanvey/revolution.git) PHP · 176 lines

1 <?php

2 /**

3 * @package modx

4 */

5 /**

6 * An element representing executable PHP script content.

7 *

8 * {@inheritdoc}

38 if (strncmp($v, '<?', 2) == 0) {

39 $v= substr($v, 2);

40 if (strncmp($v, 'php', 3) == 0) $v= substr($v, 3);

41 }

42 if (substr($v, -2, 2) == '?>') $v= substr($v, 0, -2);

66 $this->_output= $scriptName($this->_properties);

67 $this->_output= ob_get_contents() . $this->_output;

68 ob_end_clean();

69 if ($this->_output && is_string($this->_output)) {

70 /* collect element tags in the evaluated content and process them */

Exceptions.php (https://bitbucket.org/tdevonshire/guinness-jazz-festival.git) PHP · 178 lines

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

2 /**

3 * CodeIgniter

4 *

5 * An open source application development framework for PHP 5.2.4 or newer

6 *

7 * @package CodeIgniter

63 * Exception Logger

64 *

65 * This function logs PHP generated error messages

66 *

67 * @access private

165 }

166 ob_start();

167 include(APPPATH.'errors/error_php.php');

168 $buffer = ob_get_contents();

169 ob_end_clean();

class.jetpack-json-api-plugins-modify-endpoint.php (https://gitlab.com/hunt9310/ras) PHP · 191 lines

1 <?php

2

3 class Jetpack_JSON_API_Plugins_Modify_Endpoint extends Jetpack_JSON_API_Plugins_Endpoint {

130 ob_start();

131 wp_update_plugins(); // Check for Plugin updates

132 ob_end_clean();

133

134 $update_plugins = get_site_transient( 'update_plugins' );

142 $update_attempted = false;

143

144 include_once ABSPATH . 'wp-admin/includes/class-wp-upgrader.php';

145

146 // unhook this functions that output things before we send our response header.

phpThumb.php (https://bitbucket.org/rossberenson/michael-karas.git) PHP · 118 lines

1 <?php

2 ob_start();

3 //use wp-load. Normally right here, but if it's not...

4 if( file_exists('../../../../../wp-load.php')){

5 require_once('../../../../../wp-load.php');

6 $loaded = true;

7 } elseif( file_exists( dirname(__FILE__).'/../../mf-config.php')){

8 include_once(dirname(__FILE__).'/../../mf-config.php');

14

15 if($loaded !== true){

16 die('Could not load wp-load.php, edit/add mf-config.php and define MF_WP_LOAD to point to a valid wp-load file');

17 }

18 ob_end_clean();

testoutputlib.php (https://github.com/nigeldaley/moodle.git) PHP · 165 lines

1 <?php

2

3 // This file is part of Moodle - http://moodle.org/

18

19 /**

20 * Unit tests for (some of) ../outputlib.php.

21 *

22 * @package moodlecore

28 die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page

29 }

30 require_once($CFG->libdir . '/outputlib.php');

31

32

35 *

36 * These tests assume that developer debug mode is on, which, at the time of

37 * writing, is true. admin/tool/unittest/index.php forces it on.

38 *

39 * @copyright 2009 Tim Hunt

view.php (https://github.com/letuboy/SwiftSharing-Core.git) PHP · 362 lines

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

2 /**

3 * Acts as an object wrapper for HTML pages with embedded PHP, called "views".

64 {

65 // Delete the output buffer

66 ob_end_clean();

67

68 // Re-throw the exception

193 * isset($view->foo);

194 *

195 * [!!] `NULL` variables are not considered to be set by [isset](http://php.net/isset).

196 *

197 * @param string variable name

ajax.php (https://github.com/tekimaki/boards.git) PHP · 102 lines

1 <?php

2 /**

3 * AJAX Function Call Stuff

14 * required setup

15 */

16 require_once( '../kernel/setup_inc.php' );

17

18 // Is package installed and enabled

67 if ($l>0) {

68 $body = ob_get_contents();

69 ob_end_clean();

70 }

71 static $sent=false;

72 if (!$sent) {

73 header("HTTP/1.0 500 Internal Server Error");

74 echo "<h1>PHP Exception</h1>";

75 $sent=true;

76 }

FormErrorsTest.php (https://github.com/jtai/zf2.git) PHP · 161 lines

1 <?php

2 /**

3 * Zend Framework

25 namespace ZendTest\View\Helper;

26

27 use Zend\View\PhpRenderer as View,

28 Zend\View\Helper\FormErrors;

29

39 * @group Zend_View_Helper

40 */

41 class FormErrorsTest extends \PHPUnit_Framework_TestCase

42 {

43

64 public function tearDown()

65 {

66 ob_end_clean();

67 }

68

Class.php (https://github.com/MontmereLimited/ZendFramework-v1.git) PHP · 265 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: Class.php 24032 2011-05-10 21:08:20Z mabe $

21 */

22

24 * @see Zend_Cache_Core

25 */

26 // // // // // // // // require_once 'Zend/Cache/Core.php';

27

28

232 $this->save($data, $id, $this->_tags, $this->_specificLifetime, $this->_priority);

233 } catch (Exception $e) {

234 ob_end_clean();

235 throw $e;

236 }

head.php (https://bitbucket.org/stager94/skmz-joomla.git) PHP · 158 lines

1 <?php

2 /**

3 * @version $Id: head.php 14401 2010-01-26 14:10:00Z louis $

5 * @subpackage Document

6 * @copyright Copyright (C) 2005 - 2010 Open Source Matters. All rights reserved.

7 * @license GNU/GPL, see LICENSE.php

8 * Joomla! is free software. This version may have been modified pursuant

9 * to the GNU General Public License, and as distributed it includes or

10 * is derivative of works licensed under the GNU General Public License or

11 * other free or open source software licenses.

12 * See COPYRIGHT.php for copyright notices and details.

13 */

14

40

41 $contents = ob_get_contents();

42 ob_end_clean();

43

44 return $contents;

Abstract.php (https://github.com/shopaholiccompany/shopaholic.git) PHP · 332 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 */

293

294 if( $this instanceof Engine_Package_Installer_Module ) {

295 $manifestPath = APPLICATION_PATH . DIRECTORY_SEPARATOR . $path . DIRECTORY_SEPARATOR . 'settings' . DIRECTORY_SEPARATOR . 'manifest.php';

296 } else {

297 $manifestPath = APPLICATION_PATH . DIRECTORY_SEPARATOR . $path . DIRECTORY_SEPARATOR . 'manifest.php';

304 ob_start();

305 $config = include $manifestPath;

306 ob_end_clean();

307

308 if( isset($config['package']['version']) ) {

Template.php (https://github.com/geekbuntu/datadoesmore.git) PHP · 294 lines

1 <?php

2

3 /*

170 $this->display($context);

171 } catch (Exception $e) {

172 ob_end_clean();

173

174 throw $e;

DiactorosFactory.php (https://gitlab.com/reasonat/test8) PHP · 164 lines

1 <?php

2

3 /*

49 $body = new DiactorosStream($symfonyRequest->getContent(true));

50 } catch (\LogicException $e) {

51 $body = new DiactorosStream('php://temp', 'wb+');

52 $body->write($symfonyRequest->getContent());

53 }

123 $stream = new DiactorosStream($symfonyResponse->getFile()->getPathname(), 'r');

124 } else {

125 $stream = new DiactorosStream('php://temp', 'wb+');

126 if ($symfonyResponse instanceof StreamedResponse) {

127 ob_start(function ($buffer) use ($stream) {

132

133 $symfonyResponse->sendContent();

134 ob_end_clean();

135 } else {

136 $stream->write($symfonyResponse->getContent());

preview_external.php (https://bitbucket.org/selfeky/xclusivescardwebsite.git) PHP · 58 lines

1 <?php

2 defined('C5_EXECUTE') or die("Access Denied.");

3

29 $bv->render($b);

30 $blockHTML=ob_get_contents();

31 ob_end_clean();

32 $areasBlocksHTML[$previewBlockData['arHandle']][]= $blockHTML;

33 }

37

38 if (!function_exists('curl_init')) { ?>

39 <div><?php echo t('curl must be enabled to preview external themes.')?></div>

40 <?php }else{

template.test.php (https://github.com/tsep/tsep1.git) PHP · 189 lines

1 <?php

2 /**

3 * TemplateTask file

8 * PHP versions 4 and 5

9 *

10 * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)

11 * Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)

12 *

15 *

16 * @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)

17 * @link http://cakephp.org CakePHP(tm) Project

18 * @package cake

19 * @subpackage cake.tests.cases.console.libs.tasks

20 * @since CakePHP(tm) v 1.3

21 * @license MIT License (http://www.opensource.org/licenses/mit-license.php)

class.latestcommentmodule.php (https://github.com/ru4/arabbnota.git) PHP · 66 lines

1 <?php if (!defined('APPLICATION')) exit();

2

3 class LatestCommentModule extends Gdn_Module {

43 ?>

44 <div id="LatestComment" class="Box BoxLatestComment">

45 <h4><?php if($LatestOrMost == "YES") echo Gdn::Translate("Latest Commented"); else echo Gdn::Translate("Most Commented"); ?></h4>

46 <ul class="PanelInfo PanelLatestComment">

47 <?php

50 ?>

51 <li><span><strong>

52 <a href="/Discussion/<?php echo $Discussion->DiscussionID; ?>/<?php echo str_replace(" ", "-",$Discussion->Name); ?>"><?php echo $Discussion->Name; ?></a>

53 </span></strong></li>

54 <?php

58 </ul>

59 </div>

60 <?php

61 }

62 $String = ob_get_contents();

db_config.test.php (https://github.com/cgajardo/repositorium.git) PHP · 155 lines

1 <?php

2 /**

3 * DBConfigTask Test Case

5 * PHP versions 4 and 5

6 *

7 * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)

8 * Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)

9 *

12 *

13 * @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)

14 * @link http://cakephp.org CakePHP(tm) Project

15 * @package cake

16 * @subpackage cake.tests.cases.console.libs.tasks

17 * @since CakePHP(tm) v 1.3

18 * @license MIT License (http://www.opensource.org/licenses/mit-license.php)

class-wp-customize-panel.php (https://gitlab.com/darmawan.fatria/df-skp-2014) PHP · 333 lines

251 $this->maybe_render();

252 $template = trim( ob_get_contents() );

253 ob_end_clean();

254 return $template;

255 }

296 $classes = 'accordion-section control-section control-panel control-panel-' . $this->type;

297 ?>

298 <li id="accordion-panel-<?php echo esc_attr( $this->id ); ?>" class="<?php echo esc_attr( $classes ); ?>">

299 <h3 class="accordion-section-title" tabindex="0">

300 <?php echo esc_html( $this->title ); ?>

305 </ul>

306 </li>

307 <?php

308 }

309

Image.php (https://github.com/rocknoon/Stack.git) PHP · 293 lines

1 <?php

2 require_once 'Image/Processor.php';

3 require_once 'Image/Uploader.php';

4 require_once 'Image/Thumbnail.php';

46 readfile( $url );

47 $img = ob_get_contents();

48 ob_end_clean();

49 file_put_contents( $filePath , $img );

50 // $fp2=@fopen($filePath, $img) ;

ZF1.php (https://bitbucket.org/d1rk/codeception.git) PHP · 75 lines

1 <?php

2 namespace Codeception\Util\Connector;

3

56 ob_start();

57 $this->bootstrap->run();

58 ob_end_clean();

59

60 $this->zendRequest = $zendRequest;

Albums_Controller_Test.php (https://github.com/ffchung/gallery3.git) PHP · 74 lines

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

2 /**

3 * Gallery - a web based photo album viewer and editor

47 $album->reload();

48 $results = ob_get_contents();

49 ob_end_clean();

50

51 $this->assert_equal(json_encode(array("result" => "success")), $results);

Array.php (https://github.com/kervin/kyzstudio.git) PHP · 81 lines

1 <?php

2 /**

3 * Zend Framework

16 * @package Zend_Translate

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

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

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

20 */

22

23 /** Zend_Locale */

24 #require_once 'Zend/Locale.php';

25

26 /** Zend_Translate_Adapter */

27 #require_once 'Zend/Translate/Adapter.php';

28

29

send-ping.php (https://github.com/jedverity/m2m.git) PHP · 97 lines

1 <?php

2 add_action( 'pushpress_scheduled_ping', 'pushpress_send_ping', 10, 4 );

3 if ( !function_exists( 'pushpress_send_ping' ) ) {

48 $remote_opt['headers']['Content-Type'] .= '; charset=' . get_option( 'blog_charset' );

49

50 @load_template( ABSPATH . WPINC . '/feed-rss2.php' );

51 } elseif ( $feed_type == 'atom' ) {

52 do_action( 'pushpress_send_ping_atom' );

56 $remote_opt['headers']['Content-Type'] .= '; charset=' . get_option( 'blog_charset' );

57

58 @load_template( ABSPATH . WPINC . '/feed-atom.php' );

59 }

60

61 $remote_opt['body'] = ob_get_contents( );

62 ob_end_clean( );

63

64 // Figure out the signatur header if we have a secret on

ViewBlock.php (https://bitbucket.org/ManiAdil/jardinorient.git) PHP · 231 lines

1 <?php

2 /**

3 * PHP 5

4 *

5 * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)

6 * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)

7 *

10 *

11 * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)

12 * @link http://cakephp.org CakePHP(tm) Project

13 * @since CakePHP(tm) v2.1

14 * @license MIT License (http://www.opensource.org/licenses/mit-license.php)

15 */

16 /**

Class.php (https://github.com/frhumanes/PLM.git) PHP · 244 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: Class.php 20379 2010-01-18 14:40:57Z mabe $

21 */

22

24 * @see Zend_Cache_Core

25 */

26 require_once 'Zend/Cache/Core.php';

27

28

221 $return = call_user_func_array(array($this->_cachedEntity, $name), $parameters);

222 $output = ob_get_contents();

223 ob_end_clean();

224 $data = array($output, $return);

225 $this->save($data, $id, $this->_tags, $this->_specificLifetime, $this->_priority);

index.markdown (https://github.com/bf4/bf4.github.com.git) Markdown · 77 lines

49 <div id="content" class="narrowcolumn">

50

51 <?php if (have_posts()) : while (have_posts()) : the_post(); ?>

52 <div class="post-top">

53 <div class="post-title">

54 <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php if ( function_exists('the_title_attribute')) the_title_attribute(); else the_title(); ?>"><?php the_title(); ?></a></h2>

55 <h3>

56 Posted on : <?php the_time('d-m-Y') ?> | By : <span><?php the_author() ?></span> | In : <span class="post_cats"><?php the_category(', ') ?></span>

59 </div>

60

61 <h4><?php comments_number('0', '1', '%'); ?></h4>

62 </div>

63 <div class="post-page" id="post-<?php the_ID(); ?>">

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

1 <?php

2 /**

3 * @version $Id: callback.php 10707 2008-08-21 09:52:47Z eddieajau $

5 * @subpackage Cache

6 * @copyright Copyright (C) 2005 - 2008 Open Source Matters. All rights reserved.

7 * @license GNU/GPL, see LICENSE.php

8 * Joomla! is free software. This version may have been modified pursuant

9 * to the GNU General Public License, and as distributed it includes or

32 *

33 * The callback definition can be in several forms:

34 * - Standard PHP Callback array <http://php.net/callback> [recommended]

35 * - Function name as a string eg. 'foo' for function foo()

36 * - Static method name as a string eg. 'MyClass::myMethod' for method myMethod() of class MyClass

71 * This is a really not so smart way of doing this... we provide this for backward compatability but this

72 * WILL!!! disappear in a future version. If you are using this syntax change your code to use the standard

73 * PHP callback array syntax: <http://php.net/callback>

74 *

75 * We have to use some silly global notation to pull it off and this is very unreliable

register-in.inc.php (https://gitlab.com/Gashler/dp) PHP · 104 lines

1 <?php

2 /**

3 * Registration Links (inner processing routines).

44 if (!empty ($_GET["s2member_register"])) // If they're attempting to access the registration system.

45 {

46 while (@ob_end_clean ()); // Clean any existing output buffers.

47

48 $msg_503 = _x ('<strong>Your Link Expired:</strong><br />Please contact Support if you need assistance.', "s2member-front", "s2member");

db_config.test.php (https://github.com/motaheri/Coordino.git) PHP · 155 lines

1 <?php

2 /**

3 * DBConfigTask Test Case

5 * PHP versions 4 and 5

6 *

7 * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)

8 * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org)

9 *

12 *

13 * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org)

14 * @link http://cakephp.org CakePHP(tm) Project

15 * @package cake

16 * @subpackage cake.tests.cases.console.libs.tasks

17 * @since CakePHP(tm) v 1.3

18 * @license MIT License (http://www.opensource.org/licenses/mit-license.php)

Function.php (https://bitbucket.org/acidel/buykoala.git) PHP · 180 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: Function.php 22648 2010-07-20 14:43:27Z mabe $

21 */

22

25 * @see Zend_Cache_Core

26 */

27 #require_once 'Zend/Cache/Core.php';

28

29

106 $return = call_user_func_array($callback, $parameters);

107 $output = ob_get_contents();

108 ob_end_clean();

109 $data = array($output, $return);

110 $this->save($data, $id, $tags, $specificLifetime, $priority);

json.php (https://github.com/ciniki/core.git) PHP · 161 lines

1 <?php

2 //

3 // Description

4 // -----------

5 // The json.php file is the entry point for the API through the REST protocol.

6 //

7

8 //

9 // Initialize Ciniki by including the ciniki_api.php

10 //

11 $start_time = microtime(true);

17 ini_set('display_errors', 'off');

18 // loadMethod is required by all function to ensure the functions are dynamically loaded

19 require_once($ciniki_root . '/ciniki-mods/core/private/loadMethod.php');

20 require_once($ciniki_root . '/ciniki-mods/core/private/init.php');

BCGDrawJPG.php (https://bitbucket.org/unixcrab/colab-lims.git) PHP · 108 lines

1 <?php

2 /**

3 * BCGDrawJPG.php

10 * v2.1.0 8 nov 2009 Jean-Sébastien Goupil

11 *--------------------------------------------------------------------

12 * $Id: BCGDrawJPG.php,v 1.1 2009/11/09 04:14:37 jsgoupil Exp $

13 *--------------------------------------------------------------------

14 * Copyright (C) Jean-Sebastien Goupil

15 * http://www.barcodephp.com

16 */

17 include_once('BCGDraw.php');

72 imagejpeg($this->im, null, $this->quality);

73 $bin = ob_get_contents();

74 ob_end_clean();

75

76 $this->setInternalProperties($bin);

FormMultiCheckboxTest.php (https://bitbucket.org/Dal-Papa/is-340-publish-base.git) PHP · 156 lines

1 <?php

2 /**

3 * Zend Framework

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

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

20 * @version $Id: FormMultiCheckboxTest.php 24593 2012-01-05 20:35:02Z matthew $

21 */

22

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

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

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

26 }

27

28 require_once 'Zend/View/Helper/FormMultiCheckbox.php';

29 require_once 'Zend/View.php';

base.php (https://gitlab.com/wuhang2003/core) PHP · 184 lines

1 <?php

2 /**

3 * @author Bart Visscher <bartv@thisnet.nl>

173 $data = ob_get_contents();

174 } catch (\Exception $e) {

175 @ob_end_clean();

176 throw $e;

177 }

178 @ob_end_clean();

179

180 // Return data

connector.php (https://bitbucket.org/tdevonshire/guinness-jazz-festival.git) PHP · 104 lines

1 <?php

2 /*

3 * CKFinder

34 * define required constants

35 */

36 require_once "./constants.php";

37

38 // @ob_end_clean();

42 * we need this class in each call

43 */

44 require_once CKFINDER_CONNECTOR_LIB_DIR . "/CommandHandler/CommandHandlerBase.php";

45 /**

46 * singleton factory

47 */

48 require_once CKFINDER_CONNECTOR_LIB_DIR . "/Core/Factory.php";

49 /**

50 * utils class

ResultPrinterTest.php (https://github.com/Proudio-Interactive/pdepend.git) PHP · 173 lines

38 *

39 * @category QualityAssurance

40 * @package PHP_Depend

41 * @subpackage TextUI

42 * @author Manuel Pichler <mapi@pdepend.org>

63 * @covers PHP_Depend_TextUI_ResultPrinter

64 */

65 class PHP_Depend_TextUI_ResultPrinterTest extends PHP_Depend_AbstractTest

66 {

67 /**

77 $tokenizer->setSourceFile(__FILE__);

78

79 $printer = new PHP_Depend_TextUI_ResultPrinter();

80

81 ob_start();

153 {

154 // Create dummy objects

155 $method = new PHP_Depend_Code_Method('method');

156 $analyzer = new PHP_Depend_Metrics_ClassLevel_Analyzer();

Exceptions.php (https://github.com/dchill42/CodeIgniter.git) PHP · 192 lines

1 <?php

2 /**

3 * CodeIgniter

4 *

5 * An open source application development framework for PHP 5.2.4 or newer

6 *

7 * NOTICE OF LICENSE

81 * Exception Logger

82 *

83 * Logs PHP generated error messages

84 *

85 * @param int $severity Log level

181 }

182 ob_start();

183 include(VIEWPATH.'errors/error_php.php');

184 $buffer = ob_get_contents();

185 ob_end_clean();

ArrBDD.php (https://github.com/darkredz/ArrBDD.git) PHP · 267 lines

1 <?php

2 /**

3 * ArrBDD class file.

4 *

5 * @author Leng Sheng Hong <darkredz@gmail.com>

6 * @link http://www.doophp.com/arr-bdd

7 * @copyright Copyright &copy; 2011 Leng Sheng Hong

8 * @license http://www.doophp.com/license

11

12 /**

13 * ArrBDD - a simple BDD library utilizing PHP associative arrays and closures

14 *

15 * @author Leng Sheng Hong <darkredz@gmail.com>

94 $this->exportSubject($subject);

95 $content = ob_get_contents();

96 ob_end_clean();

97 $results['subject'] = $content;

98 }

testoutputlib.php (https://github.com/kpike/moodle.git) PHP · 165 lines

1 <?php

2

3 // This file is part of Moodle - http://moodle.org/

18

19 /**

20 * Unit tests for (some of) ../outputlib.php.

21 *

22 * @package moodlecore

28 die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page

29 }

30 require_once($CFG->libdir . '/outputlib.php');

31

32

35 *

36 * These tests assume that developer debug mode is on, which, at the time of

37 * writing, is true. admin/report/unittest/index.php forces it on.

38 *

39 * @copyright 2009 Tim Hunt

view.html.php (https://bitbucket.org/nathanphan/joomla_zjdonation_custom.git) PHP · 77 lines

1 <?php

2 /**

3 * @version $Id$

6 * @subpackage ZJ_Donation

7 * @copyright Copyright (C) 2008 - 2011 by Joomseller Solutions. All rights reserved.

8 * @license http://www.gnu.org/licenses/gpl-3.0.html GNU/GPL, SEE LICENSE.php

9 * This file may not be redistributed in whole or significant part.

10 */

38 $tmplpath = dirname(__FILE__).DS.'tmpl';

39 ob_start();

40 require_once($tmplpath.DS.'navigation.php');

41 $contents = ob_get_contents();

42 ob_end_clean();

55 JToolBarHelper::save();

56 JToolBarHelper::spacer();

57 JToolBarHelper::back(JText::_('Back'), 'index.php?option=com_zj_donation');

58

59 $tabs = &JPane::getInstance();

TestCase.php (https://github.com/ewandor/horde.git) PHP · 172 lines

1 <?php

2 /**

3 * Test base.

4 *

5 * PHP version 5

6 *

7 * @category Horde

10 * @author Gunnar Wrobel <wrobel@pardus.de>

11 * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1

12 * @link http://pear.horde.org/index.php?package=Components

13 */

14

26 * @author Gunnar Wrobel <wrobel@pardus.de>

27 * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1

28 * @link http://pear.horde.org/index.php?package=Components

29 */

30 class Components_TestCase

head.php (https://github.com/ot2sen/Molajo.git) PHP · 191 lines

1 <?php

2 /**

3 * @package Molajo

36 echo $this->fetchHead($this->_doc);

37 $buffer = ob_get_contents();

38 ob_end_clean();

39

40 return $buffer;

common.inc.php (https://github.com/r-kitaev/limb.git) PHP · 199 lines

1 <?php

2 /*

3 * Limb PHP Framework

37 function getFileName()

38 {

39 return $this->class_name . ".class.php";

40 }

41

48 {

49 $code = '';

50 $code .= "<?php\n";

51 $code .= $this->generateClass($test_body);

52 $code .= "\n?>";

57 {

58 $code = '';

59 $code .= "<?php\n";

60 $code .= $this->generateClassFailing();

61 $code .= "\n?>";

FunctionFrontendTest.php (https://github.com/WebTricks/WebTricks-CMS.git) PHP · 230 lines

31 * PHPUnit test case

32 */

33 require_once 'PHPUnit/Framework/TestCase.php';

34

35 function foobar($param1, $param2) {

108 $return = $this->_instance->call('foobar', array('param1', 'param2'));

109 $data = ob_get_contents();

110 ob_end_clean();

111 ob_implicit_flush(true);

112 $this->assertEquals('bar', $return);

134 $return = $this->_instance->call('foobar', array('param1', 'param2'));

135 $data = ob_get_contents();

136 ob_end_clean();

137 ob_implicit_flush(true);

138 $this->assertEquals('foobar_return(param1, param2)', $return);

class-automatic-upgrader-skin.php (https://gitlab.com/sihabudinahmad/asppi) PHP · 115 lines

1 <?php

2 /**

3 * Upgrader API: Automatic_Upgrader_Skin class

15 *

16 * @since 3.7.0

17 * @since 4.6.0 Moved to its own file from wp-admin/includes/class-wp-upgrader-skins.php.

18 *

19 * @see Bulk_Upgrader_Skin

46 ob_start();

47 $result = parent::request_filesystem_credentials( $error, $context, $allow_relaxed_file_ownership );

48 ob_end_clean();

49 return $result;

50 }

tests.php (https://swig.svn.sourceforge.net/svnroot/swig) PHP · 233 lines ✨ Summary

This PHP code is a comprehensive set of functions for validating and checking various aspects of PHP code, including classes, functions, globals, resources, and variables. It provides a robust framework for detecting errors, warnings, and potential issues in PHP code, making it useful for developers to ensure their code is correct and reliable.

1 <?php

2

3 // do we have true global vars or just GETSET functions?

210 var_dump($arg);

211 $result=ob_get_contents();

212 ob_end_clean();

213 return $result;

214 }