3v4l.org

run code in 300+ PHP versions simultaneously
<?php $xmlStr = "<LaunchBox> <Game> <Name>Violet</Name> <ReleaseYear>1985</ReleaseYear> <MaxPlayers>1</MaxPlayers> <Platform>ZiNc</Platform> </Game> <Game> <Name>Wishbringer</Name> <ReleaseYear>1985</ReleaseYear> <MaxPlayers>1</MaxPlayers> <Platform>ZiNc</Platform> </Game> <Platform> <Name>3DO Interactive Multiplayer</Name> <Emulated>true</Emulated> <ReleaseDate>1993-10-04T00:00:00-07:00</ReleaseDate> <Developer>The 3DO Company</Developer> </Platform> <Platform> <Name>Commodore Amiga</Name> <Emulated>true</Emulated> <ReleaseDate>1985-07-23T00:00:00-07:00</ReleaseDate> <Developer>Commodore International</Developer> </Platform> </LaunchBox>"; $xml = simplexml_load_string($xmlStr); $games = $xml->xpath('/LaunchBox/Game'); echo count($games).' games'.PHP_EOL; foreach ($games as $game) { print_r($game); }
Output for 8.1.23 - 8.1.34, 8.2.3 - 8.2.30, 8.3.0 - 8.3.29, 8.4.1 - 8.4.14, 8.4.16 - 8.4.17, 8.5.0 - 8.5.2
2 games SimpleXMLElement Object ( [Name] => Violet [ReleaseYear] => 1985 [MaxPlayers] => 1 [Platform] => ZiNc ) SimpleXMLElement Object ( [Name] => Wishbringer [ReleaseYear] => 1985 [MaxPlayers] => 1 [Platform] => ZiNc )
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:
176.5 ms | 407 KiB | 5 Q