3v4l.org

run code in 500+ PHP versions simultaneously
<?php echo preg_replace('~^[\pZ\pC]+|[\pZ\pC]+$|(?! )[\pZ\pC]~u', '', 'abc def ghi   ').PHP_EOL; echo preg_replace('/^\s+|\s+$|[^\S ]/u', '', 'abc def ghi   ');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/lkrHV
function name:  (null)
number of ops:  8
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   FRAMELESS_ICALL_3                preg_replace        ~0      '%7E%5E%5B%5CpZ%5CpC%5D%2B%7C%5B%5CpZ%5CpC%5D%2B%24%7C%28%3F%21+%29%5B%5CpZ%5CpC%5D%7Eu', ''
          1        OP_DATA                                                      'abc+def%C2%A0ghi%09%C2%A0+'
          2        CONCAT                                               ~1      ~0, '%0A'
          3        ECHO                                                         ~1
    4     4        FRAMELESS_ICALL_3                preg_replace        ~2      '%2F%5E%5Cs%2B%7C%5Cs%2B%24%7C%5B%5E%5CS+%5D%2Fu', ''
          5        OP_DATA                                                      'abc+def%C2%A0ghi%09%C2%A0+'
          6        ECHO                                                         ~2
          7      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
157.69 ms | 2101 KiB | 13 Q