3v4l.org

run code in 300+ PHP versions simultaneously
<?php $text = '<p>Lorum ipsum &nbsp;<a href="http://www.test.com">This is a test link</a>.</p>'; $text = ucfirst($text); $text = preg_replace('/\v+|\\\r\\\n/', '<br />', $text); $allow = '<p><br><ul><ol><li><strong><img><em><a>'; $text = strip_tags($text, $allow); echo $text;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/5Jqnu
function name:  (null)
number of ops:  19
compiled vars:  !0 = $text, !1 = $allow
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '%3Cp%3ELorum+ipsum+%26nbsp%3B%3Ca+href%3D%22http%3A%2F%2Fwww.test.com%22%3EThis+is+a+test+link%3C%2Fa%3E.%3C%2Fp%3E'
    4     1        INIT_FCALL                                               'ucfirst'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $3      
          4        ASSIGN                                                   !0, $3
    5     5        INIT_FCALL                                               'preg_replace'
          6        SEND_VAL                                                 '%2F%5Cv%2B%7C%5C%5Cr%5C%5Cn%2F'
          7        SEND_VAL                                                 '%3Cbr+%2F%3E'
          8        SEND_VAR                                                 !0
          9        DO_ICALL                                         $5      
         10        ASSIGN                                                   !0, $5
    6    11        ASSIGN                                                   !1, '%3Cp%3E%3Cbr%3E%3Cul%3E%3Col%3E%3Cli%3E%3Cstrong%3E%3Cimg%3E%3Cem%3E%3Ca%3E'
    7    12        INIT_FCALL                                               'strip_tags'
         13        SEND_VAR                                                 !0
         14        SEND_VAR                                                 !1
         15        DO_ICALL                                         $8      
         16        ASSIGN                                                   !0, $8
    9    17        ECHO                                                     !0
         18      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
145.27 ms | 1395 KiB | 19 Q