3v4l.org

run code in 300+ PHP versions simultaneously
<?php $txt = " Hello World\tFoo\t\tBar but single space is fine 8 are not, 4 are not,\ttabs are not,\t\tdouble tabs are not"; $orig = str_replace(' ', '', $txt); $t1 = preg_replace('/\t| {4}/', '', $txt); var_dump($txt); var_dump($orig); echo '-----------------' . PHP_EOL; var_dump($t1);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/XcEAW
function name:  (null)
number of ops:  24
compiled vars:  !0 = $txt, !1 = $orig, !2 = $t1
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '++++Hello++++++++World%09Foo%09%09Bar+but+single+space+is+fine++++++++8+are+not%2C++++4+are+not%2C%09tabs+are+not%2C%09%09double+tabs+are+not'
    5     1        INIT_FCALL                                               'str_replace'
          2        SEND_VAL                                                 '++++'
          3        SEND_VAL                                                 ''
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $4      
          6        ASSIGN                                                   !1, $4
    7     7        INIT_FCALL                                               'preg_replace'
          8        SEND_VAL                                                 '%2F%5Ct%7C+%7B4%7D%2F'
          9        SEND_VAL                                                 ''
         10        SEND_VAR                                                 !0
         11        DO_ICALL                                         $6      
         12        ASSIGN                                                   !2, $6
    9    13        INIT_FCALL                                               'var_dump'
         14        SEND_VAR                                                 !0
         15        DO_ICALL                                                 
   11    16        INIT_FCALL                                               'var_dump'
         17        SEND_VAR                                                 !1
         18        DO_ICALL                                                 
   12    19        ECHO                                                     '-----------------%0A'
   13    20        INIT_FCALL                                               'var_dump'
         21        SEND_VAR                                                 !2
         22        DO_ICALL                                                 
         23      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.58 ms | 1012 KiB | 16 Q