3v4l.org

run code in 300+ PHP versions simultaneously
<?php function cleanstring($string) { $unwanted = array("’","'",";",".",":","’"); echo "cleaned: ".str_replace($unwanted, "", $string)."\n"; } $string = "Bob’s Burgers Season 1 Episode 1"; cleanstring($string); $string = "Bob's Burgers Season 2"; cleanstring($string);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/6hn2h
function name:  (null)
number of ops:  9
compiled vars:  !0 = $string
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   ASSIGN                                                   !0, 'Bob%E2%80%99s+Burgers+Season+1+Episode+1'
    9     1        INIT_FCALL                                               'cleanstring'
          2        SEND_VAR                                                 !0
          3        DO_FCALL                                      0          
   10     4        ASSIGN                                                   !0, 'Bob%27s+Burgers+Season+2'
   11     5        INIT_FCALL                                               'cleanstring'
          6        SEND_VAR                                                 !0
          7        DO_FCALL                                      0          
          8      > RETURN                                                   1

Function cleanstring:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/6hn2h
function name:  cleanstring
number of ops:  11
compiled vars:  !0 = $string, !1 = $unwanted
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    5     1        ASSIGN                                                   !1, <array>
    6     2        INIT_FCALL                                               'str_replace'
          3        SEND_VAR                                                 !1
          4        SEND_VAL                                                 ''
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                         $3      
          7        CONCAT                                           ~4      'cleaned%3A+', $3
          8        CONCAT                                           ~5      ~4, '%0A'
          9        ECHO                                                     ~5
    7    10      > RETURN                                                   null

End of function cleanstring

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.8 ms | 1397 KiB | 17 Q