<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>LocalDev &#187; string</title>
	<atom:link href="http://localdev.de/tags/string/feed/" rel="self" type="application/rss+xml" />
	<link>http://localdev.de</link>
	<description>Web, Desktop &#38; Mobile Development</description>
	<lastBuildDate>Thu, 01 Dec 2011 18:54:03 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>String, Float, Int und Object in Array casten</title>
		<link>http://localdev.de/2010/05/string-float-int-und-object-in-array-casten/</link>
		<comments>http://localdev.de/2010/05/string-float-int-und-object-in-array-casten/#comments</comments>
		<pubDate>Mon, 17 May 2010 21:00:35 +0000</pubDate>
		<dc:creator>Fabian Martin</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Tipps & Tricks]]></category>
		<category><![CDATA[Array]]></category>
		<category><![CDATA[dump]]></category>
		<category><![CDATA[Float]]></category>
		<category><![CDATA[Integer]]></category>
		<category><![CDATA[Object]]></category>
		<category><![CDATA[Objekt]]></category>
		<category><![CDATA[string]]></category>
		<category><![CDATA[Variable]]></category>

		<guid isPermaLink="false">http://localdev.de/?p=773</guid>
		<description><![CDATA[Schon gewusst das man, in PHP, Variablen ganz einfach in ein Array wandeln kann? String, Float, Integer Der Wert wird zur ersten Position im Array Objekte Die Eigenschaften des Objekts finden sich im Array als Werte wieder. Je nach Sichtbarkeit, hat der Schlüssel einen Prefix, oder auch nicht.]]></description>
			<content:encoded><![CDATA[<p>Schon gewusst das man, in PHP, Variablen ganz einfach in ein Array wandeln kann?</p>
<p><strong>String, Float, Integer</strong><br />
Der Wert wird zur ersten Position im Array</p>
<pre class="brush: php; title: ; notranslate">
$strTest = &quot;Test&quot;;
$arrTest = (array)$strTest;
var_dump($arrTest);

/**
 * array(1) {
 *  [0]=&gt;
 *  string(4) &quot;Test&quot;
 * }
 */

$intTest = 123;
$arrTest = (array)$intTest;
var_dump($arrTest);

/**
 * array(1) {
 *  [0]=&gt;
 *  int(123)
 * }
 */

$fltTest = 1.23;
$arrTest = (array)$fltTest;
var_dump($arrTest);

/**
 * array(1) {
 *  [0]=&gt;
 *  float(1.23)
 * }
 */
</pre>
<p><b>Objekte</b><br />
Die Eigenschaften des Objekts finden sich im Array als Werte wieder. Je nach Sichtbarkeit, hat der Schlüssel einen Prefix, oder auch nicht.</p>
<pre class="brush: php; title: ; notranslate">
class TestClass
{
	public $intPublicVar = 1;

	protected $intPortectedVar = 2;

	private $intPrivateVar = 3;
}

$objTest = new TestClass();
$arrTest = (array)$objTest;
var_dump($arrTest);

/**
 * array(3) {
 *  [&quot;intPublicVar&quot;]=&gt;
 *  int(1)
 *  [&quot;*intPortectedVar&quot;]=&gt;
 *  int(2)
 *  [&quot;TestClassintPrivateVar&quot;]=&gt;
 *  int(3)
 * }
 */
</pre>
]]></content:encoded>
			<wfw:commentRss>http://localdev.de/2010/05/string-float-int-und-object-in-array-casten/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>PHP: String in einzelne Buchstaben aufteilen</title>
		<link>http://localdev.de/2009/11/php-string-in-einzelne-buchstaben-aufteilen/</link>
		<comments>http://localdev.de/2009/11/php-string-in-einzelne-buchstaben-aufteilen/#comments</comments>
		<pubDate>Thu, 26 Nov 2009 14:32:27 +0000</pubDate>
		<dc:creator>Fabian Martin</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Tipps & Tricks]]></category>
		<category><![CDATA[PCRE]]></category>
		<category><![CDATA[preg]]></category>
		<category><![CDATA[preg_split]]></category>
		<category><![CDATA[split]]></category>
		<category><![CDATA[string]]></category>

		<guid isPermaLink="false">http://localdev.de/?p=321</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[<pre class="brush: php; title: ; notranslate">
$arrResult = preg_split(&quot;//&quot;, &quot;ABCD&quot;, -1, PREG_SPLIT_NO_EMPTY);
/*
	Ergebnis:
	Array (
		[0] =&gt; A
		[1] =&gt; B
		[2] =&gt; C
		[3] =&gt; D
	)
*/
</pre>
]]></content:encoded>
			<wfw:commentRss>http://localdev.de/2009/11/php-string-in-einzelne-buchstaben-aufteilen/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

