3v4l.org

run code in 300+ PHP versions simultaneously
<?php $s = 'Etui à fire farger'; var_dump(preg_replace("/\s{2,}/u", " ", $s)); var_dump(preg_replace("/\{Z}{2,}/u", " ", $s)); var_dump(preg_replace("/\{Zs}{2,}/u", " ", $s)); var_dump(preg_replace("/\P{Z}{2,}/u", " ", $s));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/1Ehjn
function name:  (null)
number of ops:  34
compiled vars:  !0 = $s
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'Etui+%C3%A0+fire++farger'
    3     1        INIT_FCALL                                               'var_dump'
          2        INIT_FCALL                                               'preg_replace'
          3        SEND_VAL                                                 '%2F%5Cs%7B2%2C%7D%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%5C%7BZ%7D%7B2%2C%7D%2Fu'
         12        SEND_VAL                                                 '+'
         13        SEND_VAR                                                 !0
         14        DO_ICALL                                         $4      
         15        SEND_VAR                                                 $4
         16        DO_ICALL                                                 
    5    17        INIT_FCALL                                               'var_dump'
         18        INIT_FCALL                                               'preg_replace'
         19        SEND_VAL                                                 '%2F%5C%7BZs%7D%7B2%2C%7D%2Fu'
         20        SEND_VAL                                                 '+'
         21        SEND_VAR                                                 !0
         22        DO_ICALL                                         $6      
         23        SEND_VAR                                                 $6
         24        DO_ICALL                                                 
    6    25        INIT_FCALL                                               'var_dump'
         26        INIT_FCALL                                               'preg_replace'
         27        SEND_VAL                                                 '%2F%5CP%7BZ%7D%7B2%2C%7D%2Fu'
         28        SEND_VAL                                                 '+'
         29        SEND_VAR                                                 !0
         30        DO_ICALL                                         $8      
         31        SEND_VAR                                                 $8
         32        DO_ICALL                                                 
         33      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.42 ms | 1396 KiB | 17 Q