黄色国产视频,男女啪啪18禁无遮挡激烈,久草热8精品视频在线观看,四虎国产精品永久在线下载

            公司面試題之:騰訊PHP工程師筆試題

            時間:2022-07-13 04:12:19 筆試 我要投稿
            • 相關推薦

            公司面試題之:騰訊PHP工程師筆試題

            1. 請對pOSIX風格和兼容perl風格兩種正則表達式的主要函數進行類比說明
            ereg preg_match
            ereg_replace preg_replace


            2. 請說明在php.ini中safe_mode開啟之后對于pHp系統函數的影響


            3. pHp5中魔術方法函數有哪幾個,請舉例說明各自的用法

            __sleep
            __wakeup
            __toString
            __set_state
            __construct,
            __destruct
            __call,
            __get,
            __set,
            __isset,
            __unset
            __sleep,
            __wakeup,
            __toString,
            __set_state,
            __clone
            __autoload


            4. 請寫出讓,并說明如何在命令行下運行pHp腳本(寫出兩種方式)同時向pHp腳本傳遞參數?


            5. pHp的垃圾收集機制是怎樣的


            6.使對象可以像數組一樣進行foreach循環,要求屬性必須是私有。
            (Iterator模式的pHp5實現,寫一類實現Iterator接口)


            7.請寫一段pHp代碼,確保多個進程同時寫入同一個文件成功


            8. 用pHp實現一個雙向隊列


            9. 使用正則表達式提取一段標識語言(html或xml)代碼段中指定標簽的指定屬性值(需考慮屬性值對不規則的情況,如大小寫不敏感,屬性名值與等號間有 空格等)。此處假設需提取test標簽的attr屬性值,請自行構建包含該標簽的串

            公司面試題之:騰訊PHP工程師筆試題






            10.請使用socket相關函數(非curl)實現如下功能:構造一個post請求,發送到指定http  server的指定端口的指定請求路徑。請求中包含以下變量:

            用戶名(username):溫柔一刀
            密碼(pwd):&123=321&321=123&
            個人簡介(intro):Hello world!

            且該http server需要以下cookie來進行簡單的用戶動作跟蹤:

            cur_query:you&me
            last_tm:...(上次請求的unix時間戳,定為當前請求時間前10分鐘)
            cur_tm:...(當前請求的unix時間戳)

            設置超時為10秒,發出請求后,將http server的響應內容輸出。復制內容到剪貼板代碼:Function encode($data,  $sep = ‘&’){
            while (list($k,$v) = each($data)) {
            $encoded .= ($encoded ? "$sep" : "");
            $encoded .= rawurlencode($k)."=".rawurlencode($v);
            }
            Return $encoded;
            }

            Function post($url, $post, $cookie){
            $url = parse_url($url);
            $post = encode($data, ‘&’);
            $cookie = encode($cookieArray, ‘;’);
            $fp = fsockopen($url[host], $url[port] ? $url[port] : 80, $errno,  $errstr, 10);
            if (!$fp) return "Failed to open socket to $url[host]";

            fputs($fp, sprintf("pOST %s%s%s HTTp/1.0\n", $url[path], $url[query]  ? "?" : "", $url[query]));
            fputs($fp, "Host: $url[host]\n");
            fputs($fp, "Content-type: application/x-www-form-urlencoded\n");
            fputs($fp, "Content-length: " . strlen($encoded) . "\n");
            fputs($fp, "Cookie: $cookie\n\n");
            fputs($fp, "Connection: close\n\n");
            fputs($fp, "$post \n");

            while (!feof($fp)) {
            echo fgets($fp, 128);
            }
            fclose($fp);
            }

            $url = ‘http://www.example.com:8080/test’;  
            $encoded = username=溫柔一刀& pwd=
            $post = array(
            ‘username’=> ‘溫柔一刀’,
            ‘pwd => ‘&123=321&321=123&’,
            ‘intro => ‘Hello world!’
            );
            $cookie = array(
            ‘cur_query’ => ‘you&me,
            ‘last_tm’ => time() - 600,
            ‘cur_tm ‘=> time()
            );

            post($url, $post, $cookie);
            11.你用什么方法檢查pHp腳本的執行效率(通常是腳本執行時間)和數據庫SQL的效率(通常是數據庫Query時間),并定位和分析腳本執行和數據庫查詢的瓶頸所在?
            1.腳本執行時間,啟用xdebug,使用WinCacheGrind分析。
            2.數據庫查詢,mysql使用EXpLAIN分析查詢,啟用slow  query log記錄慢查詢。


            pHp LAMp Engineer Test paper
            Question 1
            What does print out?
            A) 3
            B) False
            C) Null
            D) 1
            E) 0

            Question 2
            Which of the following snippets prints a representation of 42 with two  decimal places?
            A) printf("%.2d\n", 42);
            B) printf("%1.2f\n", 42);
            C) printf("%1.2u\n", 42);

            Question 3
            Given
            $text = Content-Type: text/xml;
            Which of the following prints ext/xml?
            A) print substr($text, strchr($text, :));
            B) print substr($text, strchr($text, :) + 1);
            C) print substr($text, strpos($text, :) + 1);
            D) print substr($text, strpos($text, :) + 2);
            E) print substr($text, 0, strchr($text, :)
            Question 4
            What is the value of $a?
            $a = in_array(
            主站蜘蛛池模板: 亚洲中文字幕无码中字| 亚州成人| 91嫩草丨国产丨精品| 高潮内射双龙视频| 狠狠色噜噜狠狠狠狠97首创麻豆| 免费黄色欧美| 超碰av在线播放| 中文字幕少妇在线三级hd| 欧美三级真做在线观看| 国产日韩亚洲欧美| 亚洲精品小视频| 午夜日本永久乱码免费播放片| 日韩亚洲欧美久久久www综合| 亚洲精品国产精品乱码在线观看| 免费成人激情视频| sdde在线| 色一色av| 男人的天堂中文字幕熟女人妻| 老熟女高潮喷水了| 麻豆精品乱码一二三区别蜜臀在线| 91精品国产乱码久| 三级一区二区三区| 国产三级在线观看播放视频| 成人一区二区三区视频在线观看| 日本成人不卡| 日韩不卡的av| 国产成人一区二区三区免费| 色悠久久久久综合网国产| 91专区在线| 欧美三区视频| 黄瓜视频污污| 国产卡一卡二卡三无线乱码新区| 97国产超碰一区二区三区| 亚洲中文字幕无码不卡电影 | 污视频在线观看免费视频| 亚洲成a∧人片在线观看无码| 99久久99久久免费精品蜜桃| av毛片在线| 啪啪69xxⅹ偷拍| 九九av在线| 日韩系列精品无码免费不卡 |