3v4l.org

run code in 300+ PHP versions simultaneously
<?php /* it('should account for ending type in allowable tags when specified as a string', function() { + var html = '<article>lorem ipsum<br> dolor<br /> sit</article>', + allowedTags = '<br>', + text = 'lorem ipsum<br> dolor sit'; + + assert.equal(striptags(html, allowedTags), text); + }); */ $html = '<article>lorem ipsum<br> dolor<br /> sit</article>'; $allowedTags = '<br>'; $text = 'lorem ipsum<br> dolor sit'; echo strip_tags(html, allowedTags) === text ? 'equal' : 'not equal';
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 12, Position 2 = 14
Branch analysis from position: 12
1 jumps found. (Code = 42) Position 1 = 15
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/u3CjS
function name:  (null)
number of ops:  17
compiled vars:  !0 = $html, !1 = $allowedTags, !2 = $text
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   ASSIGN                                                   !0, '%3Carticle%3Elorem+ipsum%3Cbr%3E+dolor%3Cbr+%2F%3E+sit%3C%2Farticle%3E'
   14     1        ASSIGN                                                   !1, '%3Cbr%3E'
   15     2        ASSIGN                                                   !2, 'lorem+ipsum%3Cbr%3E+dolor+sit'
   16     3        INIT_FCALL                                               'strip_tags'
          4        FETCH_CONSTANT                                   ~6      'html'
          5        SEND_VAL                                                 ~6
          6        FETCH_CONSTANT                                   ~7      'allowedTags'
          7        SEND_VAL                                                 ~7
          8        DO_ICALL                                         $8      
          9        FETCH_CONSTANT                                   ~9      'text'
         10        IS_IDENTICAL                                             $8, ~9
         11      > JMPZ                                                     ~10, ->14
         12    >   QM_ASSIGN                                        ~11     'equal'
         13      > JMP                                                      ->15
         14    >   QM_ASSIGN                                        ~11     'not+equal'
         15    >   ECHO                                                     ~11
         16      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
164.06 ms | 940 KiB | 16 Q