Voting

: min(one, zero)?
(Example: nine)

The Note You're Voting On

CodeWorX.ch
13 years ago
here is an unconventional (and not very fast) way of detecting references within arrays:

<?php

function is_array_reference ($arr, $key) {
$isRef = false;
ob_start();
var_dump($arr);
if (
strpos(preg_replace("/[ \n\r]*/i", "", preg_replace("/( ){4,}.*(\n\r)*/i", "", ob_get_contents())), "[" . $key . "]=>&") !== false)
$isRef = true;
ob_end_clean();
return
$isRef;
}

?>

<< Back to user notes page

To Top