3v4l.org

run code in 300+ PHP versions simultaneously
<?php function bartz_online($ip, $port){ $fs=@fsockopen($ip, $port, $ERROR_NO, $ERROR_STR, 3); $pck=pack("vCi",7,0x00,-3); fwrite($fs,$pck); $r=fread($fs,73); fclose($fs); $a=unpack("vsize/Cid/iworld/imax/icurrent/iplaying/istore",$r); return $a; } function print_online($ip, $port, $name){ $a = bartz_online($ip, $port); printf("ServerName: %s - Current: %d - Store: %d - Max %d\n", $name, $a['playing'], $a['store'], $a['max']); } print_online('185.30.164.11','7777','L2-Toxic'); //$fp = fopen('online.txt', 'a'); //fwrite($fp, bartz_online()); //fclose($fp); ?>
Output for git.master, git.master_jit
Fatal error: Uncaught TypeError: fwrite(): Argument #1 ($stream) must be of type resource, bool given in /in/HDTUa:6 Stack trace: #0 /in/HDTUa(6): fwrite(false, '\x07\x00\x00\xFD\xFF\xFF\xFF') #1 /in/HDTUa(15): bartz_online('185.30.164.11', '7777') #2 /in/HDTUa(19): print_online('185.30.164.11', '7777', 'L2-Toxic') #3 {main} thrown in /in/HDTUa on line 6
Process exited with code 255.
Output for rfc.property-hooks
Fatal error: Uncaught TypeError: fwrite(): Argument #1 ($stream) must be of type resource, false given in /in/HDTUa:6 Stack trace: #0 /in/HDTUa(6): fwrite(false, '\x07\x00\x00\xFD\xFF\xFF\xFF') #1 /in/HDTUa(15): bartz_online('185.30.164.11', '7777') #2 /in/HDTUa(19): print_online('185.30.164.11', '7777', 'L2-Toxic') #3 {main} thrown in /in/HDTUa on line 6
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:
47.56 ms | 401 KiB | 8 Q