public function actionIndex() { //return $this->render('index'); //echo "hell0"; echo \Yii::t('app', 'Chinese'); echo "<br/>"; echo myUrl::index(); echo "<br/>"; echo \Yii::$app->params['adminEmail']; echo "<br/>" . hello_world(); }
<?php //we create a function called hello world and then run the function which prints 'Hello World' // if you look at the source of the webpage you will only see 'Hello World'. // everything ran from php runs on the server and never makes it to the client. function hello_world() { echo 'Hello World'; } hello_world(); ?>
<?php require 'includes/inc.func.php'; print hello_world();
<?php echo 'rust hello returns: '; $g = json_decode('{"a": "test"}'); //while(1) $start = microtime(true); $n = 1 << 20; $endless = false; for ($c = 0; $c < $n || $endless; ++$c) { hello_world($g) == "test" or die("NOPE"); //break; } $end = microtime(true); echo ($end - $start) * 1000;
<?php self::$hello_world = 1;
<?php function say() { print "==\n"; $i = 0; while ($i < 3) { echo $i . "\n"; $i++; sleep($i); } } echo hello_world(); //sleep(10);