Tagged articles
10 articles
Page 1 of 1
php Courses
php Courses
Dec 13, 2025 · Backend Development

When to Use Pass‑by‑Value vs Pass‑by‑Reference in PHP Functions

This article explains the differences between pass‑by‑value and pass‑by‑reference in PHP, outlines their characteristics, provides code examples for each, and offers guidance on choosing the appropriate method based on safety, memory usage, and performance considerations.

Function ParametersPHPPass by Reference
0 likes · 3 min read
When to Use Pass‑by‑Value vs Pass‑by‑Reference in PHP Functions
php Courses
php Courses
Jul 22, 2025 · Fundamentals

When Should You Use Pass‑by‑Value, Reference, or Pointer in C++?

Understanding C++ parameter passing—by value, by reference, and by pointer—is essential for optimizing performance, memory usage, and data safety, and this guide explains each method’s characteristics, provides code examples, and offers practical advice on selecting the appropriate technique for different scenarios.

Function ParametersPass by Referencec++
0 likes · 6 min read
When Should You Use Pass‑by‑Value, Reference, or Pointer in C++?
php Courses
php Courses
Dec 29, 2023 · Backend Development

Understanding PHP Function Parameter Passing: Pass-by-Value, Pass-by-Reference, Default and Variable‑Length Arguments

This article explains PHP function parameter passing, covering pass‑by‑value versus pass‑by‑reference, how to define functions with multiple, default, and variable‑length arguments, and provides clear code examples illustrating each technique for backend developers.

Function ParametersPHPPass by Reference
0 likes · 4 min read
Understanding PHP Function Parameter Passing: Pass-by-Value, Pass-by-Reference, Default and Variable‑Length Arguments
Programmer DD
Programmer DD
Oct 12, 2020 · Fundamentals

Understanding Java: Pass‑by‑Value vs Pass‑by‑Reference Explained

This article demystifies Java’s parameter passing mechanism by clarifying the distinction between primitive and reference types, illustrating how assignment and method calls affect values and objects, and explaining the underlying JVM memory model, stack, heap, and array handling with clear code examples.

JVM MemoryReference Typesjava
0 likes · 8 min read
Understanding Java: Pass‑by‑Value vs Pass‑by‑Reference Explained
Senior Brother's Insights
Senior Brother's Insights
Sep 6, 2020 · Fundamentals

Is Java Pass‑by‑Value or Pass‑by‑Reference? A Deep Dive into Method Parameter Passing

This article demystifies Java's method‑parameter passing by analyzing code examples with primitives, strings, and objects, illustrating how the JVM copies values—including reference addresses—so that arrays appear mutable while reassigning a String or object reference does not affect the original variable.

memory-modelmethod-parameterspass-by-value
0 likes · 10 min read
Is Java Pass‑by‑Value or Pass‑by‑Reference? A Deep Dive into Method Parameter Passing
Full-Stack Internet Architecture
Full-Stack Internet Architecture
Sep 3, 2020 · Fundamentals

Understanding Pass‑by‑Value and the Illusion of Pass‑by‑Reference in Java

This article explains that Java fundamentally uses pass‑by‑value for method parameters, distinguishing between primitive value types stored on the stack and reference types whose references are passed, and demonstrates the behavior with code examples that clarify why apparent reference passing is actually passing a copy of the reference.

JVMReference Typesjava
0 likes · 7 min read
Understanding Pass‑by‑Value and the Illusion of Pass‑by‑Reference in Java
Java Backend Technology
Java Backend Technology
Dec 15, 2019 · Fundamentals

Is Java Pass‑by‑Value or Pass‑by‑Reference? The Definitive Explanation

This article clarifies the long‑standing confusion about whether Java uses pass‑by‑value or pass‑by‑reference by defining both concepts, explaining the roles of actual and formal parameters, illustrating with primitive and object examples, and showing why Java is technically pass‑by‑value even for reference types.

Parameter PassingReference Typesjava
0 likes · 8 min read
Is Java Pass‑by‑Value or Pass‑by‑Reference? The Definitive Explanation
Full-Stack Internet Architecture
Full-Stack Internet Architecture
Dec 5, 2019 · Fundamentals

Understanding Java: Pass‑by‑Value vs Pass‑by‑Reference Explained

This article clarifies the long‑standing confusion about whether Java uses pass‑by‑value or pass‑by‑reference by defining the concepts, distinguishing actual and formal parameters, and demonstrating with primitive and object examples that Java always passes arguments by value, using the reference as the value for objects.

Code ExamplesParameter Passingjava
0 likes · 8 min read
Understanding Java: Pass‑by‑Value vs Pass‑by‑Reference Explained
FunTester
FunTester
Aug 24, 2019 · Fundamentals

Why Java Can't Swap Primitive Values Inside a Method – The Correct Way

This article explains that Java passes primitive arguments by value, so attempts to swap two ints inside a method have no effect on the caller, and demonstrates both the faulty implementation and the proper solutions using a temporary variable or a return value.

Swapfundamentalsjava
0 likes · 4 min read
Why Java Can't Swap Primitive Values Inside a Method – The Correct Way
Java Backend Technology
Java Backend Technology
Nov 27, 2017 · Fundamentals

Why Swapping Two Integers Fails in Java? Exploring Pass‑by‑Value, Handles, and Integer Caching

This article dissects a Java interview question about swapping two Integer variables, explaining Java's pass‑by‑value semantics, the difference between handle‑based and direct pointer object access, Integer immutability, autoboxing, the IntegerCache mechanism, and how reflection can (or cannot) modify private final fields.

AutoboxingJDKReflection
0 likes · 10 min read
Why Swapping Two Integers Fails in Java? Exploring Pass‑by‑Value, Handles, and Integer Caching