3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = " My text has so much whitespace Plenty of spaces and tabs "; var_export( preg_replace( ['/\h+/', '/\v+/'], [' ', PHP_EOL], trim($string) ) );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/9Ld6N
function name:  (null)
number of ops:  13
compiled vars:  !0 = $string
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%0AMy++++text+++++++has+so++++much+++whitespace++++%0A%0A%0A%0A%0APlenty+of++++spaces++and++++++++++++tabs++'
   10     1        INIT_FCALL                                               'var_export'
   11     2        INIT_FCALL                                               'preg_replace'
   12     3        SEND_VAL                                                 <array>
   13     4        SEND_VAL                                                 <array>
   14     5        INIT_FCALL                                               'trim'
          6        SEND_VAR                                                 !0
          7        DO_ICALL                                         $2      
          8        SEND_VAR                                                 $2
   11     9        DO_ICALL                                         $3      
   14    10        SEND_VAR                                                 $3
   10    11        DO_ICALL                                                 
   16    12      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
143.53 ms | 1070 KiB | 16 Q