<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	>
<channel>
	<title>Comments for Mach13</title>
	<atom:link href="http://mach13.com/comments/feed" rel="self" type="application/rss+xml" />
	<link>http://mach13.com</link>
	<description>Internet Solutions</description>
	<pubDate>Fri, 10 Feb 2012 18:27:51 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>Comment on Loose and multiline parse_ini_file function in Php by Johnny</title>
		<link>http://mach13.com/loose-and-multiline-parse_ini_file-function-in-php/comment-page-1#comment-662</link>
		<dc:creator>Johnny</dc:creator>
		<pubDate>Sun, 15 Jan 2012 15:29:04 +0000</pubDate>
		<guid isPermaLink="false">http://mach13.com/?p=64#comment-662</guid>
		<description>Works! (Tried other three from google search.) Thank you.

Although I do not trust long regular expressions...</description>
		<content:encoded><![CDATA[<p>Works! (Tried other three from google search.) Thank you.</p>
<p>Although I do not trust long regular expressions&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Loose and multiline parse_ini_file function in Php by Raj</title>
		<link>http://mach13.com/loose-and-multiline-parse_ini_file-function-in-php/comment-page-1#comment-656</link>
		<dc:creator>Raj</dc:creator>
		<pubDate>Thu, 10 Feb 2011 14:47:29 +0000</pubDate>
		<guid isPermaLink="false">http://mach13.com/?p=64#comment-656</guid>
		<description>Nice code.

@nerik:

I had the same problem. I solved it this way:

Replace the preg_match_all(....); stuff with

preg_match_all('#^\s*((\['.$s.'\])&#124;(("?)'.$s.'\\5\s*=\s{0}("?)(.*?)\\7))\s*(;[^\n]*?)?$#ms', @file_get_contents($iIniFile), $aMatches, PREG_SET_ORDER);

Could be done better, I'm new to regular expressions - it looked like chinese to me at first.</description>
		<content:encoded><![CDATA[<p>Nice code.</p>
<p>@nerik:</p>
<p>I had the same problem. I solved it this way:</p>
<p>Replace the preg_match_all(&#8230;.); stuff with</p>
<p>preg_match_all(&#8217;#^\s*((\['.$s.'\])|((&#8221;?)&#8217;.$s.&#8217;\\5\s*=\s{0}(&#8221;?)(.*?)\\7))\s*(;[^\n]*?)?$#ms&#8217;, @file_get_contents($iIniFile), $aMatches, PREG_SET_ORDER);</p>
<p>Could be done better, I&#8217;m new to regular expressions - it looked like chinese to me at first.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on How to get a variable name as a string in PHP by admin</title>
		<link>http://mach13.com/how-to-get-a-variable-name-as-a-string-in-php/comment-page-1#comment-655</link>
		<dc:creator>admin</dc:creator>
		<pubDate>Thu, 03 Feb 2011 08:23:28 +0000</pubDate>
		<guid isPermaLink="false">http://mach13.com/?p=7#comment-655</guid>
		<description>for comments #6 and #7

First I was excited to see how your solution works.

After some tries, I realized that "compact" is of complete no use here...

You have to enter the variable name as a string parameter... to finally get this variable name...

a simple 
function varName($theVarName) { return $theVarName; }
does the same.  :(

Problem is to enter the variable itself as a parameter to get its name.</description>
		<content:encoded><![CDATA[<p>for comments #6 and #7</p>
<p>First I was excited to see how your solution works.</p>
<p>After some tries, I realized that &#8220;compact&#8221; is of complete no use here&#8230;</p>
<p>You have to enter the variable name as a string parameter&#8230; to finally get this variable name&#8230;</p>
<p>a simple<br />
function varName($theVarName) { return $theVarName; }<br />
does the same.  <img src='http://mach13.com/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> </p>
<p>Problem is to enter the variable itself as a parameter to get its name.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on How to get a variable name as a string in PHP by How to get a variable name as a string in PHP - Making stuff work - Tech Notes</title>
		<link>http://mach13.com/how-to-get-a-variable-name-as-a-string-in-php/comment-page-1#comment-654</link>
		<dc:creator>How to get a variable name as a string in PHP - Making stuff work - Tech Notes</dc:creator>
		<pubDate>Thu, 03 Feb 2011 03:07:06 +0000</pubDate>
		<guid isPermaLink="false">http://mach13.com/?p=7#comment-654</guid>
		<description>[...] http://mach13.com/how-to-get-a-variable-name-as-a-string-in-php [...]</description>
		<content:encoded><![CDATA[<p>[...] <a href="http://mach13.com/how-to-get-a-variable-name-as-a-string-in-php" rel="nofollow">http://mach13.com/how-to-get-a-variable-name-as-a-string-in-php</a> [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on How to get a variable name as a string in PHP by EngineerGreg</title>
		<link>http://mach13.com/how-to-get-a-variable-name-as-a-string-in-php/comment-page-1#comment-653</link>
		<dc:creator>EngineerGreg</dc:creator>
		<pubDate>Wed, 02 Feb 2011 23:33:42 +0000</pubDate>
		<guid isPermaLink="false">http://mach13.com/?p=7#comment-653</guid>
		<description>You can do it by converting the variable to a key/value set before passing it to the function.

    function varName($theVar) {  
       $variableName = key($theVar);  
       $variableValue = $theVar[$variableName];  
       echo ('The name of the variable used in the function call was '.$variableName.'');  
       echo ('The value of the variable used in the function call was '.$variableValue.'');  
    }
    $myVar = 'abc';
    varName(compact('myVar'));

Though I don't recommend creating a reference to a nameless variable, `function varName(&#38;$theVar)` works too.

Since compact() takes the variable name as a string rather than the actual variable, iterating over a list of variable names should be easy. 

As to why you would want to do this -- don't ask me but it seems like a lot of people ask the question so here's my solution.</description>
		<content:encoded><![CDATA[<p>You can do it by converting the variable to a key/value set before passing it to the function.</p>
<p>    function varName($theVar) {<br />
       $variableName = key($theVar);<br />
       $variableValue = $theVar[$variableName];<br />
       echo (&#8217;The name of the variable used in the function call was &#8216;.$variableName.&#8221;);<br />
       echo (&#8217;The value of the variable used in the function call was &#8216;.$variableValue.&#8221;);<br />
    }<br />
    $myVar = &#8216;abc&#8217;;<br />
    varName(compact(&#8217;myVar&#8217;));</p>
<p>Though I don&#8217;t recommend creating a reference to a nameless variable, `function varName(&amp;$theVar)` works too.</p>
<p>Since compact() takes the variable name as a string rather than the actual variable, iterating over a list of variable names should be easy. </p>
<p>As to why you would want to do this &#8212; don&#8217;t ask me but it seems like a lot of people ask the question so here&#8217;s my solution.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on How to get a variable name as a string in PHP by Yehia</title>
		<link>http://mach13.com/how-to-get-a-variable-name-as-a-string-in-php/comment-page-1#comment-651</link>
		<dc:creator>Yehia</dc:creator>
		<pubDate>Tue, 11 Jan 2011 11:04:37 +0000</pubDate>
		<guid isPermaLink="false">http://mach13.com/?p=7#comment-651</guid>
		<description>Impressive.</description>
		<content:encoded><![CDATA[<p>Impressive.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on How to get a variable name as a string in PHP by reeze</title>
		<link>http://mach13.com/how-to-get-a-variable-name-as-a-string-in-php/comment-page-1#comment-650</link>
		<dc:creator>reeze</dc:creator>
		<pubDate>Fri, 05 Nov 2010 02:36:56 +0000</pubDate>
		<guid isPermaLink="false">http://mach13.com/?p=7#comment-650</guid>
		<description>Thanks for sharing.
I trying to find a way  to do the samething you have done. I choose to use php extension. then I find your solution. It works great. but the other day I found It can't work like:

$a = 10;
$b =&#38;$a;

var_name($b, get_defined_vars()); // a instead of a.</description>
		<content:encoded><![CDATA[<p>Thanks for sharing.<br />
I trying to find a way  to do the samething you have done. I choose to use php extension. then I find your solution. It works great. but the other day I found It can&#8217;t work like:</p>
<p>$a = 10;<br />
$b =&amp;$a;</p>
<p>var_name($b, get_defined_vars()); // a instead of a.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Loose and multiline parse_ini_file function in Php by Ed Greenberg</title>
		<link>http://mach13.com/loose-and-multiline-parse_ini_file-function-in-php/comment-page-1#comment-649</link>
		<dc:creator>Ed Greenberg</dc:creator>
		<pubDate>Fri, 03 Sep 2010 15:49:59 +0000</pubDate>
		<guid isPermaLink="false">http://mach13.com/?p=64#comment-649</guid>
		<description>This is a very nice piece of work, and I really appreciate your posting it. I was able to use it today, and it made my life easier. 

Many thanks.</description>
		<content:encoded><![CDATA[<p>This is a very nice piece of work, and I really appreciate your posting it. I was able to use it today, and it made my life easier. </p>
<p>Many thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on How to get a variable name as a string in PHP by youlleck</title>
		<link>http://mach13.com/how-to-get-a-variable-name-as-a-string-in-php/comment-page-1#comment-648</link>
		<dc:creator>youlleck</dc:creator>
		<pubDate>Thu, 12 Aug 2010 18:23:35 +0000</pubDate>
		<guid isPermaLink="false">http://mach13.com/?p=7#comment-648</guid>
		<description>Works only when there are no class objects - catchable fatal error otherwise</description>
		<content:encoded><![CDATA[<p>Works only when there are no class objects - catchable fatal error otherwise</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on How to get a variable name as a string in PHP by shafy</title>
		<link>http://mach13.com/how-to-get-a-variable-name-as-a-string-in-php/comment-page-1#comment-647</link>
		<dc:creator>shafy</dc:creator>
		<pubDate>Tue, 10 Aug 2010 05:39:56 +0000</pubDate>
		<guid isPermaLink="false">http://mach13.com/?p=7#comment-647</guid>
		<description>Good Done!</description>
		<content:encoded><![CDATA[<p>Good Done!</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- e-pla.net::website monitoring -->



