3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = "ABCDE "; echo trim($string)."\n"; echo preg_replace('/\s+/', '', $string)."\n"; echo preg_replace('/\s\s+/', '', $string)."\n"; echo trim(preg_replace('/[\s\t\n\r\s]+/', '', $string))."\n"; 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/gS9Kd
function name:  (null)
number of ops:  37
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        CONCAT                                           ~3      $2, '%0A'
          5        ECHO                                                     ~3
    6     6        INIT_FCALL                                               'preg_replace'
          7        SEND_VAL                                                 '%2F%5Cs%2B%2F'
          8        SEND_VAL                                                 ''
          9        SEND_VAR                                                 !0
         10        DO_ICALL                                         $4      
         11        CONCAT                                           ~5      $4, '%0A'
         12        ECHO                                                     ~5
    7    13        INIT_FCALL                                               'preg_replace'
         14        SEND_VAL                                                 '%2F%5Cs%5Cs%2B%2F'
         15        SEND_VAL                                                 ''
         16        SEND_VAR                                                 !0
         17        DO_ICALL                                         $6      
         18        CONCAT                                           ~7      $6, '%0A'
         19        ECHO                                                     ~7
    8    20        INIT_FCALL                                               'trim'
         21        INIT_FCALL                                               'preg_replace'
         22        SEND_VAL                                                 '%2F%5B%5Cs%5Ct%5Cn%5Cr%5Cs%5D%2B%2F'
         23        SEND_VAL                                                 ''
         24        SEND_VAR                                                 !0
         25        DO_ICALL                                         $8      
         26        SEND_VAR                                                 $8
         27        DO_ICALL                                         $9      
         28        CONCAT                                           ~10     $9, '%0A'
         29        ECHO                                                     ~10
    9    30        INIT_FCALL                                               'preg_replace'
         31        SEND_VAL                                                 '%2F%7E%5Cx%7B00a0%7D%7Esiu%2F'
         32        SEND_VAL                                                 ''
         33        SEND_VAR                                                 !0
         34        DO_ICALL                                         $11     
         35        ECHO                                                     $11
         36      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.62 ms | 1396 KiB | 17 Q