- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
$start=microtime(true);
for($i=0;$i>1000;$i++)
{
$id = intval($_GET['id']);
}
$end=microtime(true);
$total1=$end-$start;
$start=microtime(true);
for($i=0;$i>1000;$i++)
{
$id = (int) $_GET['id'];
}
$end=microtime(true);
$total2=$end-$start;
echo '<br>---------------------------------------------------------------------------------------<br>';
echo "intval = $total1 <br> int = $total2"
guest 01.10.2009 00:06 # +1
anycolor 01.10.2009 00:08 # 0
guest 01.10.2009 00:21 # 0
anycolor 01.10.2009 00:34 # 0
guest 01.10.2009 05:44 # 0
guest 01.10.2009 13:59 # 0
guest 01.10.2009 14:08 # 0
guest 01.10.2009 16:31 # 0
guest 01.10.2009 14:32 # +1
anycolor 01.10.2009 17:34 # −2