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"; $var = 123; echo "Value of variable \$var";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/KHRXC
function name:  (null)
number of ops:  14
compiled vars:  !0 = $str, !1 = $stripped, !2 = $var
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                                         $4      
          6        ASSIGN                                                   !1, $4
    7     7        ECHO                                                     !0
    8     8        ECHO                                                     '%0A---%0A'
    9     9        CAST                                          6  ~6      !1
         10        ECHO                                                     ~6
   11    11        ASSIGN                                                   !2, 123
   12    12        ECHO                                                     'Value+of+variable+%24var'
         13      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.68 ms | 1394 KiB | 15 Q