PHP Classes
elePHPant
Icontem

File: testRefDebug.php

Recommend this page to a friend!
  Classes of zinsou A.A.E.Mo´se  >  PHP Reference Variable Debug  >  testRefDebug.php  >  Download  
File: testRefDebug.php
Role: Example script
Content type: text/plain
Description: example script
Class: PHP Reference Variable Debug
Check if a variable is a reference to another one
Author: By
Last change:
Date: 6 months ago
Size: 694 bytes
 

Contents

Class file image Download
<?php
require_once('Reference.class.php');
echo
'<pre>';

$R=39;
$c=25;
$T=39;
$U=39;
$I=39;
$poiur=&$R;

$d=&$c;

class
foo {
    private
$a=8;
    public
$b = 1;
    public
$c;
    private
$d;
    static
$e;
    public function
__construct(&$c){
       
$this->c=&$c;
    }
    public function
test() {
       
var_dump(get_object_vars($this));
    }
}

$test = new foo($c);


var_dump(Reference::is(get_defined_vars(),$c,$num),$num);
var_dump(Reference::is(get_defined_vars(),$c,$num),$num);

function
testify(){
   
$y=2;
   
$x=[5,1,3,[&$y]];
   
var_dump(Reference::is(get_defined_vars(),$x[3][0],$num),$num);
}

testify();

Reference::dump(get_defined_vars(),$c);
?>