This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class test | |
{ | |
public $a; | |
private $b; | |
function __construct($a, $b) | |
{ | |
$this->a = $a; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class MethodTest | |
{ | |
public function __call($name, $arguments) | |
{ | |
// Note: value dari $name adalah case sensitive. | |
echo "Memanggil method '$name' " | |
. implode(', ', $arguments). "<br/>"; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class PropertyTest | |
{ | |
/** Location for overloaded data. */ | |
private $data = array(); | |
/** Overloading not used on declared properties. */ | |
public $declared = 1; | |
/** Overloading only used on this when accessed outside the class. */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Outer | |
{ | |
private $prop = 1; | |
protected $prop2 = 2; | |
protected function func1() | |
{ | |
return 3; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
trait daftarRumus | |
{ | |
public function luas_persegi() | |
{ | |
return "ini luas persegi"; | |
} | |
} | |
class Rumus |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
print_r(PDO::getAvailableDrivers()); | |
?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
+-------------------+------------------------+------------+ | |
| nama | alamat | nama_agama | | |
+-------------------+------------------------+------------+ | |
| Wahid Ashari | Jalan Pegangsaan Timur | Islam | | |
| Martin Natalegawa | Jalan Lingkar Luar | Kristen | | |
| Dahlan Iskandar | Jalan Tulip Semerbak | Budha | | |
| Afifah | Jalan Mawar Merah | Islam | | |
+-------------------+------------------------+------------+ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
+-------------------+------------------------+------------+ | |
| nama | alamat | nama_agama | | |
+-------------------+------------------------+------------+ | |
| Wahid Ashari | Jalan Pegangsaan Timur | Islam | | |
| Martin Natalegawa | Jalan Lingkar Luar | Kristen | | |
| Dahlan Iskandar | Jalan Tulip Semerbak | Budha | | |
| Afifah | Jalan Mawar Merah | Islam | | |
| NULL | NULL | Hindu | | |
| NULL | NULL | Konghucu | | |
| NULL | NULL | Lainnya | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
+----+------------+ | |
| id | nama_agama | | |
+----+------------+ | |
| 1 | Islam | | |
| 2 | Kristen | | |
| 3 | Hindu | | |
| 4 | Budha | | |
| 5 | Konghucu | | |
| 6 | Lainnya | | |
+----+------------+ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
+----+-------------------+---------------+---------------+----------+---------------------+----------------+------------------------+-----------------------+---------------------+---------------------+--------+ | |
| id | nama | jenis_kelamin | tanggal_lahir | id_agama | email | telpon | alamat | id_status_kepegawaian | date_created | date_update | delete | | |
+----+-------------------+---------------+---------------+----------+---------------------+----------------+------------------------+-----------------------+---------------------+---------------------+--------+ | |
| 1 | Wahid Ashari | Laki-laki | 1990-04-03 | 1 | [email protected] | +6287812340909 | Jalan Pegangsaan Timur | 2 | 2017-02-06 15:58:02 | 2017-02-06 15:58:02 | 0 | | |
| 2 | Martin Natalegawa | Laki-laki | 1979-12-28 | 2 | [email protected] | +6289655556543 | Jalan Lingkar Luar | 3 | 2017-02-06 15:58:02 | |