<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://hotline.ubersoft.org/Sputnik/wiki/skins/common/feed.css?301"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-gb">
		<id>http://hotline.ubersoft.org/Sputnik/wiki/index.php?action=history&amp;feed=atom&amp;title=Core_Function_Where</id>
		<title>Core Function Where - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://hotline.ubersoft.org/Sputnik/wiki/index.php?action=history&amp;feed=atom&amp;title=Core_Function_Where"/>
		<link rel="alternate" type="text/html" href="http://hotline.ubersoft.org/Sputnik/wiki/index.php?title=Core_Function_Where&amp;action=history"/>
		<updated>2026-04-22T08:28:36Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.17.0</generator>

	<entry>
		<id>http://hotline.ubersoft.org/Sputnik/wiki/index.php?title=Core_Function_Where&amp;diff=5742&amp;oldid=prev</id>
		<title>UberFoX at 23:35, 21 June 2015</title>
		<link rel="alternate" type="text/html" href="http://hotline.ubersoft.org/Sputnik/wiki/index.php?title=Core_Function_Where&amp;diff=5742&amp;oldid=prev"/>
				<updated>2015-06-21T23:35:56Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: white; color:black;&quot;&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
		&lt;tr valign='top'&gt;
		&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
		&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 23:35, 21 June 2015&lt;/td&gt;
		&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 5:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 5:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;=== Description ===&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;=== Description ===&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;minus;&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Filters an array based on a &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;predicate&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Filters an array based on a &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;query and returns all matching.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;=== Parameters ===&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;=== Parameters ===&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>UberFoX</name></author>	</entry>

	<entry>
		<id>http://hotline.ubersoft.org/Sputnik/wiki/index.php?title=Core_Function_Where&amp;diff=4935&amp;oldid=prev</id>
		<title>UberFoX: 2 revisions</title>
		<link rel="alternate" type="text/html" href="http://hotline.ubersoft.org/Sputnik/wiki/index.php?title=Core_Function_Where&amp;diff=4935&amp;oldid=prev"/>
				<updated>2015-06-14T12:37:49Z</updated>
		
		<summary type="html">&lt;p&gt;2 revisions&lt;/p&gt;
&lt;table style=&quot;background-color: white; color:black;&quot;&gt;
		&lt;tr valign='top'&gt;
		&lt;td colspan='1' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
		&lt;td colspan='1' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 12:37, 14 June 2015&lt;/td&gt;
		&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>UberFoX</name></author>	</entry>

	<entry>
		<id>http://hotline.ubersoft.org/Sputnik/wiki/index.php?title=Core_Function_Where&amp;diff=4934&amp;oldid=prev</id>
		<title>UberFoX: /* Example */</title>
		<link rel="alternate" type="text/html" href="http://hotline.ubersoft.org/Sputnik/wiki/index.php?title=Core_Function_Where&amp;diff=4934&amp;oldid=prev"/>
				<updated>2014-12-12T11:23:50Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;Example&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: white; color:black;&quot;&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
		&lt;tr valign='top'&gt;
		&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
		&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 11:23, 12 December 2014&lt;/td&gt;
		&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 57:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 57:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;// Define a Person class&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;Class Person&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;{&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;	my $Name;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;	my $Age;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;	Function __Construct($Name, $Age)&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;	{&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;		$this-&amp;gt;$Name = $Name;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;		$this-&amp;gt;$Age = $Age;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;	}&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;};&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;// Create an array of them&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;// Create an array of them&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;$people = array( // Each one has a different name and age&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;$people = array( // Each one has a different name and age&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>UberFoX</name></author>	</entry>

	<entry>
		<id>http://hotline.ubersoft.org/Sputnik/wiki/index.php?title=Core_Function_Where&amp;diff=4933&amp;oldid=prev</id>
		<title>UberFoX: 1 revision</title>
		<link rel="alternate" type="text/html" href="http://hotline.ubersoft.org/Sputnik/wiki/index.php?title=Core_Function_Where&amp;diff=4933&amp;oldid=prev"/>
				<updated>2014-08-11T21:41:09Z</updated>
		
		<summary type="html">&lt;p&gt;1 revision&lt;/p&gt;
&lt;table style=&quot;background-color: white; color:black;&quot;&gt;
		&lt;tr valign='top'&gt;
		&lt;td colspan='1' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
		&lt;td colspan='1' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 21:41, 11 August 2014&lt;/td&gt;
		&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>UberFoX</name></author>	</entry>

	<entry>
		<id>http://hotline.ubersoft.org/Sputnik/wiki/index.php?title=Core_Function_Where&amp;diff=4107&amp;oldid=prev</id>
		<title>UberFoX: Created page with &quot;&lt;pre&gt; Where( &lt;array&gt;, &lt;query&gt; ) &lt;/pre&gt;  === Description ===  Filters an array based on a predicate  === Parameters ===  ==== array ====  The array to use.  ==== query ====  A que...&quot;</title>
		<link rel="alternate" type="text/html" href="http://hotline.ubersoft.org/Sputnik/wiki/index.php?title=Core_Function_Where&amp;diff=4107&amp;oldid=prev"/>
				<updated>2014-08-09T17:54:59Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;quot;&amp;lt;pre&amp;gt; Where( &amp;lt;array&amp;gt;, &amp;lt;query&amp;gt; ) &amp;lt;/pre&amp;gt;  === Description ===  Filters an array based on a predicate  === Parameters ===  ==== array ====  The array to use.  ==== query ====  A que...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
Where( &amp;lt;array&amp;gt;, &amp;lt;query&amp;gt; )&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Description ===&lt;br /&gt;
&lt;br /&gt;
Filters an array based on a predicate&lt;br /&gt;
&lt;br /&gt;
=== Parameters ===&lt;br /&gt;
&lt;br /&gt;
==== array ====&lt;br /&gt;
&lt;br /&gt;
The array to use.&lt;br /&gt;
&lt;br /&gt;
==== query ====&lt;br /&gt;
&lt;br /&gt;
A query to test each element for a condition&lt;br /&gt;
&lt;br /&gt;
=== Return Value ===&lt;br /&gt;
&lt;br /&gt;
Success: An Array that contains elements from the input sequence that satisfy the condition&lt;br /&gt;
&lt;br /&gt;
Failure: Returns null.&lt;br /&gt;
&lt;br /&gt;
=== Remarks ===&lt;br /&gt;
&lt;br /&gt;
None.&lt;br /&gt;
&lt;br /&gt;
=== Example ===&lt;br /&gt;
&lt;br /&gt;
Return all items from an array that are below 3 in length&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = array(&amp;quot;One&amp;quot;, &amp;quot;Two&amp;quot;, &amp;quot;Three&amp;quot;, &amp;quot;Four&amp;quot;);&lt;br /&gt;
foreach($a-&amp;gt;&amp;gt;Where($v =&amp;gt; StrLen($v) &amp;lt; 4) as $i)&lt;br /&gt;
{&lt;br /&gt;
	say $i;&lt;br /&gt;
}&lt;br /&gt;
// Prints&lt;br /&gt;
// One&lt;br /&gt;
// Two&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Return all items from an array that are below 3 in length and starts with the letter T&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = array(&amp;quot;One&amp;quot;, &amp;quot;Two&amp;quot;, &amp;quot;Three&amp;quot;, &amp;quot;Four&amp;quot;);&lt;br /&gt;
foreach($a-&amp;gt;&amp;gt;Where($v =&amp;gt; StrLen($v) &amp;lt; 4 &amp;amp;&amp;amp; StartsWith($v, 'T')) as $i)&lt;br /&gt;
{&lt;br /&gt;
	say $i;&lt;br /&gt;
}&lt;br /&gt;
// Prints&lt;br /&gt;
// Two&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Return all items from an array that contains class objects and filter it so only ones with a certain value range are returned&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Create an array of them&lt;br /&gt;
$people = array( // Each one has a different name and age&lt;br /&gt;
				new Person(&amp;quot;Tom&amp;quot;, 23),&lt;br /&gt;
				new Person(&amp;quot;James&amp;quot;, 17),&lt;br /&gt;
				new Person(&amp;quot;Charles&amp;quot;, 19),&lt;br /&gt;
				new Person(&amp;quot;Mike&amp;quot;, 27),&lt;br /&gt;
				new Person(&amp;quot;Steve&amp;quot;, 25)&lt;br /&gt;
				);&lt;br /&gt;
// Using Where() we will loop through and find the ones we want&lt;br /&gt;
// Lets find all the people who are under 25&lt;br /&gt;
foreach($people-&amp;gt;&amp;gt;Where($p =&amp;gt; $p-&amp;gt;$Age &amp;lt; 25) as $person)&lt;br /&gt;
{&lt;br /&gt;
	printf(&amp;quot;Name %s | Age %d\n&amp;quot;, $person-&amp;gt;$Name, $person-&amp;gt;$Age);&lt;br /&gt;
}&lt;br /&gt;
// Prints&lt;br /&gt;
// Name Tom | Age 23&lt;br /&gt;
// Name James | Age 17&lt;br /&gt;
// Name Charles | Age 19&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Same as above but with an extra check&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Define a Person class&lt;br /&gt;
Class Person&lt;br /&gt;
{&lt;br /&gt;
	my $Name;&lt;br /&gt;
	my $Age;&lt;br /&gt;
	Function __Construct($Name, $Age)&lt;br /&gt;
	{&lt;br /&gt;
		$this-&amp;gt;$Name = $Name;&lt;br /&gt;
		$this-&amp;gt;$Age = $Age;&lt;br /&gt;
	}&lt;br /&gt;
};&lt;br /&gt;
// Create an array of them&lt;br /&gt;
$people = array( // Each one has a different name and age&lt;br /&gt;
				new Person(&amp;quot;Tom&amp;quot;, 23),&lt;br /&gt;
				new Person(&amp;quot;James&amp;quot;, 17),&lt;br /&gt;
				new Person(&amp;quot;Charles&amp;quot;, 19),&lt;br /&gt;
				new Person(&amp;quot;Mike&amp;quot;, 27),&lt;br /&gt;
				new Person(&amp;quot;Steve&amp;quot;, 25)&lt;br /&gt;
				);&lt;br /&gt;
// Using Where() we will loop through and find the ones we want&lt;br /&gt;
// Lets find all the people who are under 25 but not younger than 18&lt;br /&gt;
foreach($people-&amp;gt;&amp;gt;Where($p =&amp;gt; $p-&amp;gt;$Age &amp;lt; 25 &amp;amp;&amp;amp; $p-&amp;gt;$Age &amp;gt; 18) as $person)&lt;br /&gt;
{&lt;br /&gt;
	printf(&amp;quot;Name %s | Age %d\n&amp;quot;, $person-&amp;gt;$Name, $person-&amp;gt;$Age);&lt;br /&gt;
}&lt;br /&gt;
// Prints&lt;br /&gt;
// Name Tom | Age 23&lt;br /&gt;
// Name Charles | Age 19&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Same as above but with some changes&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Define a Person class&lt;br /&gt;
Class Person&lt;br /&gt;
{&lt;br /&gt;
	my $Name;&lt;br /&gt;
	my $Age;&lt;br /&gt;
	Function __Construct($Name, $Age)&lt;br /&gt;
	{&lt;br /&gt;
		$this-&amp;gt;$Name = $Name;&lt;br /&gt;
		$this-&amp;gt;$Age = $Age;&lt;br /&gt;
	}&lt;br /&gt;
};&lt;br /&gt;
// Create an array of them&lt;br /&gt;
$people = array( // Each one has a different name and age&lt;br /&gt;
				new Person(&amp;quot;Tom&amp;quot;, 23),&lt;br /&gt;
				new Person(&amp;quot;James&amp;quot;, 17),&lt;br /&gt;
				new Person(&amp;quot;Charles&amp;quot;, 19),&lt;br /&gt;
				new Person(&amp;quot;Toby&amp;quot;, 14),&lt;br /&gt;
				new Person(&amp;quot;Mike&amp;quot;, 27),&lt;br /&gt;
				new Person(&amp;quot;Steve&amp;quot;, 25)&lt;br /&gt;
				);&lt;br /&gt;
// Using Where() we will loop through and find the ones we want&lt;br /&gt;
// Lets find all the people who are under 25 but not younger than 18&lt;br /&gt;
foreach($people-&amp;gt;&amp;gt;Where($p =&amp;gt; $p-&amp;gt;$Age &amp;lt; 25 &amp;amp;&amp;amp; StartsWith($p-&amp;gt;$Name, 'T')) as $person)&lt;br /&gt;
{&lt;br /&gt;
	printf(&amp;quot;Name %s | Age %d\n&amp;quot;, $person-&amp;gt;$Name, $person-&amp;gt;$Age);&lt;br /&gt;
}&lt;br /&gt;
// Prints&lt;br /&gt;
// Name Tom | Age 23&lt;br /&gt;
// Name Toby | Age 14&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Core Function]]&lt;/div&gt;</summary>
		<author><name>UberFoX</name></author>	</entry>

	</feed>