3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = "Sorry that meant to say hungover and feeling sorry for myself. 😩"; $str = "I can spend upto £40 a week on cigarettes ... £160 a month. I could go on holiday for that ... ☀ðŸ˜"; foreach(mb_list_encodings() as $chr){ echo mb_convert_encoding($str, 'UTF-8', $chr)." : ".$chr."<br>"; } //echo mb_convert_encoding($str, "UTF-8"); //$pattern = '/[😩]/i'; // $str = preg_replace($pattern, '', $str); // echo $str;
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 5, Position 2 = 16
Branch analysis from position: 5
2 jumps found. (Code = 78) Position 1 = 6, Position 2 = 16
Branch analysis from position: 6
1 jumps found. (Code = 42) Position 1 = 5
Branch analysis from position: 5
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 16
filename:       /in/rcXaW
function name:  (null)
number of ops:  18
compiled vars:  !0 = $str, !1 = $chr
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'Sorry+that+meant+to+say+hungover+and+feeling+sorry+for+myself.+%C3%B0%C5%B8%CB%9C%C2%A9'
    4     1        ASSIGN                                                   !0, 'I+can+spend+upto+%C3%82%C2%A340+a+week+on+cigarettes+...+%C3%82%C2%A3160+a+month.+I+could+go+on+holiday+for+that+...+%C3%A2%CB%9C%E2%82%AC%C3%B0%C5%B8%CB%9C'
    6     2        INIT_FCALL                                               'mb_list_encodings'
          3        DO_ICALL                                         $4      
          4      > FE_RESET_R                                       $5      $4, ->16
          5    > > FE_FETCH_R                                               $5, !1, ->16
    7     6    >   INIT_FCALL                                               'mb_convert_encoding'
          7        SEND_VAR                                                 !0
          8        SEND_VAL                                                 'UTF-8'
          9        SEND_VAR                                                 !1
         10        DO_ICALL                                         $6      
         11        CONCAT                                           ~7      $6, '+%3A+'
         12        CONCAT                                           ~8      ~7, !1
         13        CONCAT                                           ~9      ~8, '%3Cbr%3E'
         14        ECHO                                                     ~9
    6    15      > JMP                                                      ->5
         16    >   FE_FREE                                                  $5
   14    17      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.52 ms | 1395 KiB | 17 Q