IT quiz
All questions
Sign in
Sign up
JavaScript
HTML
CSS
PostgreSQL
PHP
Linux
Git
Docker
SCSS
TypeScript
SQL
Vue
DNS
Go
frontend (web)
Redis
backend
Gitlab
CI/CD
Vite
webpack
Node.js
HTTP
Python
Kotlin
Nuxt
Question #10
Author:
admin
tags:
PHP
$arr1 = [1, 5, 10]; $arr2 = $arr1; $arr2[1] = 7; echo $arr1[1]; // ??
What will be output?
1
5
7
10
Answer
Show explanation
In PHP, the assignment operator copies an array by value, not by reference.
Rate the difficulty of the question:
1
2
3
4
5
6
7
8
9
10
easy
hard
Next question (PHP)
→
Write new comment