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
PHP Rus

Quiz
•
10th Grade
10 questions
Programming - Arrays

Quiz
•
2nd - 12th Grade
15 questions
Javascript

Quiz
•
10th - 12th Grade
10 questions
AutoCad Practice Exam

Quiz
•
10th - 11th Grade
13 questions
A words - GCSE Computer Science

Quiz
•
1st - 10th Grade
15 questions
IF and Vlookup Function

Quiz
•
9th - 10th Grade
10 questions
Mengenal Hardware dan Software

Quiz
•
10th Grade
15 questions
วิทยาการคำนวณม.5 เรื่อง ภาษาคอมพิวเตอร์

Quiz
•
9th - 12th Grade
Popular Resources on Wayground
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
10 questions
9/11 Experience and Reflections

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

Quiz
•
5th Grade
11 questions
All about me

Quiz
•
Professional Development
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
9 questions
Tips & Tricks

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

Interactive video
•
6th - 10th Grade
10 questions
1.2 OSI & TCP IP Models Quiz

Quiz
•
10th Grade
20 questions
Digital Citizenship

Quiz
•
8th - 12th Grade
35 questions
Computer Baseline Examination 2025-26

Quiz
•
9th - 12th Grade
13 questions
Problem Solving Process

Quiz
•
9th - 12th Grade
20 questions
Hardware vs. Software Quiz

Quiz
•
7th - 10th Grade
10 questions
Understanding Algorithms with Pseudocode and Flowcharts

Interactive video
•
9th - 12th Grade
19 questions
AP CSP Unit 1 Review (code.org)

Quiz
•
10th - 12th Grade