3v4l.org

run code in 300+ PHP versions simultaneously
<?php $names='toto, jean, dupont,de; la toureell'; echo trim(preg_replace('/[^A-Z]+/', ' ', $names)); var_dump(explode(' ', trim(preg_replace('/[^A-Z]+/', ' ', $names))));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/EFpNv
function name:  (null)
number of ops:  26
compiled vars:  !0 = $names
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'toto%2C+jean%2C+dupont%2Cde%3B++la+toureell'
    5     1        INIT_FCALL                                               'trim'
          2        INIT_FCALL                                               'preg_replace'
          3        SEND_VAL                                                 '%2F%5B%5EA-Z%5D%2B%2F'
          4        SEND_VAL                                                 '+'
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                         $2      
          7        SEND_VAR                                                 $2
          8        DO_ICALL                                         $3      
          9        ECHO                                                     $3
    7    10        INIT_FCALL                                               'var_dump'
         11        INIT_FCALL                                               'explode'
         12        SEND_VAL                                                 '+'
         13        INIT_FCALL                                               'trim'
         14        INIT_FCALL                                               'preg_replace'
         15        SEND_VAL                                                 '%2F%5B%5EA-Z%5D%2B%2F'
         16        SEND_VAL                                                 '+'
         17        SEND_VAR                                                 !0
         18        DO_ICALL                                         $4      
         19        SEND_VAR                                                 $4
         20        DO_ICALL                                         $5      
         21        SEND_VAR                                                 $5
         22        DO_ICALL                                         $6      
         23        SEND_VAR                                                 $6
         24        DO_ICALL                                                 
         25      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
145.42 ms | 1395 KiB | 21 Q