SlideShare une entreprise Scribd logo
1  sur  5
You can download this document from www.besthinditutorials.com
PHP references
, इस tutorial PHP references References
स values assign स , pass स औ return
स References स suggest
variables औ functions इस PHP in Hindi :
Variables औ PHP in Hindi : Functions स
Outline
 Introduction to PHP references in Hindi
 Assigning values using PHP references in Hindi
 Passing values using PHP references in Hindi
 Returning values using PHP references in Hindi
Introduction to PHP references
PHP references value अ अ स access
pointers program
Example – References
<?php
$a =& $b;
$a = "Indian";
echo $a; // will print Indian
echo $b; // it will also print Indian
?>
You can download this document from www.besthinditutorials.com
program variables value print same
value print value refer
स स variable assign, pass औ return
व variable automatically create
program
Example – References
<?php
function myFunction(&$a)
{
$a=2;
echo $a;
}
myFunction($a);
?>
myFunction() call स स variable pass
स function इस
variable reference स इस PHP इस variable
automatically
for each referenced variables variables
value update program
Example – References (for each loop)
<?php
$arr = array(1,2,3,4,5);
$number =& $value;
foreach($arr as $value)
{
echo $value;
}
echo $number;
You can download this document from www.besthinditutorials.com
echo $value;
?>
foreach $value variable इस
स स $number variable array value update औ
variables iteration last value 5 print
Assigning by reference
variable स variable value assign simple इस
ampersand(&) operator इस reference व assign
स
Ex.
$a =& $b
स PHP reference
variables same value point References स
अ इ स स variable value
assign स value point
You can download this document from www.besthinditutorials.com
Passing by reference
references व variable स स reference स
स स function parameters ampersand (&) स declare
स स स parameter function
स औ स tasks perform स स स parameter change
argument update program
Example – Passing by reference
<?php
function myFunction(&$num)
{
$num=$num*2; // $num can be used as $a.
}
$a = 5;
myFunction($a);
echo $a; // prints 10
?>
$a reference स औ function $num
$num value change $a value change
औ 10
Returning reference
स function स reference return function स
ampersand (&) operator
You can download this document from www.besthinditutorials.com
Example – Returning references
<?php
class myClass {
public $name = "jai";
public function &myFunction() //returns reference of $name
{
return $this->name;
}
}
$obj = new myClass;
$myname = &$obj->myFunction(); // assigning by reference to $myName
echo $myname; // prints jai
$obj->name = "jai ho";
echo $myname; // prints jai ho
?>
इस स function reference return स स
variable assign
Read more tutorials on PHP in Hindi at www.besthinditutorials.com

Contenu connexe

Dernier

Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Christo Ananth
 
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingUNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
rknatarajan
 

Dernier (20)

UNIT-III FMM. DIMENSIONAL ANALYSIS
UNIT-III FMM.        DIMENSIONAL ANALYSISUNIT-III FMM.        DIMENSIONAL ANALYSIS
UNIT-III FMM. DIMENSIONAL ANALYSIS
 
Unit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdfUnit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdf
 
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
 
Generative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTGenerative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPT
 
NFPA 5000 2024 standard .
NFPA 5000 2024 standard                                  .NFPA 5000 2024 standard                                  .
NFPA 5000 2024 standard .
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghly
 
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
 
chapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineeringchapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineering
 
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
 
Intze Overhead Water Tank Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank  Design by Working Stress - IS Method.pdfIntze Overhead Water Tank  Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank Design by Working Stress - IS Method.pdf
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performance
 
Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)
 
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingUNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
 
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
 
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
 
Online banking management system project.pdf
Online banking management system project.pdfOnline banking management system project.pdf
Online banking management system project.pdf
 
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptxBSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
 
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
 
Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024
 

En vedette

How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
 

En vedette (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

Php references in hindi

  • 1. You can download this document from www.besthinditutorials.com PHP references , इस tutorial PHP references References स values assign स , pass स औ return स References स suggest variables औ functions इस PHP in Hindi : Variables औ PHP in Hindi : Functions स Outline  Introduction to PHP references in Hindi  Assigning values using PHP references in Hindi  Passing values using PHP references in Hindi  Returning values using PHP references in Hindi Introduction to PHP references PHP references value अ अ स access pointers program Example – References <?php $a =& $b; $a = "Indian"; echo $a; // will print Indian echo $b; // it will also print Indian ?>
  • 2. You can download this document from www.besthinditutorials.com program variables value print same value print value refer स स variable assign, pass औ return व variable automatically create program Example – References <?php function myFunction(&$a) { $a=2; echo $a; } myFunction($a); ?> myFunction() call स स variable pass स function इस variable reference स इस PHP इस variable automatically for each referenced variables variables value update program Example – References (for each loop) <?php $arr = array(1,2,3,4,5); $number =& $value; foreach($arr as $value) { echo $value; } echo $number;
  • 3. You can download this document from www.besthinditutorials.com echo $value; ?> foreach $value variable इस स स $number variable array value update औ variables iteration last value 5 print Assigning by reference variable स variable value assign simple इस ampersand(&) operator इस reference व assign स Ex. $a =& $b स PHP reference variables same value point References स अ इ स स variable value assign स value point
  • 4. You can download this document from www.besthinditutorials.com Passing by reference references व variable स स reference स स स function parameters ampersand (&) स declare स स स parameter function स औ स tasks perform स स स parameter change argument update program Example – Passing by reference <?php function myFunction(&$num) { $num=$num*2; // $num can be used as $a. } $a = 5; myFunction($a); echo $a; // prints 10 ?> $a reference स औ function $num $num value change $a value change औ 10 Returning reference स function स reference return function स ampersand (&) operator
  • 5. You can download this document from www.besthinditutorials.com Example – Returning references <?php class myClass { public $name = "jai"; public function &myFunction() //returns reference of $name { return $this->name; } } $obj = new myClass; $myname = &$obj->myFunction(); // assigning by reference to $myName echo $myname; // prints jai $obj->name = "jai ho"; echo $myname; // prints jai ho ?> इस स function reference return स स variable assign Read more tutorials on PHP in Hindi at www.besthinditutorials.com