3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.65 ms | 1401 KiB | 17 Q