3v4l.org

run code in 300+ PHP versions simultaneously
<?php $names = array("Tom Hanks", "Julia Roberts"); echo implode('/', preg_replace( "/([A-Z])\w+\h+(\w{4})\w*/", "$1$2", $names ) );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Fojg7
function name:  (null)
number of ops:  12
compiled vars:  !0 = $names
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1        INIT_FCALL                                               'implode'
          2        SEND_VAL                                                 '%2F'
    5     3        INIT_FCALL                                               'preg_replace'
    6     4        SEND_VAL                                                 '%2F%28%5BA-Z%5D%29%5Cw%2B%5Ch%2B%28%5Cw%7B4%7D%29%5Cw%2A%2F'
    7     5        SEND_VAL                                                 '%241%242'
    8     6        SEND_VAR                                                 !0
    5     7        DO_ICALL                                         $2      
    8     8        SEND_VAR                                                 $2
    4     9        DO_ICALL                                         $3      
    8    10        ECHO                                                     $3
   10    11      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
138.17 ms | 999 KiB | 15 Q