3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
143.88 ms | 1399 KiB | 17 Q