3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = <<<XML <?xml version="1.0"?> <Result totalResultsAvailable="0" totalResultsReturned="0" schk="true" totalLooseOffers="0"> <details> <ID></ID> <applicationVersion>1.0</applicationVersion> <applicationPath/> <date>2016-05-23T12:17:16.369-03:00</date> <elapsedTime>17</elapsedTime> <status>success</status> <message>success</message> </details> <category id="1"> <thumbnail url="http://image.google.com/test.jpg"/> <links> <link url="www.google.com" type="category"/> <link url="www.google2.com" type="xml"/> </links> <name>Category</name> <filters> <filter id="1" name="Filter1"> <value id="1" value="Test1"/> <value id="2" value="Test2"/> <value id="3" value="Test3"/> </filter> <filter id="2" name="Filter2"> <value id="1" value="Test4"/> <value id="2" value="Test5"/> <value id="3" value="Test6"/> </filter> </filters> </category> </Result> XML; $xml = simplexml_load_string($str); $values = $xml->xpath('//category/filters/filter/value'); foreach ($values as $value) { echo $value['value'] . "\n"; }
Output for 5.5.0 - 5.5.38, 5.6.0 - 5.6.40, 7.0.0 - 7.0.33, 7.1.0 - 7.1.33, 7.2.0 - 7.2.33, 7.3.0 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.33, 8.2.0 - 8.2.29, 8.3.0 - 8.3.28, 8.4.1 - 8.4.14, 8.5.0 - 8.5.1
Test1 Test2 Test3 Test4 Test5 Test6
Output for 8.4.15
/bin/php-8.4.15: /usr/lib/libm.so.6: version `GLIBC_2.38' not found (required by /bin/php-8.4.15) /bin/php-8.4.15: /usr/lib/libm.so.6: version `GLIBC_2.35' not found (required by /bin/php-8.4.15) /bin/php-8.4.15: /usr/lib/libc.so.6: version `GLIBC_2.34' not found (required by /bin/php-8.4.15) /bin/php-8.4.15: /usr/lib/libc.so.6: version `GLIBC_2.38' not found (required by /bin/php-8.4.15)
Process exited with code 1.

preferences:
204.32 ms | 407 KiB | 5 Q