Ken2k7 Posted May 31, 2009 Share Posted May 31, 2009 Okay so, I recently just found this out, but putting a ?> inside a string doesn't work. <?php $string = 'some static text here and here is a closing PHP tag ?> ...'; <?php $string2 = "'some static text here and here is a closing PHP tag ?> ...'"; <?php $string2 = "some static text here and here is a closing PHP tag ?> ..."; <?php $string = 'some static text here and here is a closing PHP tag ?> ...'; $string2 = "'some static text here and here is a closing PHP tag ?> ...'"; It's messing up either the first quote or the last. Quote my post to see. Something weird is up. Is this our issue or SMF's? Quote Link to comment https://forums.phpfreaks.com/topic/160317-code-tag-php-issue/ Share on other sites More sharing options...
gevans Posted May 31, 2009 Share Posted May 31, 2009 Anything to do with the general build of the forum is an SMF issue. Quote Link to comment https://forums.phpfreaks.com/topic/160317-code-tag-php-issue/#findComment-846011 Share on other sites More sharing options...
Ken2k7 Posted May 31, 2009 Author Share Posted May 31, 2009 True. But I want to make sure this is not caused by a modification here on PHPFreaks. The usage isn't so much as to put a ?> in a string, but you can imagine having a regex that coincidentally have that pattern. Quote Link to comment https://forums.phpfreaks.com/topic/160317-code-tag-php-issue/#findComment-846013 Share on other sites More sharing options...
Philip Posted May 31, 2009 Share Posted May 31, 2009 It strips that first ' when there is a ?> involved. Weird. <?php $string = 'Test ?>'; <?php $string = 'Test ?>'; SMF bug, replicated on my server as well. Quote Link to comment https://forums.phpfreaks.com/topic/160317-code-tag-php-issue/#findComment-846037 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.