3v4l.org

run code in 300+ PHP versions simultaneously
<?php $xmlfile = <<< EOT <?xml version='1.0' encoding='UTF-8'?> <eveapi version="2"> <currentTime>2014-04-05 23:02:44</currentTime> <result> <rowset name="skillGroups" key="groupID" columns="groupName,groupID"> <row groupName="Planet Management" groupID="1241"> <rowset name="skills" key="typeID" columns="typeName,groupID,typeID,published"> <row typeName="Advanced Planetology" groupID="1241" typeID="2403" published="1"> <description> The advanced understanding of planet evolution allowing you to interpret data from scans of planets for resources at much higher resolutions. Bonus: The skill further increases the resolution of resource data when scanning a planet to allow for very precise surveying. Note: this skill cannot be trained on trial accounts. </description> <rank>5</rank> <rowset name="requiredSkills" key="typeID" columns="typeID,skillLevel"> <row typeID="2406" skillLevel="4"/> </rowset> <requiredAttributes> <secondaryAttribute>memory</secondaryAttribute> <primaryAttribute>intelligence</primaryAttribute> </requiredAttributes> <rowset name="skillBonusCollection" key="bonusType" columns="bonusType,bonusValue"> <row bonusType="canNotBeTrainedOnTrial" bonusValue="1"/> </rowset> </row> <row typeName="Planetology" groupID="1241" typeID="2406" published="1"> <description> The understanding of planet evolution allowing you to better interpret data from scans of planets for resources. Bonus: The skill increases the resolution of resource data when scanning a planet to allow for more accurate surveying. Note: this skill cannot be trained on trial accounts. </description> <rank>3</rank> <rowset name="requiredSkills" key="typeID" columns="typeID,skillLevel"> <row typeID="13279" skillLevel="3"/> <row typeID="3402" skillLevel="4"/> </rowset> <requiredAttributes> <primaryAttribute>intelligence</primaryAttribute> <secondaryAttribute>memory</secondaryAttribute> </requiredAttributes> <rowset name="skillBonusCollection" key="bonusType" columns="bonusType,bonusValue"> <row bonusType="canNotBeTrainedOnTrial" bonusValue="1"/> </rowset> </row> <row typeName="Interplanetary Consolidation" groupID="1241" typeID="2495" published="1"> <description> For each level in this skill, you may install a command center on one additional planet, to a maximum of 6 planets. You can have only one command center per planet. Cannot be trained on Trial Accounts. </description> <rank>4</rank> <rowset name="requiredSkills" key="typeID" columns="typeID,skillLevel"/> <requiredAttributes> <secondaryAttribute>intelligence</secondaryAttribute> <primaryAttribute>charisma</primaryAttribute> </requiredAttributes> <rowset name="skillBonusCollection" key="bonusType" columns="bonusType,bonusValue"> <row bonusType="canNotBeTrainedOnTrial" bonusValue="1"/> </rowset> </row> <row typeName="Command Center Upgrades" groupID="1241" typeID="2505" published="1"> <description> Each level in this skill improves the quality of command facility available to you, in turn allowing for a greater number of connected facilities on that planet. Cannot be trained on Trial Accounts. </description> <rank>4</rank> <rowset name="requiredSkills" key="typeID" columns="typeID,skillLevel"/> <requiredAttributes> <primaryAttribute>charisma</primaryAttribute> <secondaryAttribute>intelligence</secondaryAttribute> </requiredAttributes> <rowset name="skillBonusCollection" key="bonusType" columns="bonusType,bonusValue"> <row bonusType="canNotBeTrainedOnTrial" bonusValue="1"/> </rowset> </row> </rowset> </row> </rowset> </result> <cachedUntil>2013-10-01 18:57:01</cachedUntil> </eveapi> EOT; $sg = "1241"; $xml = simplexml_load_file($xmlfile); foreach($xml->result->rowset->row as $row){ if ((string)$row['groupID'] == $sg) { foreach($row->rowset->row as $row1) { $typename = (string)$row1['typeName']; $typeid = (string)$row1['typeID']; $public = (string)$row1['published']; $description = (string)$row1->description; $groupid = (string)$row1['groupID']; $primaryattr = (string)$row1->requiredAttributes->primaryAttribute; $secondaryattr = (string)$row1->requiredAttributes->secondaryAttribute; $rank = (string)$row1->rank; $cost = "0"; echo $typeid . " " . $typename . " " . $description . " " . $public . " " . $groupid . " " . $primaryattr . " " . $secondaryattr . " " . $rank . " " . $cost . " " . "<br>"; } } } ?>
Output for git.master, git.master_jit
Warning: simplexml_load_file(): I/O warning : failed to load external entity "<?xml version='1.0' encoding='UTF-8'?> <eveapi version="2"> <currentTime>2014-04-05 23:02:44</currentTime> <result> <rowset name="skillGroups" key="groupID" columns="groupName,groupID"> <row groupName="Planet Management" groupID="1241"> <rowset name="skills" key="typeID" columns="typeName,groupID,typeID,published"> <row typeName="Advanced Planetology" groupID="1241" typeID="2403" published="1"> <description> The advanced understanding of planet evolution allowing you to interpret data from scans of planets for resources at much higher resolutions. Bonus: The skill further increases the resolution of resource data when scanning a planet to allow for very precise surveying. Note: this skill cannot be trained on trial accounts. </description> <rank>5</rank> <rowset name="requiredSkills" key="typeID" columns="typeID,skillLevel"> <row typeID="2406" skillLevel="4"/> </rowset> <requiredAttributes> <secondaryAttribute>memory</secondaryAttribute> <primaryAttribute>intelligence</primaryAttribute> </requiredAttributes> <rowset name="skillBonusCollection" key="bonusType" columns="bonusType,bonusValue"> <row bonusType="canNotBeTrainedOnTrial" bonusValue="1"/> </rowset> </row> <row typeName="Planetology" groupID="1241" typeID="2406" published="1"> <description> The understanding of planet evolution allowing you to better interpret data from scans of planets for resources. Bonus: The skill increases the resolution of resource data when scanning a planet to allow for more accurate surveying. Note: this skill cannot be trained on trial accounts. </description> <rank>3</rank> <rowset name="requiredSkills" key="typeID" columns="typeID,skillLevel"> <row typeID="13279" skillLevel="3"/> <row typeID="3402" skillLevel="4"/> </rowset> <requiredAttributes> <primaryAttribute>intelligence</primaryAttribute> <secondaryAttribute>memory</secondaryAttribute> </requiredAttributes> <rowset name="skillBonusCollection" key="bonusType" columns="bonusType,bonusValue"> <row bonusType="canNotBeTrainedOnTrial" bonusValue="1"/> </rowset> </row> <row typeName="Interplanetary Consolidation" groupID="1241" typeID="2495" published="1"> <description> For each level in this skill, you may install a command center on one additional planet, to a maximum of 6 planets. You can have only one command center per planet. Cannot be trained on Trial Accounts. </description> <rank>4</rank> <rowset name="requiredSkills" key="typeID" columns="typeID,skillLevel"/> <requiredAttributes> <secondaryAttribute>intelligence</secondaryAttribute> <primaryAttribute>charisma</primaryAttribute> </requiredAttributes> <rowset name="skillBonusCollection" key="bonusType" columns="bonusType,bonusValue"> <row bonusType="canNotBeTrainedOnTrial" bonusValue="1"/> </rowset> </row> <row typeName="Command Center Upgrades" groupID="1241" typeID="2505" published="1"> <description> Each level in this skill improves the quality of command facility available to you, in turn allowing for a greater number of connected facilities on that planet. Cannot be trained on Trial Accounts. </description> <rank>4</rank> <rowset name="requiredSkills" key="typeID" columns="typeID,skillLevel"/> <requiredAttributes> <primaryAttribute>charisma</primaryAttribute> <secondaryAttribute>intelligence</secondaryAttribute> </requiredAttributes> <rowset name="skillBonusCollection" key="bonusType" columns="bonusType,bonusValue"> <row bonusType="canNotBeTrainedOnTrial" bonusValue="1"/> </rowset> </row> </rowset> </row> </rowset> </result> <cachedUntil>2013-10-01 18:57:01</cachedUntil> </eveapi>" in /in/bXdG2 on line 81 Warning: Attempt to read property "result" on bool in /in/bXdG2 on line 83 Warning: Attempt to read property "rowset" on null in /in/bXdG2 on line 83 Warning: Attempt to read property "row" on null in /in/bXdG2 on line 83 Warning: foreach() argument must be of type array|object, null given in /in/bXdG2 on line 83
Output for rfc.property-hooks
Warning: simplexml_load_file(): I/O warning : failed to load external entity "<?xml version='1.0' encoding='UTF-8'?> <eveapi version="2"> <currentTime>2014-04-05 23:02:44</currentTime> <result> <rowset name="skillGroups" key="groupID" columns="groupName,groupID"> <row groupName="Planet Management" groupID="1241"> <rowset name="skills" key="typeID" columns="typeName,groupID,typeID,published"> <row typeName="Advanced Planetology" groupID="1241" typeID="2403" published="1"> <description> The advanced understanding of planet evolution allowing you to interpret data from scans of planets for resources at much higher resolutions. Bonus: The skill further increases the resolution of resource data when scanning a planet to allow for very precise surveying. Note: this skill cannot be trained on trial accounts. </description> <rank>5</rank> <rowset name="requiredSkills" key="typeID" columns="typeID,skillLevel"> <row typeID="2406" skillLevel="4"/> </rowset> <requiredAttributes> <secondaryAttribute>memory</secondaryAttribute> <primaryAttribute>intelligence</primaryAttribute> </requiredAttributes> <rowset name="skillBonusCollection" key="bonusType" columns="bonusType,bonusValue"> <row bonusType="canNotBeTrainedOnTrial" bonusValue="1"/> </rowset> </row> <row typeName="Planetology" groupID="1241" typeID="2406" published="1"> <description> The understanding of planet evolution allowing you to better interpret data from scans of planets for resources. Bonus: The skill increases the resolution of resource data when scanning a planet to allow for more accurate surveying. Note: this skill cannot be trained on trial accounts. </description> <rank>3</rank> <rowset name="requiredSkills" key="typeID" columns="typeID,skillLevel"> <row typeID="13279" skillLevel="3"/> <row typeID="3402" skillLevel="4"/> </rowset> <requiredAttributes> <primaryAttribute>intelligence</primaryAttribute> <secondaryAttribute>memory</secondaryAttribute> </requiredAttributes> <rowset name="skillBonusCollection" key="bonusType" columns="bonusType,bonusValue"> <row bonusType="canNotBeTrainedOnTrial" bonusValue="1"/> </rowset> </row> <row typeName="Interplanetary Consolidation" groupID="1241" typeID="2495" published="1"> <description> For each level in this skill, you may install a command center on one additional planet, to a maximum of 6 planets. You can have only one command center per planet. Cannot be trained on Trial Accounts. </description> <rank>4</rank> <rowset name="requiredSkills" key="typeID" columns="typeID,skillLevel"/> <requiredAttributes> <secondaryAttribute>intelligence</secondaryAttribute> <primaryAttribute>charisma</primaryAttribute> </requiredAttributes> <rowset name="skillBonusCollection" key="bonusType" columns="bonusType,bonusValue"> <row bonusType="canNotBeTrainedOnTrial" bonusValue="1"/> </rowset> </row> <row typeName="Command Center Upgrades" groupID="1241" typeID="2505" published="1"> <description> Each level in this skill improves the quality of command facility available to you, in turn allowing for a greater number of connected facilities on that planet. Cannot be trained on Trial Accounts. </description> <rank>4</rank> <rowset name="requiredSkills" key="typeID" columns="typeID,skillLevel"/> <requiredAttributes> <primaryAttribute>charisma</primaryAttribute> <secondaryAttribute>intelligence</secondaryAttribute> </requiredAttributes> <rowset name="skillBonusCollection" key="bonusType" columns="bonusType,bonusValue"> <row bonusType="canNotBeTrainedOnTrial" bonusValue="1"/> </rowset> </row> </rowset> </row> </rowset> </result> <cachedUntil>2013-10-01 18:57:01</cachedUntil> </eveapi>" in /in/bXdG2 on line 81 Warning: Attempt to read property "result" on false in /in/bXdG2 on line 83 Warning: Attempt to read property "rowset" on null in /in/bXdG2 on line 83 Warning: Attempt to read property "row" on null in /in/bXdG2 on line 83 Warning: foreach() argument must be of type array|object, null given in /in/bXdG2 on line 83

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
60.64 ms | 412 KiB | 8 Q