課程
/后端開發(fā)
/PHP
/PHP進(jìn)階篇-函數(shù)
我用的是在線編輯器,然后運(yùn)行的結(jié)果不一樣,老師能解決一下嗎
2017-11-29
源自:PHP進(jìn)階篇-函數(shù) 2-4
正在回答
<?php //第二種全局變量$GLOBALS,將使用過的全局變量全部顯示出來 print_r($GLOBALS); echo?'<hr/>'; $name='king'; $age=12; $email='123@qq.com'; function?test5(){ ????echo?'用戶名:'.$GLOBALS['name'].'<br/>'; ????echo?'年齡:'.$GLOBALS['age'].'<br/>'; ????echo?'郵箱:'.$GLOBALS['email'].'<br/>'; } test5(); ?>
longlang 提問者
幻世遇見 回復(fù) longlang 提問者
longlang 提問者 回復(fù) 幻世遇見
<?php $heredoc?=?<<<?HEREDOC_ID some?$contents HEREDOC_ID; function?foo()?{ ???$a?=?[0,?1,?2]; ???return?SomeClass::$shared; } //?Sample?comment class?SomeClass?extends?One?implements?Another?{ ???private?$my; ???public?static?$shared; ???const?CONSTANT?=?0987654321; ???/** ????*?Description?by?<a?href="mailto:">user@host.dom</a> ????*?Semantic?highlighting: ????*?Generated?spectrum?to?pick?colors?for?local?variables?and?parameters: ????*??Color#1?SC1.1?SC1.2?SC1.3?SC1.4?Color#2?SC2.1?SC2.2?SC2.3?SC2.4?Color#3 ????*??Color#3?SC3.1?SC3.2?SC3.3?SC3.4?Color#4?SC4.1?SC4.2?SC4.3?SC4.4?Color#5 ????*?@param?$abc ????*?@param?$def ????*?@property?$magic ????*?@return?SomeType ????*/ ???function?doSmth($abc,?$def)?{ ??????foo(); ??????$def?.=??self::magic; ??????$def?.=??self::CONSTANT; ??????$v?=?Helper::convert($abc?.?"\n?{$def}"?.?$$def); ??????$q?=?new?Query(?$this->invent(abs(0x80))?); ??????return?array($v?=>?$q->result); ???} } interface?Another?{ } include?(dirname(__FILE__)?.?"inc.php"); `rm?-r`; goto?Label; Label: №
舉報
PHP入門必看教程,帶你掌握PHP如何自定義函數(shù)和分析常見問題
3 回答問題php的運(yùn)行問題
4 回答function問題
1 回答代碼系統(tǒng)函數(shù)問題
1 回答可憐我是個小白求大神進(jìn)來看看一個特簡單的問題
1 回答最后用到call_user_func的時候里邊那個花括號是為什么?
Copyright ? 2025 imooc.com All Rights Reserved | 京ICP備12003892號-11 京公網(wǎng)安備11010802030151號
購課補(bǔ)貼聯(lián)系客服咨詢優(yōu)惠詳情
慕課網(wǎng)APP您的移動學(xué)習(xí)伙伴
掃描二維碼關(guān)注慕課網(wǎng)微信公眾號
2017-11-30
2017-11-30