<?php
$newfunc = create_function('$a,$b', 'return $a + $b');
echo $newfunc(2,5);
參考來源:PHP Manual
<?php
$newfunc = create_function('$a,$b', 'return $a + $b');
echo $newfunc(2,5);
this.onmouseover=function(){
if(!this.className.match(/(^|\s)hover(\s|$)/)){
this.className=(this.className+' hover')
.replace(/\s{2,}/g,' ')
.replace(/^\s+|\s+$/g, '');
}
}
this.onmouseout=function(){
this.className=this.className
.replace(/(^|\s)hover(\s|$)/,' ')
.replace(/\s{2,}/g,' ')
.replace(/^\s+|\s+$/g, '');
}
this.style.behavior=null;
p{
padding-left:30px;
behavior: url(ie_hover.htc);
}
p:hover,
p.hover{
padding-left:0;
}
* html #demo_1{
height: 1%;
}
#demo_1:after {
content: ".";
display: block;
height: 0;
clear: both;
visibility: hidden;
}
#demo_1 {
zoom: 1;
}
| float | table | margin float | margin position | padding float | |
|---|---|---|---|---|---|
| 靈活性 | 高 | 低 | 高 | 高 | 高 |
| 親和力 | 高 | 低 | 高 | 高 | 高 |
| HTML 結構 | 簡單 | 複雜 | 簡單 | 簡單 | 簡單 |
| 寬度彈性 | no | yes | yes | yes | yes |
| 允許彈性的欄位數 | 0 | all | 1 | 1 | 1 |
| overflow 容錯 | 低 | 高 | 低 | 高 | 低 |
| 瀏覽器的解析差異 | 小 | 小 | 小 | 小 | |
| 欄位的高度影響 | all | all | all | 1 | all |