3v4l.org

run code in 300+ PHP versions simultaneously
<?php $response = simplexml_load_string('<?xml version="1.0" encoding="UTF-8"?> <methodResponse> <params> <param> <value> <struct> <member> <name>mainKeyNumber</name> <value>PLSK.10009166.0000</value> </member> <member> <name>expirationDate</name> <value> <dateTime.iso8601>20121229T00:00:00</dateTime.iso8601> </value> </member> <member> <name>productKey</name> <value>A01E00-BYEY10-H0F200-6QFP91-NHF966</value> </member> <member> <name>additionalKeysNumbers</name> <value> <array> <data> <value>KAV.10009167.0000</value> <value>APS.10009168.0000</value> <value>KAV.10009169.0000</value> </data> </array> </value> </member> <member> <name>resultCode</name> <value> <int>100</int> </value> </member> <member> <name>resultDesc</name> <value>PLSK.10009166.0000 has been successfully created. Following additional keys were attached: KAV.10009167.0000, APS.10009168.0000, KAV.10009169.0000.</value> </member> <member> <name>updateDate</name> <value> <dateTime.iso8601>20121219T00:00:00</dateTime.iso8601> </value> </member> </struct> </value> </param> </params> </methodResponse>'); $element = $response->params->param->value->struct->member[3]->value->array->data->value[0]; var_dump(each($element));
Output for 8.0.0 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.6
Fatal error: Uncaught Error: Call to undefined function each() in /in/SiZlC:57 Stack trace: #0 {main} thrown in /in/SiZlC on line 57
Process exited with code 255.
Output for 7.2.0 - 7.2.33, 7.3.12 - 7.3.31, 7.4.0 - 7.4.33
Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /in/SiZlC on line 57 array(4) { [1]=> string(17) "KAV.10009167.0000" ["value"]=> string(17) "KAV.10009167.0000" [0]=> int(0) ["key"]=> int(0) }
Output for 5.0.0 - 5.0.5, 5.1.0 - 5.1.6, 5.2.0 - 5.2.17, 5.3.0 - 5.3.29, 5.5.27 - 5.5.36, 5.6.11 - 5.6.28, 7.0.0 - 7.0.20, 7.1.0 - 7.1.20, 7.3.32 - 7.3.33
array(4) { [1]=> string(17) "KAV.10009167.0000" ["value"]=> string(17) "KAV.10009167.0000" [0]=> int(0) ["key"]=> int(0) }
Output for 5.4.0 - 5.4.45, 5.5.0 - 5.5.26, 5.6.0 - 5.6.10
bool(false)
Output for 4.4.5 - 4.4.9
Fatal error: Call to undefined function: simplexml_load_string() in /in/SiZlC on line 2
Process exited with code 255.
Output for 4.3.2 - 4.3.11, 4.4.0 - 4.4.4
Fatal error: Call to undefined function: simplexml_load_string() in /in/SiZlC on line 2
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Call to undefined function: simplexml_load_string() in /in/SiZlC on line 2

preferences:
259.96 ms | 401 KiB | 348 Q