3v4l.org

run code in 300+ PHP versions simultaneously
<?php $fb_username = 'LinkToLife'; $tw_username = 'phishnet'; $fb = @json_decode(file_get_contents('https://graph.facebook.com/'.$fb_username)); $fb_fans = number_format($fb->fan_count); $tw = @json_decode(file_get_contents('http://api.twitter.com/1/users/show.json?screen_name='.$tw_username)); $tw_followers = number_format($tw->followers_count); ?><html> <head> <title>Fans and Followers</title> </head> <body> Facebook fan count: <?=$fb_fans;?><br /> Twitter follower count: <?=$tw_followers;?><br /> </body> </html>
Output for git.master, git.master_jit, rfc.property-hooks
Warning: Attempt to read property "fan_count" on null in /in/EbG2Q on line 6 Deprecated: number_format(): Passing null to parameter #1 ($num) of type float is deprecated in /in/EbG2Q on line 6 Warning: Attempt to read property "followers_count" on null in /in/EbG2Q on line 9 Deprecated: number_format(): Passing null to parameter #1 ($num) of type float is deprecated in /in/EbG2Q on line 9 <html> <head> <title>Fans and Followers</title> </head> <body> Facebook fan count: 0<br /> Twitter follower count: 0<br /> </body> </html>

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:
49.46 ms | 402 KiB | 8 Q