3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str=<<<XML <data> <versions> <version> <n>0.1.0</n> <changes>First Public Release</changes> <note>This is a Beta</note> </version> </versions> <servers> </servers> </data> XML; $serverIP = "192.168.0.1"; $serverPort = 81; $xml=simplexml_load_string($str); $main_server = $xml->servers->xpath('//server[@ip="' . $serverIP . '"][@port="' . $serverPort . '"]'); echo "tot:" . count($main_server); if(count(main_server) == 0){ echo "cacca"; $server = $xml->servers->addChild('server'); $server->addAttribute('ip', $serverIP); $server->addAttribute('port', $serverPort); $server->addAttribute('pluginVersion', $serverPluginVersion); $server->addAttribute('arenaCount', $serverArena); }else{ } var_dump ($main_server);
Output for git.master, git.master_jit, rfc.property-hooks
tot:0 Fatal error: Uncaught Error: Undefined constant "main_server" in /in/cNrfI:25 Stack trace: #0 {main} thrown in /in/cNrfI on line 25
Process exited with code 255.

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:
39.12 ms | 401 KiB | 8 Q