3v4l.org

run code in 300+ PHP versions simultaneously
<?php $_GET = [ "city" => "South Boston", "title" => "The good stuff", "price" => "$15" ]; $_SERVER["REQUEST_URI"] = "/I/dont/know?" . http_build_query($_GET); $dir_auth1 = "aidan"; $xml = simplexml_load_string('<root/>'); $entry = $xml->addChild('link'); $entry->addChild('title', chop($_GET['city'] .' - '. $_GET['title']) .' for '. $_GET['price'] .' from @'. $dir_auth1); $entry->addChild('url', 'http://boston.lit.life' . $_SERVER['REQUEST_URI']); echo $xml->asXML(); ?>
Output for 7.0.0 - 7.0.23, 7.1.0 - 7.1.20, 7.2.6 - 7.2.33, 7.3.16 - 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
Warning: SimpleXMLElement::addChild(): unterminated entity reference title=The+good+stuff&price=%2415 in /in/ihuPQ on line 15 <?xml version="1.0"?> <root><link><title>South Boston - The good stuff for $15 from @aidan</title><url/></link></root>
Output for 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) /bin/php-8.4.15: /usr/lib/libc.so.6: version `GLIBC_2.36' not found (required by /usr/lib/libm.so.6) /bin/php-8.4.15: /usr/lib/libc.so.6: version `GLIBC_ABI_DT_RELR' not found (required by /usr/lib/libm.so.6) /bin/php-8.4.15: /usr/lib/libc.so.6: version `GLIBC_2.34' not found (required by /usr/lib/libm.so.6) /bin/php-8.4.15: /usr/lib/libc.so.6: version `GLIBC_2.35' not found (required by /usr/lib/libm.so.6)
Process exited with code 1.

preferences:
180.58 ms | 408 KiB | 5 Q