php小笔记
<!--
/* Font Definitions */
@font-face
{font-family:宋体;
panose-1:2 1 6 0 3 1 1 1 1 1;
mso-font-alt:SimSun;
mso-font-charset:134;
mso-generic-font-family:auto;
mso-font-pitch:variable;
mso-font-signature:3 135135232 16 0 262145 0;}
@font-face
{font-family:"\@宋体";
panose-1:2 1 6 0 3 1 1 1 1 1;
mso-font-charset:134;
mso-generic-font-family:auto;
mso-font-pitch:variable;
mso-font-signature:3 135135232 16 0 262145 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{mso-style-parent:"";
margin:0cm;
margin-bottom:.0001pt;
text-align:justify;
text-justify:inter-ideograph;
mso-pagination:none;
font-size:10.5pt;
mso-bidi-font-size:12.0pt;
font-family:"Times New Roman";
mso-fareast-font-family:宋体;
mso-font-kerning:1.0pt;}
/* Page Definitions */
@page
{mso-page-border-surround-header:no;
mso-page-border-surround-footer:no;}
@page Section1
{size:595.3pt 841.9pt;
margin:72.0pt 90.0pt 72.0pt 90.0pt;
mso-header-margin:42.55pt;
mso-footer-margin:49.6pt;
mso-columns:2 even 21.25pt;
mso-paper-source:0;
layout-grid:15.6pt;}
div.Section1
{page:Section1;}
-->
abs --
绝对值
ceil --
进一法取整
floor --
舍去法取整
max --
找出最大值
min --
找出最小值
rand --
产生一个随机整数
round --
对浮点数进行四舍五入
sqrt --
平方根
array_keys --
返回数组中所有的键名
array_rand --
从数组中随机取出一个或多个单元
arsort --
对数组进行逆向排序并保持索引关系
asort --
对数组进行排序并保持索引关系
in_array --
检查数组中是否存在某个值
krsort --
对数组按照键名逆向排序
ksort --
对数组按照键名排序
list --
把数组中的值赋给一些变量
natsort --
用“自然排序”算法对数组排序
range --
建立一个包含指定范围单元的数组
rsort --
对数组逆向排序
sort --
对数组排序
sort_num
in_array --
检查数组中是否存在某个值
extract --
从数组中将变量导入到当前的符号表
array_
相关文档:
(PHP 4 >= 4.0.4)
功能说明:Check for numeric character(s)
Description
bool ctype_digit ( string text)
Returns TRUE if every character in text is a decimal digit, FALSE otherwise.
例子 1. A ctype_digit() example
<?php $strings = array('1820.20', '10002', 'wsl!12'); foreach ($strings ......
1.是否可以在类的外部访问一个属性是由访问修饰符来确定的。
2.从类的外部直接访问类的属性是糟糕的想法。面向对象的一个方法就是鼓励封装。在PHP中,我们一般通过__get()与__set()函数来实现对
属性的访问.如果不直接访问一个类的属性而是编写访问函数,那么可以通过一段代码执行所有访问。最初的访问函数如下所示:
cla ......
class A extends father{
function __construct() {
echo "abstract<br>";
parent::base(); //父类方法
&nb ......