3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = "This is a string with spaces, tabs and newlines present"; $stripped = preg_replace(array('/[\s{2,}]/', '/[\t\n]/'), ' ', $str); echo $str; echo "\n---\n"; echo "$stripped";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/dWvjD
function name:  (null)
number of ops:  12
compiled vars:  !0 = $str, !1 = $stripped
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'This+is++a+string+++++++with%0Aspaces%2C+tabs+and+newlines+present'
    5     1        INIT_FCALL                                               'preg_replace'
          2        SEND_VAL                                                 <array>
          3        SEND_VAL                                                 '+'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $3      
          6        ASSIGN                                                   !1, $3
    7     7        ECHO                                                     !0
    8     8        ECHO                                                     '%0A---%0A'
    9     9        CAST                                          6  ~5      !1
         10        ECHO                                                     ~5
         11      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.76 ms | 1398 KiB | 15 Q