3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = 'HDO Intranet — Futar.png'; $encoded = htmlentities($string); $encoded = str_replace(array('&mdash;'), array('-'), $encoded); $result = preg_replace('/&([a-z]{1})[a-z]+;/i', '$1', $encoded); echo $result;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/SOX9Y
function name:  (null)
number of ops:  19
compiled vars:  !0 = $string, !1 = $encoded, !2 = $result
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'HDO+Intranet+%E2%80%94+Futar.png'
    5     1        INIT_FCALL                                               'htmlentities'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $4      
          4        ASSIGN                                                   !1, $4
    6     5        INIT_FCALL                                               'str_replace'
          6        SEND_VAL                                                 <array>
          7        SEND_VAL                                                 <array>
          8        SEND_VAR                                                 !1
          9        DO_ICALL                                         $6      
         10        ASSIGN                                                   !1, $6
    7    11        INIT_FCALL                                               'preg_replace'
         12        SEND_VAL                                                 '%2F%26%28%5Ba-z%5D%7B1%7D%29%5Ba-z%5D%2B%3B%2Fi'
         13        SEND_VAL                                                 '%241'
         14        SEND_VAR                                                 !1
         15        DO_ICALL                                         $8      
         16        ASSIGN                                                   !2, $8
    9    17        ECHO                                                     !2
         18      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
162.55 ms | 1395 KiB | 19 Q