3v4l.org

run code in 300+ PHP versions simultaneously
<?php function convert_specials_char($content) { $search = array("ä","æ","ǽ","ö","œ","ü","Ü","Ö","Á","Â","Ã","Ä","Å","Ǻ","Ā","Ă","Ą","Ǎ","á","â","ã","å","ǻ","ā","ă","ą","ǎ","ª", "Ć","Ĉ","Ċ","Č","ć","ĉ","ċ","č","Ð","Ď","Đ","ð","ď","đ","Ë","Ē","Ĕ","Ė","Ę","Ě","ë","ē","ĕ","ė","ę","ě","Ĝ","Ğ","Ġ","Ģ","ĝ","ğ","ġ","ģ","Ĥ","Ħ","ĥ","ħ","Ì", "Í","Î","Ï","Ĩ","Ī","Ĭ","Ǐ","Į","İ","ì","í","î","ï","ĩ","ī","ĭ","ǐ","į","ı","Ĵ","ĵ","Ķ","ķ","Ĺ", "Ļ","Ľ","Ŀ","Ł","ĺ","ļ","ľ","ŀ","ł","Ń","Ņ","Ň","ń","ņ","ň","ʼn","Ò","Ó","Ô","Õ","Ō","Ŏ","Ǒ","Ő","Ơ","Ø","Ǿ","ò","ó","ô","õ","ō", "ŏ","ǒ","ő","ơ","ø","ǿ","º","Ŕ","Ŗ","Ř","ŕ","ŗ","ř","Ś","Ŝ","Ş","Š","ś","ŝ","ş","š","ſ","Ţ","Ť","Ŧ","ţ","ť","ŧ", "Ù","Ú","Û","Ũ","Ū","Ŭ","Ů","Ű","Ų","Ư","Ǔ","Ǖ","Ǘ","Ǚ","Ǜ","ù","ú","û","ũ","ū","ŭ","ů","ű","ų","ư","ǔ","ǖ","ǘ","ǚ","ǜ","Ý","Ÿ","Ŷ","ý","ÿ","ŷ","Ŵ","ŵ", "Ź","Ż","Ž","ź","ż","ž","Æ","Ǽ","ß","IJ","ij","Œ","ƒ","’"); $replaced = array("a","ae","ae","oe","oe","ue","Ue","Oe","A","A","A","A","A","A","A","A","A","A","a","a", "a","a","a","a","a","a","a","a","C","C","C","C","c","c","c","c","D","D","D","d","d","d","E","E","E","E","E","E","e", "e","e","e","e","e","G","G","G","G","g","g","g","g","H","H","h","h","I","I","I","I","I","I","I","I","I", "I","i","i","i","i","i","i","i","i","i","i","J","j","K","k","L","L","L","L","L","l","l","l","l","l","N","N","N","n","n","n","n","O","O","O","O", "O","O","O","O","O","O","O","o","o","o","o","o","o","o","o","o","o","o","o","R","R","R","r","r","r","S","S","S", "S","s","s","s","s","s","T","T","T","t","t","t","U","U","U","U","U","U","U","U","U","U","U","U","U","U","U","u","u","u","u","u","u","u","u","u","u" ,"u","u","u","u","u","Y","Y","Y","y","y","y","W","w","Z","Z","Z","z","z","z","AE","AE","ss","IJ","ij","OE","f","'"); $result = str_replace($search,$replaced , $content); return $result; } $data = ["Ď"]; $data_s = convert_specials_char(serialize($data)); $data = unserialize($data_s); var_dump($data);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/P8gcO
function name:  (null)
number of ops:  16
compiled vars:  !0 = $data, !1 = $data_s
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   25     0  E >   ASSIGN                                                   !0, <array>
   26     1        INIT_FCALL                                               'convert_specials_char'
          2        INIT_FCALL                                               'serialize'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $3      
          5        SEND_VAR                                                 $3
          6        DO_FCALL                                      0  $4      
          7        ASSIGN                                                   !1, $4
   27     8        INIT_FCALL                                               'unserialize'
          9        SEND_VAR                                                 !1
         10        DO_ICALL                                         $6      
         11        ASSIGN                                                   !0, $6
   28    12        INIT_FCALL                                               'var_dump'
         13        SEND_VAR                                                 !0
         14        DO_ICALL                                                 
         15      > RETURN                                                   1

Function convert_specials_char:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/P8gcO
function name:  convert_specials_char
number of ops:  11
compiled vars:  !0 = $content, !1 = $search, !2 = $replaced, !3 = $result
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    5     1        ASSIGN                                                   !1, <array>
   13     2        ASSIGN                                                   !2, <array>
   21     3        INIT_FCALL                                               'str_replace'
          4        SEND_VAR                                                 !1
          5        SEND_VAR                                                 !2
          6        SEND_VAR                                                 !0
          7        DO_ICALL                                         $6      
          8        ASSIGN                                                   !3, $6
   23     9      > RETURN                                                   !3
   24    10*     > RETURN                                                   null

End of function convert_specials_char

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
176.52 ms | 1399 KiB | 22 Q