3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = '<p>I am <30 years old and weight <12st</p>'; $html = preg_replace('/^\s*<[^>]+>\s*|\s*<\/[^>]+>\s*\z/', '', $string); $final = preg_replace('/[^A-Za-z0-9 !@#$%^&*().]/u', '', $html); echo $final;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/3SUP9
function name:  (null)
number of ops:  15
compiled vars:  !0 = $string, !1 = $html, !2 = $final
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%3Cp%3EI+am+%3C30+years+old+and+weight+%3C12st%3C%2Fp%3E'
    4     1        INIT_FCALL                                               'preg_replace'
          2        SEND_VAL                                                 '%2F%5E%5Cs%2A%3C%5B%5E%3E%5D%2B%3E%5Cs%2A%7C%5Cs%2A%3C%5C%2F%5B%5E%3E%5D%2B%3E%5Cs%2A%5Cz%2F'
          3        SEND_VAL                                                 ''
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $4      
          6        ASSIGN                                                   !1, $4
    5     7        INIT_FCALL                                               'preg_replace'
          8        SEND_VAL                                                 '%2F%5B%5EA-Za-z0-9+%21%40%23%24%25%5E%26%2A%28%29.%5D%2Fu'
          9        SEND_VAL                                                 ''
         10        SEND_VAR                                                 !1
         11        DO_ICALL                                         $6      
         12        ASSIGN                                                   !2, $6
    7    13        ECHO                                                     !2
    8    14      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
143.99 ms | 1405 KiB | 15 Q