วันพุธที่ 30 เมษายน พ.ศ. 2557

09:51

ฟังก์ชัน is_object()
check ตัวแปรว่าเป็น object หรือไม่ด้วยฟังก์ชัน is_object()





ตัวอย่าง
<?php

class test {
var $i;
}
$obj = new test;
if ( is_object($obj) )
echo "variable obj is object";


?>
ฟังก์ชัน is_object() จะ return ค่า TRUE ถ้าตัวแปรเป็น object
FALSE ถ้าตัวแปรไม่ใช่ object

0 ความคิดเห็น:

แสดงความคิดเห็น

:) :)) ;(( :-) =)) ;( ;-( :d :-d @-) :p :o :>) (o) [-( :-? (p) :-s (m) 8-) :-t :-b b-( :-# =p~ $-) (b) (f) x-) (k) (h) (c) cheer
Click to see the code!
To insert emoticon you must added at least one space before the code.