3v4l.org

run code in 300+ PHP versions simultaneously
<?php $myString=<<<TEXT Found some changes in D:\EER Data\project\myfile.csv TEXT; $var1=trim(preg_replace("~[^a-z\d.:'\\\-]~i", ' ', $myString)); echo "$var1\n"; echo json_encode($var1); // it's a good idea to keep the escaping \ while in json.
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/UmUbE
function name:  (null)
number of ops:  18
compiled vars:  !0 = $myString, !1 = $var1
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'Found+some+changes+in+D%3A%5CEER+Data%5Cproject%5Cmyfile.csv'
    5     1        INIT_FCALL                                               'trim'
          2        INIT_FCALL                                               'preg_replace'
          3        SEND_VAL                                                 '%7E%5B%5Ea-z%5Cd.%3A%27%5C%5C-%5D%7Ei'
          4        SEND_VAL                                                 '+'
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                         $3      
          7        SEND_VAR                                                 $3
          8        DO_ICALL                                         $4      
          9        ASSIGN                                                   !1, $4
    6    10        NOP                                                      
         11        FAST_CONCAT                                      ~6      !1, '%0A'
         12        ECHO                                                     ~6
    7    13        INIT_FCALL                                               'json_encode'
         14        SEND_VAR                                                 !1
         15        DO_ICALL                                         $7      
         16        ECHO                                                     $7
         17      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
138.56 ms | 1001 KiB | 16 Q