3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = "ABCDE \t\n\r\x0B\f\0"; $array = array(); $array[] = trim($string); $array[] = preg_replace('/\s+/', '', $string); $array[] = preg_replace('/\s\s+/', '', $string); $array[] = trim(preg_replace('/[\s\t\n\r\s]+/', '', $string)); $array[] = preg_replace('/~\x{00a0}~siu/', '', $string); $array[] = str_replace(array(" ", "\t", "\n", "\r", "\x0B", "\f", "\0"), '', $string); var_dump($array);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Ndcik
function name:  (null)
number of ops:  49
compiled vars:  !0 = $string, !1 = $array
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'ABCDE+%09%0A%0D%0B%0C%00'
    4     1        ASSIGN                                                   !1, <array>
    6     2        INIT_FCALL                                               'trim'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $5      
          5        ASSIGN_DIM                                               !1
          6        OP_DATA                                                  $5
    7     7        INIT_FCALL                                               'preg_replace'
          8        SEND_VAL                                                 '%2F%5Cs%2B%2F'
          9        SEND_VAL                                                 ''
         10        SEND_VAR                                                 !0
         11        DO_ICALL                                         $7      
         12        ASSIGN_DIM                                               !1
         13        OP_DATA                                                  $7
    8    14        INIT_FCALL                                               'preg_replace'
         15        SEND_VAL                                                 '%2F%5Cs%5Cs%2B%2F'
         16        SEND_VAL                                                 ''
         17        SEND_VAR                                                 !0
         18        DO_ICALL                                         $9      
         19        ASSIGN_DIM                                               !1
         20        OP_DATA                                                  $9
    9    21        INIT_FCALL                                               'trim'
         22        INIT_FCALL                                               'preg_replace'
         23        SEND_VAL                                                 '%2F%5B%5Cs%5Ct%5Cn%5Cr%5Cs%5D%2B%2F'
         24        SEND_VAL                                                 ''
         25        SEND_VAR                                                 !0
         26        DO_ICALL                                         $11     
         27        SEND_VAR                                                 $11
         28        DO_ICALL                                         $12     
         29        ASSIGN_DIM                                               !1
         30        OP_DATA                                                  $12
   10    31        INIT_FCALL                                               'preg_replace'
         32        SEND_VAL                                                 '%2F%7E%5Cx%7B00a0%7D%7Esiu%2F'
         33        SEND_VAL                                                 ''
         34        SEND_VAR                                                 !0
         35        DO_ICALL                                         $14     
         36        ASSIGN_DIM                                               !1
         37        OP_DATA                                                  $14
   11    38        INIT_FCALL                                               'str_replace'
         39        SEND_VAL                                                 <array>
         40        SEND_VAL                                                 ''
         41        SEND_VAR                                                 !0
         42        DO_ICALL                                         $16     
         43        ASSIGN_DIM                                               !1
         44        OP_DATA                                                  $16
   13    45        INIT_FCALL                                               'var_dump'
         46        SEND_VAR                                                 !1
         47        DO_ICALL                                                 
         48      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
178.82 ms | 1400 KiB | 21 Q