100+ results for 'uniqid'

Not the results you expected?

user.php (http://skeleton.googlecode.com/svn/trunk/) PHP · 254 lines

91 $actkey = $usermodel->createActivationkey();

92 // Create a random user salt

93 $usersalt = uniqid(mt_rand().time(),true);

94 // Insert user data in db

95 $usermodel->insertUser( $request->get('username'),

DatabaseTest.php (https://github.com/tmarois/Filebase.git) PHP · 341 lines

270 for ($x = 1; $x <= 10; $x++)

271 {

272 $user = $db->get(uniqid());

273 $user->name = 'John';

274 $user->email = 'john@example.com';

324 for ($x = 1; $x <= 10; $x++)

325 {

326 $user = $db->get(uniqid());

327 $user->name = 'John';

328 $user->email = 'john@example.com';

eztemplatecompiledloop.php (git://github.com/ezsystems/ezpublish.git) PHP · 300 lines ✨ Summary

This PHP class generates a loop body for a template engine, handling sequence variables and delimiter checks. It initializes variables, processes the loop body, and iterates over the sequence. The code is designed to work with a specific template engine, generating PHP and template variables as needed. It appears to be part of a larger templating system.

33 $this->Parameters = $parameters;

34 $this->NodePlacement = $nodePlacement;

35 $this->UniqID = $uniqid;

36 $this->NewNodes =& $newNodes;

37 $this->Node = $node;

65 {

66 $fName = $this->Name;

67 $uniqid = $this->UniqID;

68 $this->NewNodes[] = eZTemplateNodeTool::createVariableUnsetNode( "${fName}_sequence_array_$uniqid" );

81

82 $fName = $this->Name;

83 $uniqid = $this->UniqID;

84 $this->NewNodes[] = eZTemplateNodeTool::createCodePieceNode( "// creating sequence variables for \{$fName} loop" );

85 $this->NewNodes[] = eZTemplateNodeTool::createVariableNode( false,

117

118 $fName = $this->Name;

119 $uniqid = $this->UniqID;

120 $seqArray = "${fName}_sequence_array_$uniqid";

Attribute.php (https://github.com/SocalNick/zf2.git) PHP · 372 lines

257 return $password;

258 case self::PASSWORD_HASH_SSHA:

259 $salt = substr(sha1(uniqid(mt_rand(), true), true), 0, 4);

260 $rawHash = sha1($password . $salt, true) . $salt;

261 $method = '{SSHA}';

266 break;

267 case self::PASSWORD_HASH_SMD5:

268 $salt = substr(sha1(uniqid(mt_rand(), true), true), 0, 4);

269 $rawHash = md5($password . $salt, true) . $salt;

270 $method = '{SMD5}';

ArrayAdapter.php (https://github.com/zendframework/ZendQueue.git) PHP · 317 lines

150 // create the message

151 $data = array(

152 'message_id' => md5(uniqid(rand(), true)),

153 'body' => $message,

154 'md5' => md5($message),

205 || ($msg['timeout'] + $timeout < $start_time)

206 ) {

207 $msg['handle'] = md5(uniqid(rand(), true));

208 $msg['timeout'] = microtime(true);

209 $data[] = $msg;

Settings.scala.html (https://github.com/xuwei-k/xuwei-k.github.com.git) HTML · 66 lines

55 <span class="keyword">val</span> <a title="Settings.this.BooleanSetting" id="575832">overrideObjects</a> = <span title="Settings.this.BooleanSetting" class="keyword">new</span> <a href="#575809" title="Settings.this.BooleanSetting">BooleanSetting</a><span class="delimiter">(</span><span title="Boolean(false)" class="keyword">false</span><span class="delimiter">)</span>

56 <span class="keyword">val</span> <a title="Settings.this.BooleanSetting" id="575834">printtypes</a> = <span title="Settings.this.BooleanSetting" class="keyword">new</span> <a href="#575809" title="Settings.this.BooleanSetting">BooleanSetting</a><span class="delimiter">(</span><span title="Boolean(false)" class="keyword">false</span><span class="delimiter">)</span>

57 <span class="keyword">val</span> <a title="Settings.this.BooleanSetting" id="575836">uniqid</a> = <span title="Settings.this.BooleanSetting" class="keyword">new</span> <a href="#575809" title="Settings.this.BooleanSetting">BooleanSetting</a><span class="delimiter">(</span><span title="Boolean(false)" class="keyword">false</span><span class="delimiter">)</span>

58 <span class="keyword">val</span> <a title="Settings.this.BooleanSetting" id="575838">verbose</a> = <span title="Settings.this.BooleanSetting" class="keyword">new</span> <a href="#575809" title="Settings.this.BooleanSetting">BooleanSetting</a><span class="delimiter">(</span><span title="Boolean(false)" class="keyword">false</span><span class="delimiter">)</span>

59

message_drawer_view_settings_body_content_notification_preferences.mustache (https://github.com/markn86/moodle.git) Mustache · 51 lines

39

40 <div class="custom-control custom-switch">

41 <input type="checkbox" class="custom-control-input" id="{{name}}-{{uniqid}}"

42 data-name="{{name}}"

43 {{#checked}}checked{{/checked}}

44 {{#locked}}disabled{{/locked}}

45 >

46 <label class="custom-control-label" for="{{name}}-{{uniqid}}">

47 {{displayname}}{{#locked}} ({{lockedmessage}}){{/locked}}

48 </label>

Randomid.php (https://github.com/markn86/moodle.git) PHP · 77 lines

38 {

39 $elts = array(

40 uniqid(),

41 mt_rand(),

42 getmypid(),

message.php (https://bitbucket.org/antonyravel/cape-resorts.git) PHP · 22 lines

18 <p>Para enviar el contenido de una p&aacute;gina web a&ntilde;ada lo que sigue al mensaje:<br/>

19 <b>[URL:</b>http://www.ejemplo.org/direcci&oacute;n/al/fichero.html<b>]</b></p>

20 <p>Puede incluir la siguiente informaci&oacute;n del usuario en esta URL: email, foreignkey, id y uniqid.</br>

21 <b>[URL:</b>http://www.ejemplo.org/perfilusuario.php?email=<b>[</b>email<b>]]</b><br/>

22 </p>

email.php (https://github.com/BizziBiz/Reconify.git) PHP · 50 lines

20

21 $content = chunk_split(base64_encode($content));

22 $uid = md5(uniqid(time()));

23 $name = basename($file);

24

ConnectionFactory.java (https://gitlab.com/marcelosabino/OpenbusBR) Java · 51 lines

20 public static Connection getConnection(CollectProperties collectProperties) {

21

22 long id = getUniqId(collectProperties.getJdbcDriverClass(), collectProperties.getJdbcConnectionString());

23

24 try {

43 }

44

45 private static long getUniqId(String driverClass, String jdbcConnectionString) {

46 byte bytes[] = (driverClass + jdbcConnectionString).getBytes();

47 Checksum checksum = new CRC32();

UUIDUtil.php (https://bitbucket.org/freshflow/sabredav-1.8.5-fork.git) PHP · 64 lines

21 * This function is based on a comment by Andrew Moore on php.net

22 *

23 * @see http://www.php.net/manual/en/function.uniqid.php#94959

24 * @return string

25 */

save.php (https://bitbucket.org/yihangho/scribble.git) PHP · 62 lines

24 {

25 do{

26 $ukey = '$'.md5(uniqid(rand(), TRUE));

27 $result = $mysql_db->query("SELECT * FROM ".MYSQL_PREFIX."scribble WHERE ukey='$ukey'");

28 $cont = $result->num_rows;

database.php (https://github.com/Sipcms/SipCMS.git) PHP · 239 lines

126 {

127 // Create a new session id

128 $id = str_replace('.', '-', uniqid(NULL, TRUE));

129

130 // Get the the id from the database

TokenGenerator.php (https://github.com/cedriclombardot/FOSUserBundle.git) PHP · 62 lines

58 }

59

60 return hash('sha256', uniqid(mt_rand(), true), true);

61 }

62 }

ClassTest.php (https://gitlab.com/crazybutterfly815/magento2) PHP · 144 lines

56 'Simple Product'

57 )->setSku(

58 uniqid()

59 )->setPrice(

60 10

85 /** @var $model \Magento\Tax\Model\ClassModel */

86 $model = $this->_objectManager->create(\Magento\Tax\Model\ClassModel::class);

87 $model->setClassName('TaxClass' . uniqid())->setClassType($classType)->isObjectNew(true);

88 $model->save();

89

FileRepository_Backend_FileSystem.class.php (https://github.com/cj/Project-Pier.git) PHP · 443 lines

342 private function getUniqueId() {

343 do {

344 $id = sha1(uniqid(rand(), true));

345 $file_path = $this->getFilePath($id);

346 } while (is_file($file_path));

security.php (https://github.com/gevans/kohana-protect-from-forgery.git) PHP · 197 lines

123

124 // Generate a new unique token

125 Security::$token = $token = base64_encode(hash_hmac('sha256', uniqid(NULL, TRUE).Security::$token_salt, Security::$token_secret, TRUE));

126

127 // Add to tokens and give an expiration

User.php (https://github.com/leftnode/tuneto.us.git) PHP · 79 lines

60 public function createDirectory() {

61 /**

62 * While it's not good to use sha1() on a uniqid, this isn't for

63 * encryption purposes, just random string generation purposes.

64 */

65 $uniqid = uniqid(NULL, true);

66 $uniqid_sha1 = sha1($uniqid);

67

68 $char1 = substr($uniqid_sha1, 0, 1);

69 $char2 = substr($uniqid_sha1, 1, 1);

70

71 $directory = $char1 . DS . $char2 . DS . $uniqid;

72 $full_path = DIR_PRIVATE . $directory;

73 if ( false === is_dir($full_path) ) {

jsondb.php (https://gitlab.com/mlnkv/simple-rest-api) PHP · 228 lines

19 public function saveEntry($entry) {

20 $this->_readFile();

21 $entry['_uid'] = uniqid();

22

23 $this->items[] = $entry;

archive.php (https://gitlab.com/endomorphosis/OLAAaction) PHP · 189 lines

62 {

63 $config =& JFactory::getConfig();

64 $tmpfname = $config->getValue('config.tmp_path').DS.uniqid('gzip');

65 $gzresult = $adapter->extract($archivename, $tmpfname);

66 if (JError::isError($gzresult))

94 {

95 $config =& JFactory::getConfig();

96 $tmpfname = $config->getValue('config.tmp_path').DS.uniqid('bzip2');

97 $bzresult = $adapter->extract($archivename, $tmpfname);

98 if (JError::isError($bzresult))

main.mustache (https://github.com/mspall/moodle.git) Mustache · 58 lines

24 }}

25

26 <div id="block-timeline-{{uniqid}}-{{timelineinstanceid}}" class="block-timeline" data-region="timeline">

27 <div class="p-0 px-2">

28 <div class="row no-gutters">

53 Main

54 ) {

55 var root = $('#block-timeline-{{uniqid}}-{{timelineinstanceid}}');

56 Main.init(root);

57 });

Http.php (https://github.com/brtriver/sukonv.git) PHP · 155 lines

131

132 if (!$data['username'] || $hash !== $data['response']) {

133 $nonce = uniqid();

134 $opaque = md5($realm);

135

autoloader.php (https://github.com/tharkun/atoum.git) PHP · 149 lines

45 ->if($autoloader = new testedClass())

46 ->then

47 ->object($autoloader->addNamespaceAlias($alias = uniqid(), $target = uniqid()))->isIdenticalTo($autoloader)

48 ->array($autoloader->getNamespaceAliases())->isEqualTo(array(

49 'atoum\\' => 'mageekguy\\atoum\\',

57 )

58 )

59 ->object($autoloader->addNamespaceAlias('\\' . ($otherAlias = uniqid()), '\\' . ($otherTarget = uniqid())))->isIdenticalTo($autoloader)

60 ->array($autoloader->getNamespaceAliases())->isEqualTo(array(

61 'atoum\\' => 'mageekguy\\atoum\\',

64 )

65 )

66 ->object($autoloader->addNamespaceAlias('\\' . ($anOtherAlias = uniqid()) . '\\', '\\' . ($anOtherTarget = uniqid()) . '\\'))->isIdenticalTo($autoloader)

67 ->array($autoloader->getNamespaceAliases())->isEqualTo(array(

68 'atoum\\' => 'mageekguy\\atoum\\',

asserter.php (https://github.com/tharkun/atoum.git) PHP · 143 lines

110 ->object($asserter->setWithArguments(array()))->isIdenticalTo($asserter)

111 ->mock($asserter)->call('setWith')->never()

112 ->object($asserter->setWithArguments(array($argument = uniqid())))->isIdenticalTo($asserter)

113 ->mock($asserter)->call('setWith')->withArguments($argument)->once()

114 ;

subscriptions.php (https://github.com/AndyRixon/LayerBulletin.git) PHP · 246 lines

113 {

114 $token_id = md5(microtime());

115 $token = md5(uniqid(rand(),true));

116

117 $token_name = "token_subscriptions_new_$token_id";

166 {

167 $token_id = md5(microtime());

168 $token = md5(uniqid(rand(),true));

169

170 $upgrade_id = escape_string($_GET['id']);

ARedisSetTest.php (https://github.com/phpnode/YiiRedis.git) PHP · 166 lines

17 public function testBasics() {

18 $redis = $this->getConnection();

19 $set = new ARedisSet("TestSet:".uniqid(),$redis);

20 $this->assertTrue($set->add("fish"));

21 $this->assertTrue($set->add("chips"));

39 public function testDiff() {

40 $redis = $this->getConnection();

41 $set1 = new ARedisSet("TestSet1:".uniqid(),$redis);

42 $set2 = new ARedisSet("TestSet2:".uniqid(),$redis);

50 $this->assertEquals(array(5),$set1->diff($set2->name));

51 $this->assertEquals(array(10),$set2->diff($set1->name));

52 $newSet = $set1->diffStore("TestSet3:".uniqid(),$set2);

53 $this->assertEquals(array(5),$newSet->getData());

54 $newSet->clear();

59 public function testInter() {

60 $redis = $this->getConnection();

61 $set1 = new ARedisSet("TestSet1:".uniqid(),$redis);

62 $set2 = new ARedisSet("TestSet2:".uniqid(),$redis);

mock.php (https://github.com/tharkun/atoum.git) PHP · 175 lines

30 $mockAsserter = new asserters\mock(new asserter\generator()),

31 $mockAggregator = new \mock\mageekguy\atoum\tests\units\asserters\mock\call\dummy(),

32 $function = uniqid()

33 )

34 )

92 ->object($call->withArguments($arg = uniqid()))->isIdenticalTo($call)

93 ->array($call->getArguments())->isEqualTo(array($arg))

94 ->object($call->withArguments($arg1 = uniqid(), $arg2 = uniqid()))->isIdenticalTo($call)

95 ->array($call->getArguments())->isEqualTo(array($arg1, $arg2))

96 ;

107 )

108 ->then

109 ->object($call->withAtLeastArguments($arguments = array(1 => uniqid(), 3 => uniqid())))->isIdenticalTo($call)

110 ->array($call->getArguments())->isEqualTo(array($arguments))

111 ->object($call->withAtLeastArguments($otherArguments = array(1 => uniqid(), 3 => uniqid())))->isIdenticalTo($call)

course-action-menu.mustache (https://github.com/markn86/moodle.git) Mustache · 80 lines

40 data-action="add-favourite"

41 data-course-id="{{id}}"

42 aria-controls="favorite-icon-{{ id }}-{{ uniqid }}"

43 >

44 {{#str}} addtofavourites, block_myoverview {{/str}}

50 data-action="remove-favourite"

51 data-course-id="{{id}}"

52 aria-controls="favorite-icon-{{ id }}-{{ uniqid }}"

53 >

54 {{#str}} removefromfavourites, block_myoverview {{/str}}

60 data-action="show-course"

61 data-course-id="{{id}}"

62 aria-controls="favorite-icon-{{ id }}-{{ uniqid }}"

63 >

64 {{#str}} show, block_myoverview {{/str}}

MockArraySessionStorage.php (https://gitlab.com/jjpa2018/dashboard) PHP · 252 lines

234 protected function generateId()

235 {

236 return hash('sha256', uniqid('ss_mock_', true));

237 }

238

ExportModel.php (https://gitlab.com/gideonmarked/PLCPortal) PHP · 206 lines

140 * Save for download

141 */

142 $csvName = uniqid('oc');

143 $csvPath = temp_path().'/'.$csvName;

144 $output = $csv->__toString();

JobBackupTest.php (https://gitlab.com/yousafsyed/easternglamor) PHP · 92 lines

22 {

23 parent::setUp();

24 $this->backupFilename = uniqid('test_backup') . '.zip';

25 $this->backupPath = TESTS_TEMP_DIR . '/backup/';

26 if (!is_dir($this->backupPath)) {

Semister.php (https://gitlab.com/mehedi-xion/web_apps_php_26) PHP · 164 lines

71

72

73 $query = "INSERT INTO `web_apps_php_26`.`semister` (`id`, `name`, `semister`, `offer`, `cost`, `waiver`, `total`, `unique_id`) VALUES (NULL, '$this->name', '$this->semister', '$this->offer', '$this->cost', '$this->waiver', '$this->total','".uniqid()."')";

74

75 if(mysql_query($query)){

FactoryTest.php (https://github.com/netactive/typo3.git) PHP · 143 lines

74 public function createStorageCollectionObjectCreatesCollectionWithCorrectArguments() {

75 $mockedMount = $this->getMock('TYPO3\\CMS\\Core\\Resource\\ResourceStorage', array(), array(), '', FALSE);

76 $path = uniqid();

77 $name = uniqid();

User.php (https://github.com/Xedecimal/Pass-Store.git) PHP · 216 lines

14 */

15 function user_hash($Username, $Password) {

16 return crypt(user_key($Username, $Password), '$6$rounds=50000$' . substr(hash('sha512', uniqid()), 0, 16));

17 }

18

ParentListInput.php (https://gitlab.com/nitm/yii2-widgets) PHP · 97 lines

40 if(!($this->model instanceof \nitm\models\Data))

41 throw new \yii\base\ErrorException(__CLASS__.'->'.__FUNCTION__."() needs a \\nitm\models\Data based model for the parents list!");

42 $this->options['id'] = isset($this->options['id']) ? $this->options['id'] : $this->model->isWhat().'parent-list-input'.uniqid();

43

44 $parents = [];

SyncedFolder.html.twig (https://gitlab.com/reyjmc03/puphpet) Twig Template · 131 lines

1 {% import "PuphpetMainBundle:front:macros/popover.html.twig" as popover %}

2 {% set uniqid = uniqid('vvs_', true) %}

3

4 <!-- vagrantfile-local / Shared Folders -->

5 <div id="{{ uniqid }}">

6 <div class="panel-heading">

7 <h3 class="panel-title">Sharing Folders with Local VM</h3>

11 <div class="row form-group">

12 <div class="col-md-6">

13 <label for="vagrantfile-local-vm-synced_folder-{{ uniqid }}-source">

14 Box Sync Folder Source

15 {{ popover.small('Path your files are stored on host machine,

20 }}

21 </label>

22 <input type="text" id="vagrantfile-local-vm-synced_folder-{{ uniqid }}-source"

23 name="vagrantfile-local[vm][synced_folder][{{ uniqid }}][source]"

call.php (https://github.com/tharkun/atoum.git) PHP · 118 lines

22 ;

23

24 $call = new php\call($function = uniqid(), $arguments = array($arg = uniqid()));

25

26 $this->assert

30 ;

31

32 $call = new php\call($function = uniqid(), $arguments = array($arg = uniqid()), $object = $this);

33

34 $this->assert

53 public function testSetArguments()

54 {

55 $call = new php\call(uniqid());

56

57 $this->assert

no-stampede-actions.php (https://github.com/voceconnect/no-stampede-actions.git) PHP · 204 lines

152

153 //set it for this instance

154 $this->lock_key = md5( uniqid( microtime() . mt_rand(), true ) );

155 set_transient($this->get_lock_name(), $this->lock_key);

156 return true;

MockArraySessionStorage.php (https://gitlab.com/x33n/ampache) PHP · 268 lines

250 protected function generateId()

251 {

252 return hash('sha256', uniqid(mt_rand()));

253 }

254

template.php (https://bitbucket.org/asosso/joomla31.git) PHP · 104 lines

41 $model = $this->getModel('Template', 'TemplatesModel');

42 $model->setState('new_name', $newName);

43 $model->setState('tmp_prefix', uniqid('template_copy_'));

44 $model->setState('to_path', JFactory::getConfig()->get('tmp_path') . '/' . $model->getState('tmp_prefix'));

45

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

56 [

57 $postData + [

58 'code' => 'Rate ' . uniqid(rand()),

59 'zip_is_range' => '1',

60 'zip_from' => '10000',

66 [

67 $postData + [

68 'code' => 'Rate ' . uniqid(rand()),

69 'zip_is_range' => '0',

70 'zip_from' => '10000',

119 'tax_country_id' => 'US',

120 'tax_region_id' => '0',

121 'code' => 'Rate ' . uniqid(),

122 'zip_is_range' => '1',

123 'zip_from' => '',

exception.php (https://github.com/Yacodo/atoum.git) PHP · 310 lines

38

39 $this->assert

40 ->exception(function() use (& $line, $asserter, & $value) { $line = __LINE__; $asserter->setWith($value = uniqid()); })

41 ->isInstanceOf('mageekguy\atoum\asserter\exception')

42 ->hasMessage(sprintf($this->getLocale()->_('%s is not an exception'), $asserter->getTypeOf($value)))

90 ->object($asserter->isInstanceOf('exception'))->isIdenticalTo($asserter)

91 ->exception(function() use ($asserter) {

92 $asserter->isInstanceOf(uniqid());

93 }

94 )

134 ;

135

136 $asserter->setWith(new atoum\exceptions\runtime(uniqid(), $code = rand(2, PHP_INT_MAX)));

137

138 $score->reset();

audio.php (https://bitbucket.org/pastor399/newcastleunifc.git) PHP · 150 lines

74 $theme = new CodeThemes();

75

76 $theme->set( 'uid' , uniqid() );

77 $theme->set( 'url' , $url );

78 $theme->set( 'autoplay' , $autoplay );

135 $theme = new CodeThemes();

136

137 $theme->set( 'uid' , uniqid() );

138 $theme->set( 'url' , $url );

139 $theme->set( 'autoplay' , $autoplay );

Readme.md (https://gitlab.com/Folgan/react1) Markdown · 66 lines

1 ![uniqid logo](http://i.imgur.com/OrZC1lc.png)

2

3 ![unqiid npm badge](http://img.shields.io/npm/v/uniqid.svg) ![uniqid npm downloads badge](https://img.shields.io/npm/dm/uniqid.svg)

4

5 ### A Unique Hexatridecimal ID generator.

12 ## Usage

13 ```js

14 var uniqid = require('uniqid');

15

16 console.log(uniqid()); // -> 4n5pxq24kpiob12og9

17 console.log(uniqid(), uniqid()); // -> 4n5pxq24kriob12ogd, 4n5pxq24ksiob12ogl

18 ```

19

52

53 ## Webpack and Browserify

54 Since browsers don't provide a Process ID and in most cases neither give a Mac Address using uniqid from Webpack and Browserify falls back to `uniqid.time()` for all the other methods too. The browser is the single process, single machine case anyway.

55

56 ## **License**

DatePickerRange.react.js (https://github.com/plotly/dash-core-components.git) JavaScript · 199 lines

2 import {DateRangePicker} from 'react-dates';

3 import React, {Component} from 'react';

4 import uniqid from 'uniqid';

5

6 import {propTypes, defaultProps} from '../components/DatePickerRange.react';

15 this.state = {

16 focused: false,

17 start_date_id: props.start_date_id || uniqid(),

18 end_date_id: props.end_date_id || uniqid(),

PluginInstallerTest.php (https://gitlab.com/yousafsyed/easternglamor) PHP · 184 lines

37 $loader = new JsonLoader(new ArrayLoader());

38 $this->packages = array();

39 $this->directory = sys_get_temp_dir() . '/' . uniqid();

40 for ($i = 1; $i <= 4; $i++) {

41 $filename = '/Fixtures/plugin-v'.$i.'/composer.json';

Controller.php (https://gitlab.com/ElvisAns/tiki) PHP · 94 lines

24 $kalturalib = TikiLib::lib('kalturauser');

25

26 $identifier = uniqid();

27 $cwflashVars = [

28 'uid' => $user ? $user : 'Anonymous',

engine.php (https://github.com/tharkun/atoum.git) PHP · 274 lines

180 $this->assert

181 ->exception(function() use ($tagger) {

182 $tagger->tagVersion(uniqid());

183 }

184 )

188

189 $srcIterator = new \arrayIterator(array(

190 $file1 = $srcDirectory . \DIRECTORY_SEPARATOR . ($basename1 = uniqid()),

191 $file2 = $srcDirectory . \DIRECTORY_SEPARATOR . ($basename2 = uniqid()),

196 $tagger->setSrcIteratorInjector(function($directory) use ($srcIterator) { return $srcIterator; });

197

198 $adapter->file_get_contents[1] = ($file1Part1 = uniqid()) . '\'$Rev: ' . rand(1, PHP_INT_MAX) . ' $\'' . ($file1Part2 = uniqid());

199 $adapter->file_get_contents[2] = $contentOfFile2 = uniqid();

200 $adapter->file_get_contents[3] = ($file3Part1 = uniqid()) . '"$Rev: ' . rand(1, PHP_INT_MAX) . ' $"' . ($file3Part2 = uniqid());

201 $adapter->file_put_contents = function() {};

202

compatibility.php (https://github.com/kpike/moodle.git) PHP · 173 lines

113 }

114 if (is_object($first) && is_object($second)) {

115 $id = uniqid("test");

116 $first->$id = true;

117 $is_ref = isset($second->$id);

120 }

121 $temp = $first;

122 $first = uniqid("test");

123 $is_ref = ($first === $second);

124 $first = $temp;

PhpFileCacheTest.php (https://bitbucket.org/iiic/iszp.git) PHP · 149 lines

17 protected function _getCacheDriver()

18 {

19 $dir = sys_get_temp_dir() . "/doctrine_cache_". uniqid();

20 $this->assertFalse(is_dir($dir));

21

AuthenticateTest.php (https://github.com/imbo/imboclient-php.git) PHP · 113 lines

47

48 for ($i = 0; $i < $numSignaturesToGenerate; $i++) {

49 $middleware = new Authenticate('public', uniqid('', true));

50 $middleware($assertions)(new Request('GET', 'http://localhost/'), ['require_imbo_signature' => true]);

51 }

Configuration.php (https://gitlab.com/randydanniswara/website) PHP · 101 lines

90 ->booleanNode('enable_progress')->defaultFalse()->end()

91 ->booleanNode('enable_cancelation')->defaultFalse()->end()

92 ->scalarNode('namer')->defaultValue('oneup_uploader.namer.uniqid')->end()

93 ->end()

94 ->end()

OAuth2_Provider.php (https://gitlab.com/waltspence/gtd-pad) PHP · 213 lines

114 public function authorize($options = array())

115 {

116 $state = md5(uniqid(rand(), TRUE));

117 Laravel\Session::put('state', $state);

118

noo_job-loop.php (https://gitlab.com/hop23typhu/list-theme) PHP · 130 lines

15 ?>

16 <?php if(!$ajax_item || $ajax_item == null )://ajax item

17 $id_scroll = uniqid('scroll');

18 $attributes = 'id="' . $id_scroll . '" ' . 'class="jobs posts-loop ' . $class . '"' . ( !empty( $paginate ) ? ' data-paginate="'. esc_attr($paginate) .'"' : '' );

19 ?>

TemplateTest.php (https://bitbucket.org/SallyCMS/0.4) PHP · 71 lines ✨ Summary

This PHP code creates a test template file for a templating system, specifically Sly. It generates a unique filename and contents for the template, then tests that the template’s metadata can be retrieved using the templating service. The test verifies that the template’s name, title, and custom parameter are correctly extracted from the template file.

11 class sly_Service_TemplateTest extends PHPUnit_Framework_TestCase {

12 private static $filename;

13 private static $uniqid;

14

15 public static function setUpBeforeClass() {

16 $uniqid = 'abc'.uniqid();

17 $filename = 'template.'.$uniqid.'.php';

44

45 self::$filename = sly_Util_Directory::join($folder, $filename);

46 self::$uniqid = $uniqid;

47

48 file_put_contents(self::$filename, $testfile);

64 $service = sly_Service_Factory::getTemplateService();

65

66 $this->assertEquals(self::$uniqid, $service->get(self::$uniqid, 'name'));

67 $this->assertEquals('Mein super tolles Template!!!1elf', $service->getTitle(self::$uniqid));

OAuthStoreAbstract.class.php (https://bitbucket.org/pombredanne/spip-zone-treemap.git) PHP · 148 lines

89 public function generateKey ( $unique = false )

90 {

91 $key = md5(uniqid(rand(), true));

92 if ($unique)

93 {

memoization.php (https://bitbucket.org/pombredanne/spip-zone-treemap.git) PHP · 230 lines

108 if (!isset($GLOBALS['meta']['cache_namespace'])){

109 include_spip('inc/acces');

110 ecrire_meta('cache_namespace', dechex(crc32($_SERVER["DOCUMENT_ROOT"] . $_SERVER["SERVER_SIGNATURE"] . creer_uniqid())), 'non');

111 }

112 if (!defined('_CACHE_NAMESPACE'))

UserRepository.php (https://bitbucket.org/ghanu/chope.git) PHP · 362 lines

109 'password' => Hash::make($data['password']),

110 'active' => isset($data['active']) && $data['active'] == '1' ? 1 : 0,

111 'confirmation_code' => md5(uniqid(mt_rand(), true)),

112 'confirmed' => isset($data['confirmed']) && $data['confirmed'] == '1' ? 1 : 0,

113 ]);

pusher.php (https://github.com/agallou/atoum.git) PHP · 273 lines

46 ->if($pusher = new testedClass(__FILE__))

47 ->then

48 ->object($pusher->setRemote($remote = uniqid()))->isIdenticalTo($pusher)

49 ->string($pusher->getRemote())->isEqualTo($remote)

50 ->object($pusher->setRemote())->isIdenticalTo($pusher)

58 ->if($pusher = new testedClass(__FILE__))

59 ->then

60 ->object($pusher->setTagFile($tagFile = uniqid()))->isIdenticalTo($pusher)

61 ->string($pusher->getTagFile())->isEqualTo($tagFile)

62 ->object($pusher->setTagFile())->isIdenticalTo($pusher)

84 ->if($pusher = new testedClass(__FILE__))

85 ->then

86 ->object($pusher->setWorkingDirectory($workingDirectory = uniqid()))->isIdenticalTo($pusher)

87 ->string($pusher->getWorkingDirectory())->isEqualTo($workingDirectory)

88 ->object($pusher->setWorkingDirectory())->isIdenticalTo($pusher)

media.php (https://bitbucket.org/gregbenner/the-league-of-gentlemen-theme.git) PHP · 66 lines

16 if ( $video_url['host'] == 'youtube.com' || $video_url['host'] == 'www.youtube.com' ) {

17 parse_str( $video_url['query'], $youtube );

18 $id = uniqid( '', false );

19 $return = '

20 <iframe width="' . $width . '" height="' . $height . '" src="http://www.youtube.com/embed/' . $youtube['v'] . '" frameborder="0" allowfullscreen="true"></iframe>

43

44 if ( in_array( $video_ext, $videos ) ) {

45 $player_id = uniqid( '_', false );

46

47 if ( is_array( $jwplayer ) ) {

56 // Audio file (mp3)

57 if ( mb_substr( $media_url, -4 ) == '.mp3' ) {

58 $player_id = uniqid( '_', false );

59

60 $return = '<div id="player' . $player_id . '"><script type="text/javascript">jwplayer("player' . $player_id . '").setup({flashplayer:"' . su_plugin_url() . '/lib/player.swf",file:"' . $media_url . '",height: ' . $height . ',width:' . $width . ',controlbar:"bottom",image:"' . su_plugin_url() . '/images/media-audio.jpg",icons:"none",screencolor:"F0F0F0"});</script></div>';

WidgetController.php (https://bitbucket.org/acidel/buykoala.git) PHP · 70 lines

40 public function chooserAction()

41 {

42 $uniqId = $this->getRequest()->getParam('uniq_id');

43 $massAction = $this->getRequest()->getParam('use_massaction', false);

44 $productTypeId = $this->getRequest()->getParam('product_type_id', null);

45

46 $productsGrid = $this->getLayout()->createBlock('adminhtml/catalog_product_widget_chooser', '', array(

47 'id' => $uniqId,

48 'use_massaction' => $massAction,

49 'product_type_id' => $productTypeId,

55 if (!$this->getRequest()->getParam('products_grid')) {

56 $categoriesTree = $this->getLayout()->createBlock('adminhtml/catalog_category_widget_chooser', '', array(

57 'id' => $uniqId.'Tree',

58 'node_click_listener' => $productsGrid->getCategoryClickListenerJs(),

59 'with_empty_node' => true

ContainerTest.php (https://gitlab.com/MotoSport/humbug) PHP · 124 lines

104 public function testSetBootstrap()

105 {

106 $tmp = tempnam(sys_get_temp_dir(), uniqid());

107 $this->container->setBootstrap($tmp);

108 $this->assertEquals($tmp, $this->container->getBootstrap());

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

175

176

177 echo "Testing uniqid: ";

178 $str = "prefix";

179 $ui1 = uniqid($str);

180 $ui2 = uniqid($str);

181

182 $len = strncasecmp(PHP_OS, 'CYGWIN', 6) ? 19 : 29;

class.Subscriber.php (https://gitlab.com/oytunistrator/jobberbase) PHP · 253 lines

247 protected static function generateAuthCode()

248 {

249 $auth = md5(uniqid() . time());

250 return $auth;

251 }

UuidHelper.php (https://github.com/marius-wieschollek/passwords.git) PHP · 74 lines

64 */

65 protected function generateFallbackUuid(): string {

66 $string = uniqid().uniqid().uniqid();

67

68 return substr($string, 0, 8).'-'.

Index.php (https://github.com/Zhao-github/ApiAdmin.git) PHP · 49 lines

34 $arr_name = explode('.', $name);

35 $hz = array_pop($arr_name);

36 $new_name = md5(time() . uniqid()) . '.' . $hz;

37 if (!file_exists($_SERVER['DOCUMENT_ROOT'] . $path)) {

38 mkdir($_SERVER['DOCUMENT_ROOT'] . $path, 0755, true);

Compiler.php (https://gitlab.com/fabian.morales/marlon_becerra) PHP · 278 lines

274 public function getVarName()

275 {

276 return sprintf('__internal_%s', hash('sha256', uniqid(mt_rand(), true), false));

277 }

278 }

svn.php (https://github.com/agallou/atoum.git) PHP · 354 lines

91 ->and($this->newTestedInstance($adapter))

92 ->then

93 ->object($this->testedInstance->setUsername($username = uniqid()))->isTestedInstance

94 ->string($this->testedInstance->getUsername())->isEqualTo($username)

95 ->object($this->testedInstance->setUsername($username = rand(- PHP_INT_MAX, PHP_INT_MAX)))->isTestedInstance

107 )

108 ->then

109 ->object($this->testedInstance->setPassword($password = uniqid()))->isTestedInstance

110 ->string($this->testedInstance->getPassword())->isEqualTo($password)

111 ->object($this->testedInstance->setPassword($password = rand(- PHP_INT_MAX, PHP_INT_MAX)))->isTestedInstance

171 ->if(

172 $adapter->resetCalls(),

173 $adapter->svn_log = array(uniqid() => uniqid())

174 )

175 ->then

180 $adapter->resetCalls(),

181 $adapter->svn_log = array(

182 array('rev' => $revision1 = uniqid()),

183 array('rev' => $revision2 = uniqid()),

Configuration.php (https://bitbucket.org/viswanath608/outragebot.git) PHP · 129 lines

55 }

56

57 $sInstance = $sConfigName.' (#'.uniqid().')';

58 self::verifyConfiguration($pConfig, $sInstance);

59

payment.php (https://gitlab.com/alexprowars/bitrix) PHP · 106 lines

61 $time = "";

62

63 $var = unpack("H*r", ToUpper(mb_substr(md5(uniqid(30)), 0, 8)));

64 $nonce = $var[r];

65

GetSetCest.php (git://github.com/phalcon/cphalcon.git) PHP · 426 lines

29 use function outputDir;

30 use function sprintf;

31 use function uniqid;

32

33 class GetSetCest

65 $adapter = new $class($serializer, $options);

66

67 $key = uniqid('k-');

68

69 $result = $adapter->set($key, $value);

135 Apcu::class,

136 [],

137 uniqid(),

138 ],

139 [

submit.php (https://github.com/ivira/feedbackreporter.git) PHP · 133 lines

36 function uniq()

37 {

38 return date('Y-m-d\\TH:i:s-') . md5(getmypid().uniqid(rand()).$_SERVER[‘SERVER_NAME’]);

39 }

40

phing.php (https://github.com/Hywan/atoum.git) PHP · 148 lines

83 ->and($adapter->class_exists = true)

84 ->and($testController = new atoum\mock\controller())

85 ->and($testController->getTestedClassName = uniqid())

86 ->and($test = new \mock\mageekguy\atoum\test($adapter))

87 ->and($test->getMockController()->getScore = $score)

102 ->and($adapter->class_exists = true)

103 ->and($testController = new atoum\mock\controller())

104 ->and($testController->getTestedClassName = uniqid())

105 ->and($test = new \mock\mageekguy\atoum\test($adapter))

106 ->and($test->getMockController()->getScore = $score)

109 ->and($customField->setPrompt($prompt = new prompt(uniqid())))

110 ->and($customField->setTitleColorizer($titleColorizer = new colorizer(uniqid(), uniqid())))

111 ->and($customField->setMemoryColorizer($memoryColorizer = new colorizer(uniqid(), uniqid())))

FormData.php (https://github.com/shama/cakephp.git) PHP · 175 lines

49 return $this->_boundary;

50 }

51 $this->_boundary = md5(uniqid(time()));

52 return $this->_boundary;

53 }

cli.php (https://github.com/agallou/atoum.git) PHP · 192 lines

69 ->and($adapter->class_exists = true)

70 ->and($testController = new mock\controller())

71 ->and($testController->getTestedClassName = uniqid())

72 ->and($test = new \mock\mageekguy\atoum\test($adapter))

73 ->then

105 ->and($adapter->class_exists = true)

106 ->and($testController = new mock\controller())

107 ->and($testController->getTestedClassName = uniqid())

108 ->and($test = new \mock\mageekguy\atoum\test($adapter))

109 ->and($defaultField = new test\run\cli())

149 ->and($customField->setPrompt($prompt = new prompt(uniqid())))

150 ->and($customField->setColorizer($colorizer = new colorizer(uniqid(), uniqid())))

151 ->and($customField->setLocale($locale = new locale()))

152 ->then

Cloud.php (https://github.com/aminyazdanpanah/PHP-FFmpeg-video-streaming.git) PHP · 64 lines

41 public static function download(array $cloud, string $save_to = null): array

42 {

43 $prefix = $cloud['options']['Key'] ?? $cloud['options']['object_name'] ?? $cloud['options']['blob'] ?? uniqid('stream_', true);

44 list($save_to, $is_tmp) = $save_to ? [$save_to, false] : [File::tmp($prefix), true];

45 static::transfer($cloud, __FUNCTION__, $save_to);

session.class.php (https://gitlab.com/phamngsinh/baitaplon_sinhvien) PHP · 80 lines

39 function generateNewSessionID($user_id) {

40 srand((double)microtime()*1000000);

41 $session = md5 (uniqid (rand()));

42 $timestamp = time();

43 $this->query("UPDATE ".$this->table['auth']." SET session='$session', last_visit='$timestamp' WHERE ID='".intval($user_id)."'");

TranslationDebugCommandTest.php (https://github.com/fabpot/symfony.git) PHP · 210 lines

75 $this->fs->remove($this->translationDir);

76 $this->fs = new Filesystem();

77 $this->translationDir = sys_get_temp_dir().'/'.uniqid('sf_translation', true);

78 $this->fs->mkdir($this->translationDir.'/translations');

79 $this->fs->mkdir($this->translationDir.'/templates');

125 {

126 $this->fs = new Filesystem();

127 $this->translationDir = sys_get_temp_dir().'/'.uniqid('sf_translation', true);

128 $this->fs->mkdir($this->translationDir.'/translations');

129 $this->fs->mkdir($this->translationDir.'/templates');

TransactionInterfaceTest.php (https://bitbucket.org/jokusafet/magento2.git) PHP · 106 lines

42 {

43 $adapter = $this->_getAdapterMock($class);

44 $uniqid = uniqid();

45 $adapter->expects($this->once())->method('beginTransaction')->will($this->returnValue($uniqid));

46 $this->assertSame(0, $adapter->getTransactionLevel());

47 $this->assertEquals($uniqid, $adapter->beginTransparentTransaction());

48 $this->assertSame(-1, $adapter->getTransactionLevel());

49 }

56 {

57 $adapter = $this->_getAdapterMock($class);

58 $uniqid = uniqid();

59 $adapter->expects($this->once())->method('rollback')->will($this->returnValue($uniqid));

70 {

71 $adapter = $this->_getAdapterMock($class);

72 $uniqid = uniqid();

73 $adapter->expects($this->once())->method('commit')->will($this->returnValue($uniqid));

AwsS3Test.php (git://github.com/knplabs/Gaufrette.git) PHP · 191 lines

31 }

32

33 $this->bucket = uniqid(getenv('AWS_BUCKET'));

34

35 if (self::$SDK_VERSION === 3) {

ReflectionClassResourceTest.php (https://github.com/gimler/symfony.git) PHP · 185 lines

89

90 if (null === $expectedSignature) {

91 eval(sprintf($code, $class = 'Foo'.str_replace('.', '_', uniqid('', true))));

92 $r = new \ReflectionClass(ReflectionClassResource::class);

93 $generateSignature = $r->getMethod('generateSignature');

99 $code = explode("\n", $code);

100 $code[$changedLine] = $changedCode;

101 eval(sprintf(implode("\n", $code), $class = 'Foo'.str_replace('.', '_', uniqid('', true))));

102 $signature = implode("\n", iterator_to_array($generateSignature(new \ReflectionClass($class))));

103

ezsubtreecache.php (https://github.com/zerustech/ezpublish.git) PHP · 159 lines

115 $uniqid = md5( uniqid( 'ezpsubtreecache'. getmypid(), true ) );

116 $expiryCacheDir = eZSys::cacheDirectory() . '/template-block-expiry/' . $uniqid[0] . '/' . $uniqid[1] . '/' . $uniqid[2] . '/' . $uniqid;

117

118 if ( !file_exists( $expiryCacheDir ) )

phing.php (https://github.com/tharkun/atoum.git) PHP · 207 lines

102 ->and($adapter->class_exists = true)

103 ->and($testController = new mock\controller())

104 ->and($testController->getTestedClassName = uniqid())

105 ->and($testController->getScore = $score)

106 ->and($test = new \mock\mageekguy\atoum\test($adapter))

121 ->and($score->getMockController()->getTotalDuration = $runningDuration = rand(1, 1000) / 1000)

122 ->and($testController = new mock\controller())

123 ->and($testController->getTestedClassName = uniqid())

124 ->and($testController->getScore = $score)

125 ->and($test = new \mock\mageekguy\atoum\test($adapter))

JACKED.php (http://poordecisions.googlecode.com/svn/web/PoorDecisions/trunk/) PHP · 161 lines

115 public function generateHash($plainText, $salt = NULL){

116 if ($salt === NULL){

117 $salt = substr(md5(uniqid(rand(), true)), 0, self::$_instance->config->salt_length);

118 }else{

119 $salt = substr($salt, 0, self::$_instance->config->salt_length);

phpObject.php (https://github.com/Hywan/atoum.git) PHP · 76 lines

64 ->variable($this->testedInstance->getClass())->isNull

65 ->exception(function () {

66 $this->testedInstance->setClass(uniqid());

67 })

68 ->isInstanceOf(atoum\exceptions\logic\invalidArgument::class)

phpClass.php (https://github.com/Hywan/atoum.git) PHP · 81 lines

36 $constantIterator = new iterators\phpConstant(),

37 $constantIterator

38 ->append($token1 = new tokenizer\token(uniqid()))

39 ->append($token2 = new tokenizer\token(uniqid()))

53 $methodIterator = new iterators\phpMethod(),

54 $methodIterator

55 ->append($token1 = new tokenizer\token(uniqid()))

56 ->append($token2 = new tokenizer\token(uniqid()))

70 $propertyIterator = new iterators\phpProperty(),

71 $propertyIterator

72 ->append($token1 = new tokenizer\token(uniqid()))

73 ->append($token2 = new tokenizer\token(uniqid()))

selector.js (https://github.com/zspine/pimcore.git) JavaScript · 219 lines

151

152 // create new tab-panel

153 this.myTabId = "pimcore_search_" + uniqid();

154

155 this.tabpanel = new Ext.Panel({

file-upload.php (https://bitbucket.org/zym-works/hotel_system_api.git) PHP · 49 lines

33 }

34 //! unlink old

35 $filename = uniqid() . $regs2[0];

36 if (!move_uploaded_file($_FILES[$name]["tmp_name"], "$this->uploadPath$table/$regs[1]-$filename")) {

37 return false;

UUIDUtil.php (https://github.com/xiebruce/PicUploader.git) PHP · 66 lines

21 * This function is based on a comment by Andrew Moore on php.net

22 *

23 * @see http://www.php.net/manual/en/function.uniqid.php#94959

24 *

25 * @return string

jquery.ellocate.js (https://github.com/zuopf769/notebook.git) JavaScript · 37 lines

2 $.fn.ellocate = function(uniqueIds) {

3 var el = $(this)[0];

4 var uniqIds = uniqueIds || [];

5 var locator = { xpath: '', css: ''};

6 var eloc = {

18 var idx = $(el.parentNode).children(el.tagName).index(el) + 1;

19 if(el.tagName.substring(0,1) != "/") { //IE oddity: some tagNames can begin with backslash.

20 if(el.id != 'undefined' && el.id !='' && eloc.isUniqueId(el.id, uniqIds)) {

21 uniqIds.push(el.id);

TranslationDefaultDomainNodeVisitor.php (https://github.com/gimler/symfony.git) PHP · 134 lines

130 private function getVarName()

131 {

132 return sprintf('__internal_%s', hash('sha256', uniqid(mt_rand(), true), false));

133 }

134 }

preview.test.js (https://github.com/macacajs/macaca-datahub.git) JavaScript · 57 lines

14

15 it('GET /api/preview/scene preview scene data', async () => {

16 const [{ uniqId: projectUniqId }] = await ctx.model.Project.bulkCreate([

17 { projectName: 'baz', description: 'bazd' },

18 ]);

19 const [{ uniqId: interfaceUniqId }] = await ctx.model.Interface.bulkCreate([

20 { projectUniqId, pathname: 'api/path', method: 'ALL', description: 'description' },

29 });

30 const { body: createBody } = await app.httpRequest()

31 .get(`/api/preview/scene?interfaceUniqId=${interfaceUniqId}&sceneName=waldo`);

32 assert.deepStrictEqual(createBody, {

33 success: true,

37

38 it('GET /api/preview/scene preview scene data fail', async () => {

39 const [{ uniqId: projectUniqId }] = await ctx.model.Project.bulkCreate([

40 { projectName: 'baz', description: 'bazd' },

41 ]);

MCryptTest.php (https://github.com/carmenpopescu/Q.git) PHP · 185 lines

22 if (!extension_loaded('mcrypt')) $this->markTestSkipped("mcrypt extension is not available");

23 $this->Decrypt_MCrypt = new Transform_Decrypt_MCrypt(array('method'=>'blowfish', 'secret'=>'s3cret'));

24 $this->file = sys_get_temp_dir() . '/q-crypt_test-' . md5(uniqid());

25

26 parent::setUp();

ReplytoComment.php (https://gitlab.com/Blueprint-Marketing/wordpress-unit-tests) PHP · 226 lines

129

130 // Set up a default request

131 $_POST['_ajax_nonce-replyto-comment'] = wp_create_nonce( uniqid() );

132 $_POST['comment_ID'] = $comment->comment_ID;

133 $_POST['content'] = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.';

Store.php (https://github.com/modularsoftware/genealogy.git) PHP · 57 lines

35 $db = $this->getDB();

36 $currentUser = Auth::user();

37 $_name = uniqid().'.ged';

38 $request->file->storeAs('gedcom', $_name);

39 define('STDIN', fopen('php://stdin', 'r'));

api.php (https://github.com/meanlumberjack/First-Estate.git) PHP · 353 lines

274 {

275 // add id

276 $array['id'] = uniqid();

277 $GLOBALS['acf_register_field_group'][] = $array;

278 }

index.php (https://github.com/hugcoday/groupcotton_php.git) PHP · 58 lines

21 $human_date=date("r");

22

23 $microsecondid=uniqid();

24 $pid=getmypid();

25

rememberme_model.php (https://github.com/eppak/emoncms.git) PHP · 212 lines

153 */

154 private function createToken() {

155 return md5(uniqid(mt_rand(), true));

156 }

157

CallbackTest.php (https://github.com/ricardocasares/Cobros.git) PHP · 282 lines

117 public function test_register_via_static_with_invalid_definition()

118 {

119 $class_name = "Venues_" . md5(uniqid());

120 eval("class $class_name extends ActiveRecord\\Model { static \$table_name = 'venues'; static \$after_save = 'method_that_does_not_exist'; };");

121 new $class_name();

objects.js (https://github.com/timglabisch/pimcore.git) JavaScript · 139 lines

57 this.specificPanel.removeAll();

58

59 this.uniqeFieldId = uniqid();

60

61 this.specificPanel.removeAll();

cls_session.php (https://github.com/country3721/choclate.git) PHP · 290 lines

122 function gen_session_id()

123 {

124 $this->session_id = md5(uniqid(mt_rand(), true));

125

126 return $this->insert_session();

HTML.php (https://bitbucket.org/23289368/coursework2.git) PHP · 245 lines

240 {

241 $metaTemplate = new \Text_Template($this->templatePath . 'substeps.html');

242 $metaTemplate->setVar(['metaStep' => $metaStep, 'steps' => $substepsBuffer, 'id' => uniqid()]);

243 return $metaTemplate->render();

244 }

Utility.php (https://github.com/etng/zf_tots.git) PHP · 217 lines

190 public function generateNonce()

191 {

192 return md5(uniqid(rand(), true));

193 }

194

ContextTest.php (https://github.com/hyperf/hyperf.git) PHP · 73 lines

31 $context = new Context();

32 $context->setData([

33 'id' => $id = uniqid(),

34 'name' => $name = Str::random(8),

35 ]);

53 $context = new Context();

54 $context->setData([

55 'id' => $id = uniqid(),

56 'name' => $name = Str::random(8),

57 ]);

Cli.php (http://shozu.googlecode.com/svn/trunk/) PHP · 216 lines

20 if(empty($password))

21 {

22 $password = strtolower(substr(uniqid(), -6));

23 }

24 $user = new User;

helper.php (http://jfusion.googlecode.com/svn/trunk/) PHP · 161 lines

93 $dokuwiki_cookie_salt = JFile::read($saltfile);

94 if(empty($dokuwiki_cookie_salt)){

95 $dokuwiki_cookie_salt = uniqid(rand(),true);

96 JFile::write($saltfile,$dokuwiki_cookie_salt);

97 }

ConfigurationTest.php (https://bitbucket.org/marketing_alfatec/colette.git) PHP · 243 lines

106 return false;

107 }

108 $dummy = rtrim($dir, '\\/').DIRECTORY_SEPARATOR.uniqid();

109 if (@file_put_contents($dummy, 'test'))

110 {

order.php (https://github.com/TdroL/hurtex.git) PHP · 82 lines

19 <tbody>

20 <?php foreach($products as $v): ?>

21 <tr id="product_<?php echo !empty($v->product->id) ? $v->product->id : uniqid() ?>">

22 <td><p>

23 <a class="product_name" href="<?php echo url::site('products/details.'.$v->product->id) ?>"><b><?php echo $v->product->name ?></b></a>