3v4l.org

run code in 300+ PHP versions simultaneously
<?php $post = new stdclass; $post->topic_id = 1; $post->forum_id = 2; $locked = ForumData::is_topic_locked($post->topic_id); if ($locked->topic_locked == 1) { echo '<td align="right"><font color="#FF0000">Topic Locked</font><td>'; } else { echo '<td align="left"><a href="' . url('Forum/create_new_post?topic_id=' . $post->topic_id . '&forum_id=' . $post->forum_id . '') . '"><img src="<?php echo SITE_URL?>/lib/skins/flyeuro/images/forums/t_reply.gif"/></a></td>'; } class ForumData { function is_topic_locked() { $locked = new stdclass; $locked->topic_locked = false; return $locked; } } function url($url) { return "http://example.com/$url"; }
Output for git.master, git.master_jit, rfc.property-hooks
Fatal error: Uncaught Error: Non-static method ForumData::is_topic_locked() cannot be called statically in /in/9pMM0:6 Stack trace: #0 {main} thrown in /in/9pMM0 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:
41.33 ms | 401 KiB | 8 Q