Home  >  Article  >  php教程  >  printout

printout

WBOY
WBOYOriginal
2016-08-15 16:49:491645browse
跳至 [1] [全屏预览]
<?php

/*

	大于输出

*/

$arr = [

	'info' => 1,
	'data' => 2,
	'time' => time()
];

printData($arr);

P($arr);


function P(){
	
	$info =  func_get_args();

	echo '<pre class="brush:php;toolbar:false">';
	
	foreach($info as $k=>$v){
		
		if(is_array($v)){
			print_r($v);
		}else{
			var_dump($v);
		}
		
	}

}

function printData($data){
	
	echo '<pre class="brush:php;toolbar:false">';
	
	print_r($data);
	
	
	
}
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Previous article:php throws exceptionNext article:php throws exception