3v4l.org

run code in 300+ PHP versions simultaneously
<?php $student_comment_new = 'PDE+PEwuSW50cm9kdWN0aW9uIC0gUGFnZSAxIG9mIDI+TVkgUFJFVEVORCBTRUNPTkQgPGUuMT4='; $fixed = base64_decode($student_comment_new); echo $fixed . "\n\n"; //Decode the entire comment $comment_cltxt = base64_decode($student_comment_new); echo $comment_cltxt . "\n\n"; //get the comment number. $comment_nr = explode('><L.', $comment_cltxt)[0]; $comment_nr = explode('<', $comment_nr)[1]; //get the comment end-text $comment_nr_string = '<' . $comment_nr . '>'; $comment_end_string = '<e.' . $comment_nr . '>'; echo $comment_nr . "\n"; echo $comment_nr_string . "\n"; echo $comment_end_string . "\n"; //get the comment text itself $pos1 = strlen($comment_nr_string); $pos2 = strlen($comment_end_string); $comment_text = substr($comment_cltxt, $pos1, -$pos2); echo $comment_text . "\n";
Output for git.master, git.master_jit, rfc.property-hooks
<1><L.Introduction - Page 1 of 2>MY PRETEND SECOND <e.1> <1><L.Introduction - Page 1 of 2>MY PRETEND SECOND <e.1> 1 <1> <e.1> <L.Introduction - Page 1 of 2>MY PRETEND SECOND

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:
51.72 ms | 401 KiB | 8 Q