3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $fb_username = 'ShuroSan'; $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 5.4.0 - 7.1.0
Notice: Trying to get property of non-object in /in/ktclW on line 6 Notice: Trying to get property of non-object in /in/ktclW on line 9 <html> <head> <title>Fans and Followers</title> </head> <body> Facebook fan count: 0<br /> Twitter follower count: 0<br /> </body> </html>
Output for 5.2.0 - 5.3.29
Notice: Trying to get property of non-object in /in/ktclW on line 6 Notice: Trying to get property of non-object in /in/ktclW on line 9 <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 4.3.2 - 5.1.6

Process exited with code 255.
Output for 4.3.0 - 4.3.1