Evaluasi PHP 4

Quiz
•
Computers
•
10th Grade
•
Medium
MOHAMMAD SYAH
Used 2+ times
FREE Resource
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 10 pts
Apa hasil dari kode PHP berikut?
function tambah($a, $b) {
return $a + $b;
}
echo tambah(3, 4);
7
34
12
3
4
2.
MULTIPLE CHOICE QUESTION
30 sec • 10 pts
Jika sebuah array di PHP didefinisikan sebagai $warna = array("Merah", "Hijau", "Biru");, bagaimana cara mengakses nilai "Hijau"?
echo $warna[1];
echo $warna[2];
echo $warna[0];
echo $warna['Hijau'];
echo $warna;
3.
MULTIPLE CHOICE QUESTION
30 sec • 10 pts
Mana yang merupakan cara yang benar untuk mendeklarasikan fungsi di PHP?
new function myFunc() {}
function: myFunc() {}
function myFunc() {}
create myFunc() {}
def myFunc() {}
4.
MULTIPLE CHOICE QUESTION
30 sec • 10 pts
Bagaimana cara menetapkan nilai default untuk argumen dalam fungsi PHP?
function sapa($nama = "Pengguna")
function sapa($nama: "Pengguna")
function sapa($nama == "Pengguna")
function sapa($nama -> "Pengguna")
function sapa($nama ?? "Pengguna")
5.
MULTIPLE CHOICE QUESTION
30 sec • 10 pts
Apa kegunaan dari 'default argument value' dalam fungsi PHP?
Meningkatkan kecepatan eksekusi fungsi
Memberikan nilai default ketika argumen tidak diberikan
Membuat fungsi tidak bisa menerima lebih dari satu argumen
Memeriksa kesalahan dalam kode
Mengubah tipe data argumen
6.
MULTIPLE CHOICE QUESTION
30 sec • 10 pts
Manakah contoh dari associative array?
$data = array(1, 2, 3);
$data = array("nama" => "Ali", "umur" => 25);
$data = array("Ali", "Rina", "Budi");
$data = array(0 => "Ali", 1 => "Rina");
$data = array(true, false);
7.
MULTIPLE CHOICE QUESTION
30 sec • 10 pts
Dalam PHP, apa yang terjadi saat Anda mencoba mengakses indeks array yang tidak ada?
PHP akan membuat indeks tersebut
PHP menghasilkan error
PHP mengembalikan null
PHP mengembalikan false
Tidak ada yang terjadi
Create a free account and access millions of resources
Similar Resources on Wayground
10 questions
Pemahaman Dasar Komputasi

Quiz
•
9th Grade - University
8 questions
PHP_

Quiz
•
9th - 12th Grade
10 questions
Arrays and Lists

Quiz
•
6th - 12th Grade
10 questions
Quiz tentang Control Panel Hosting

Quiz
•
3rd Grade - University
10 questions
Asesmen Sumatif : Hardware, Software dan Brainware

Quiz
•
10th Grade
9 questions
Checkpoint 1 revision

Quiz
•
9th - 12th Grade
15 questions
Java Arrays Prt 1Quiz

Quiz
•
9th - 12th Grade
15 questions
ICT

Quiz
•
6th - 10th Grade
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
10 questions
UPDATED FOREST Kindness 9-22

Lesson
•
9th - 12th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
20 questions
US Constitution Quiz

Quiz
•
11th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
Discover more resources for Computers
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
20 questions
Analog vs Digital

Quiz
•
9th - 12th Grade
10 questions
Exploring Cybersecurity Techniques and Threats

Interactive video
•
6th - 10th Grade
10 questions
Understanding the Internet and Data Transmission

Interactive video
•
7th - 12th Grade