3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo json_decode('"\u201E"'); // create a pair of curly quotes using \u which json_decode can handle ... $lefty = json_decode('"\u201C"'); $righty = json_decode('"\u201D"'); $text = $lefty . "Testing" . $righty; echo $text,"\n"; // ... but POCRE can't handle \u so use hex codes $text = mb_ereg_replace('[\xE2\x80]+(\x9C|\x9D)+','"',$text); echo "\n",$text;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/flvnq
function name:  (null)
number of ops:  26
compiled vars:  !0 = $lefty, !1 = $righty, !2 = $text
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'json_decode'
          1        SEND_VAL                                                 '%22%5Cu201E%22'
          2        DO_ICALL                                         $3      
          3        ECHO                                                     $3
    4     4        INIT_FCALL                                               'json_decode'
          5        SEND_VAL                                                 '%22%5Cu201C%22'
          6        DO_ICALL                                         $4      
          7        ASSIGN                                                   !0, $4
    5     8        INIT_FCALL                                               'json_decode'
          9        SEND_VAL                                                 '%22%5Cu201D%22'
         10        DO_ICALL                                         $6      
         11        ASSIGN                                                   !1, $6
    7    12        CONCAT                                           ~8      !0, 'Testing'
         13        CONCAT                                           ~9      ~8, !1
         14        ASSIGN                                                   !2, ~9
    8    15        ECHO                                                     !2
         16        ECHO                                                     '%0A'
   10    17        INIT_FCALL                                               'mb_ereg_replace'
         18        SEND_VAL                                                 '%5B%5CxE2%5Cx80%5D%2B%28%5Cx9C%7C%5Cx9D%29%2B'
         19        SEND_VAL                                                 '%22'
         20        SEND_VAR                                                 !2
         21        DO_ICALL                                         $11     
         22        ASSIGN                                                   !2, $11
   11    23        ECHO                                                     '%0A'
         24        ECHO                                                     !2
         25      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
180.8 ms | 1395 KiB | 17 Q