3v4l.org

run code in 300+ PHP versions simultaneously
<?php $s = "hé \r\n\t\xC2\xA0"; var_dump($s); var_dump(trim($s)); var_dump(preg_replace('/^\s+|\s+$/', '', $s)); var_dump(preg_replace('/^\s+|\s+$/u', '', $s));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/0ZkHb
function name:  (null)
number of ops:  27
compiled vars:  !0 = $s
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'h%C3%A9+%0D%0A%09%C2%A0'
    3     1        INIT_FCALL                                               'var_dump'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                                 
    4     4        INIT_FCALL                                               'var_dump'
          5        INIT_FCALL                                               'trim'
          6        SEND_VAR                                                 !0
          7        DO_ICALL                                         $3      
          8        SEND_VAR                                                 $3
          9        DO_ICALL                                                 
    5    10        INIT_FCALL                                               'var_dump'
         11        INIT_FCALL                                               'preg_replace'
         12        SEND_VAL                                                 '%2F%5E%5Cs%2B%7C%5Cs%2B%24%2F'
         13        SEND_VAL                                                 ''
         14        SEND_VAR                                                 !0
         15        DO_ICALL                                         $5      
         16        SEND_VAR                                                 $5
         17        DO_ICALL                                                 
    6    18        INIT_FCALL                                               'var_dump'
         19        INIT_FCALL                                               'preg_replace'
         20        SEND_VAL                                                 '%2F%5E%5Cs%2B%7C%5Cs%2B%24%2Fu'
         21        SEND_VAL                                                 ''
         22        SEND_VAR                                                 !0
         23        DO_ICALL                                         $7      
         24        SEND_VAR                                                 $7
         25        DO_ICALL                                                 
         26      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.47 ms | 1395 KiB | 19 Q