⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 19c03-2.php

📁 介绍PHP5的给类型函数应用
💻 PHP
字号:
<?php// Let's test our timing functionality, first include the file://require 'timer.php';require '19c03-1.php';// Let's generate a hundred thousand random numbersforeach(range(1,100000) as $r) {	rand();}// Now check how long that took._timer();// Generate one SHA hash, based upon the last generated number:sha1($r);// Did that take very long?_timer();// Let's create a function that will do some work for us:function do_it() {	// Immediately start a timer	_timer();		// Now just sleep for 3 seconds	sleep(3);}// Now call the function:do_it();// Then time one last time:_timer();// Now generate the text results, and output them - Will be similar to:// Timing Results// 0.00000 secs - File: 19c03-1.php - Line: 28 - Calling Function: require// 0.24862 secs - File: 19c03-2.php - Line: 12// 0.00011 secs - File: 19c03-2.php - Line: 18// 0.00005 secs - File: 19c03-2.php - Line: 23 - Calling Function: do_it// 2.98948 secs - File: 19c03-2.php - Line: 33$output = _timer_text();echo "<pre>{$output}</pre>\n";?>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -