为了账号安全,请及时绑定邮箱和手机立即绑定

这些代码写出来为什么只有5个值,被打印到屏幕上呢,我觉得应该有6个啊

<?php 

echo $m1 = memory_get_usage();  

 218912

320
272
272
576220488280648310672

echo "<br />";

 $var_string = "123";

echo $m2 = memory_get_usage()-$m1; 

echo "<br />";

$n=123; 

echo $m3 = memory_get_usage()-$m1-$m2; 

echo "<br />";

$f=123.00;

echo $m4 = memory_get_usage()-$m1-$m2-$m3; 

echo "<br />";

 $var_array = array("123");

echo $m5 = memory_get_usage()-$m1-$m2-$m3-$m4;

  echo $m1 = memory_get_usage();//先写这一句。

$var =  str_repeat("liuhui", 10000);

//然后再运行这一句(把liuhuI重复10000遍)看看占用多少内存

echo $m1 = memory_get_usage();


$var_string= str_repeat("123", 10001);


echo $m1 = memory_get_usage();

?>

<?php 

echo $m1 = memory_get_usage(); 

echo "<br />";

 $var_string = "123";

echo $m2 = memory_get_usage()-$m1; 

echo "<br />";

$n=123; 

echo $m3 = memory_get_usage()-$m1-$m2; 

echo "<br />";

$f=123.00;

echo $m4 = memory_get_usage()-$m1-$m2-$m3; 

echo "<br />";

 $var_array = array("123");

echo $m5 = memory_get_usage()-$m1-$m2-$m3-$m4;

  echo $m1 = memory_get_usage();//先写这一句。

$var =  str_repeat("liuhui", 10000);

//然后再运行这一句(把liuhuI重复10000遍)看看占用多少内存

echo $m1 = memory_get_usage();


$var_string= str_repeat("123", 10001);


echo $m1 = memory_get_usage();

?>

<?php 

echo $m1 = memory_get_usage(); 

echo "<br />";

 $var_string = "123";

echo $m2 = memory_get_usage()-$m1; 

echo "<br />";

$n=123; 

echo $m3 = memory_get_usage()-$m1-$m2; 

echo "<br />";

$f=123.00;

echo $m4 = memory_get_usage()-$m1-$m2-$m3; 

echo "<br />";

 $var_array = array("123");

echo $m5 = memory_get_usage()-$m1-$m2-$m3-$m4;

  echo $m1 = memory_get_usage();//先写这一句。

$var =  str_repeat("liuhui", 10000);

//然后再运行这一句(把liuhuI重复10000遍)看看占用多少内存

echo $m1 = memory_get_usage();


$var_string= str_repeat("123", 10001);


echo $m1 = memory_get_usage();

?><?php 

echo $m1 = memory_get_usage(); 

echo "<br />";

 $var_string = "123";

echo $m2 = memory_get_usage()-$m1; 

echo "<br />";

$n=123; 

echo $m3 = memory_get_usage()-$m1-$m2; 

echo "<br />";

$f=123.00;

echo $m4 = memory_get_usage()-$m1-$m2-$m3; 

echo "<br />";

 $var_array = array("123");

echo $m5 = memory_get_usage()-$m1-$m2-$m3-$m4;

  echo $m1 = memory_get_usage();//先写这一句。

$var =  str_repeat("liuhui", 10000);

//然后再运行这一句(把liuhuI重复10000遍)看看占用多少内存

echo $m1 = memory_get_usage();


$var_string= str_repeat("123", 10001);


echo $m1 = memory_get_usage();

?><?php 

echo $m1 = memory_get_usage(); 

echo "<br />";

 $var_string = "123";

echo $m2 = memory_get_usage()-$m1; 

echo "<br />";

$n=123; 

echo $m3 = memory_get_usage()-$m1-$m2; 

echo "<br />";

$f=123.00;

echo $m4 = memory_get_usage()-$m1-$m2-$m3; 

echo "<br />";

 $var_array = array("123");

echo $m5 = memory_get_usage()-$m1-$m2-$m3-$m4;

  echo $m1 = memory_get_usage();//先写这一句。

$var =  str_repeat("liuhui", 10000);

//然后再运行这一句(把liuhuI重复10000遍)看看占用多少内存

echo $m1 = memory_get_usage();


$var_string= str_repeat("123", 10001);


echo $m1 = memory_get_usage();

?><?php 

echo $m1 = memory_get_usage(); 

echo "<br />";

 $var_string = "123";

echo $m2 = memory_get_usage()-$m1; 

echo "<br />";

$n=123; 

echo $m3 = memory_get_usage()-$m1-$m2; 

echo "<br />";

$f=123.00;

echo $m4 = memory_get_usage()-$m1-$m2-$m3; 

echo "<br />";

 $var_array = array("123");

echo $m5 = memory_get_usage()-$m1-$m2-$m3-$m4;

  echo $m1 = memory_get_usage();//先写这一句。

$var =  str_repeat("liuhui", 10000);

//然后再运行这一句(把liuhuI重复10000遍)看看占用多少内存

echo $m1 = memory_get_usage();


$var_string= str_repeat("123", 10001);


echo $m1 = memory_get_usage();

?><?php 

echo $m1 = memory_get_usage(); 

echo "<br />";

 $var_string = "123";

echo $m2 = memory_get_usage()-$m1; 

echo "<br />";

$n=123; 

echo $m3 = memory_get_usage()-$m1-$m2; 

echo "<br />";

$f=123.00;

echo $m4 = memory_get_usage()-$m1-$m2-$m3; 

echo "<br />";

 $var_array = array("123");

echo $m5 = memory_get_usage()-$m1-$m2-$m3-$m4;

  echo $m1 = memory_get_usage();//先写这一句。

$var =  str_repeat("liuhui", 10000);

//然后再运行这一句(把liuhuI重复10000遍)看看占用多少内存

echo $m1 = memory_get_usage();


$var_string= str_repeat("123", 10001);


echo $m1 = memory_get_usage();

?><?php 

echo $m1 = memory_get_usage(); 

echo "<br />";

 $var_string = "123";

echo $m2 = memory_get_usage()-$m1; 

echo "<br />";

$n=123; 

echo $m3 = memory_get_usage()-$m1-$m2; 

echo "<br />";

$f=123.00;

echo $m4 = memory_get_usage()-$m1-$m2-$m3; 

echo "<br />";

 $var_array = array("123");

echo $m5 = memory_get_usage()-$m1-$m2-$m3-$m4;

  echo $m1 = memory_get_usage();//先写这一句。

$var =  str_repeat("liuhui", 10000);

//然后再运行这一句(把liuhuI重复10000遍)看看占用多少内存

echo $m1 = memory_get_usage();


$var_string= str_repeat("123", 10001);


echo $m1 = memory_get_usage();

?>

<?php 

echo $m1 = memory_get_usage(); 

echo "<br />";

 $var_string = "123";

echo $m2 = memory_get_usage()-$m1; 

echo "<br />";

$n=123; 

echo $m3 = memory_get_usage()-$m1-$m2; 

echo "<br />";

$f=123.00;

echo $m4 = memory_get_usage()-$m1-$m2-$m3; 

echo "<br />";

 $var_array = array("123");

echo $m5 = memory_get_usage()-$m1-$m2-$m3-$m4;

  echo $m1 = memory_get_usage();//先写这一句。

$var =  str_repeat("liuhui", 10000);

//然后再运行这一句(把liuhuI重复10000遍)看看占用多少内存

echo $m1 = memory_get_usage();


$var_string= str_repeat("123", 10001);


echo $m1 = memory_get_usage();

?><?php 

echo $m1 = memory_get_usage(); 

echo "<br />";

 $var_string = "123";

echo $m2 = memory_get_usage()-$m1; 

echo "<br />";

$n=123; 

echo $m3 = memory_get_usage()-$m1-$m2; 

echo "<br />";

$f=123.00;

echo $m4 = memory_get_usage()-$m1-$m2-$m3; 

echo "<br />";

 $var_array = array("123");

echo $m5 = memory_get_usage()-$m1-$m2-$m3-$m4;

  echo $m1 = memory_get_usage();//先写这一句。

$var =  str_repeat("liuhui", 10000);

//然后再运行这一句(把liuhuI重复10000遍)看看占用多少内存

echo $m1 = memory_get_usage();


$var_string= str_repeat("123", 10001);


echo $m1 = memory_get_usage();

?><?php 

echo $m1 = memory_get_usage(); 

echo "<br />";

 $var_string = "123";

echo $m2 = memory_get_usage()-$m1; 

echo "<br />";

$n=123; 

echo $m3 = memory_get_usage()-$m1-$m2; 

echo "<br />";

$f=123.00;

echo $m4 = memory_get_usage()-$m1-$m2-$m3; 

echo "<br />";

 $var_array = array("123");

echo $m5 = memory_get_usage()-$m1-$m2-$m3-$m4;

  echo $m1 = memory_get_usage();//先写这一句。

$var =  str_repeat("liuhui", 10000);

//然后再运行这一句(把liuhuI重复10000遍)看看占用多少内存

echo $m1 = memory_get_usage();


$var_string= str_repeat("123", 10001);


echo $m1 = memory_get_usage();

?><?php 

echo $m1 = memory_get_usage(); 

echo "<br />";

 $var_string = "123";

echo $m2 = memory_get_usage()-$m1; 

echo "<br />";

$n=123; 

echo $m3 = memory_get_usage()-$m1-$m2; 

echo "<br />";

$f=123.00;

echo $m4 = memory_get_usage()-$m1-$m2-$m3; 

echo "<br />";

 $var_array = array("123");

echo $m5 = memory_get_usage()-$m1-$m2-$m3-$m4;

  echo $m1 = memory_get_usage();//先写这一句。

$var =  str_repeat("liuhui", 10000);

//然后再运行这一句(把liuhuI重复10000遍)看看占用多少内存

echo $m1 = memory_get_usage();


$var_string= str_repeat("123", 10001);


echo $m1 = memory_get_usage();

?><?php 

echo $m1 = memory_get_usage(); 

echo "<br />";

 $var_string = "123";

echo $m2 = memory_get_usage()-$m1; 

echo "<br />";

$n=123; 

echo $m3 = memory_get_usage()-$m1-$m2; 

echo "<br />";

$f=123.00;

echo $m4 = memory_get_usage()-$m1-$m2-$m3; 

echo "<br />";

 $var_array = array("123");

echo $m5 = memory_get_usage()-$m1-$m2-$m3-$m4;

  echo $m1 = memory_get_usage();//先写这一句。

$var =  str_repeat("liuhui", 10000);

//然后再运行这一句(把liuhuI重复10000遍)看看占用多少内存

echo $m1 = memory_get_usage();


$var_string= str_repeat("123", 10001);


echo $m1 = memory_get_usage();

?><?php 

echo $m1 = memory_get_usage(); 

echo "<br />";

 $var_string = "123";

echo $m2 = memory_get_usage()-$m1; 

echo "<br />";

$n=123; 

echo $m3 = memory_get_usage()-$m1-$m2; 

echo "<br />";

$f=123.00;

echo $m4 = memory_get_usage()-$m1-$m2-$m3; 

echo "<br />";

 $var_array = array("123");

echo $m5 = memory_get_usage()-$m1-$m2-$m3-$m4;

  echo $m1 = memory_get_usage();//先写这一句。

$var =  str_repeat("liuhui", 10000);

//然后再运行这一句(把liuhuI重复10000遍)看看占用多少内存

echo $m1 = memory_get_usage();


$var_string= str_repeat("123", 10001);


echo $m1 = memory_get_usage();

?>

 218912

320
272
272
576220488280648310672


 


正在回答

1 回答

可能是不够严谨或者太繁琐不够简单

0 回复 有任何疑惑可以回复我~

举报

0/150
提交
取消

这些代码写出来为什么只有5个值,被打印到屏幕上呢,我觉得应该有6个啊

我要回答 关注问题
意见反馈 帮助中心 APP下载
官方微信