3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<? $xml = simplexml_load_file(‘http://stocklamp.tumblr.com/api/read/xml’); $posts = $xml->xpath(“/tumblr/posts/post[@type=’regular’]”); foreach($posts as $post) {?> <?echo $post[‘id’];?> <?echo $post[‘url-with-slug’];?>”> <?echo $post->{‘regular-title’};?> <?echo $post->{‘regular-body’};?> <?echo date(“jS D M, H:i”,strtotime($post[‘date’]));?> <?}?>
Output for hhvm-3.10.0

Process exited with code 153.
Output for 5.4.0 - 5.4.28
Parse error: syntax error, unexpected ':' in /in/gRUUr on line 2
Process exited with code 255.
Output for 5.3.0 - 5.3.29
<? $xml = simplexml_load_file(‘http://stocklamp.tumblr.com/api/read/xml’); $posts = $xml->xpath(“/tumblr/posts/post[@type=’regular’]”); foreach($posts as $post) {?> <?echo $post[‘id’];?> <?echo $post[‘url-with-slug’];?>”> <?echo $post->{‘regular-title’};?> <?echo $post->{‘regular-body’};?> <?echo date(“jS D M, H:i”,strtotime($post[‘date’]));?> <?}?>