3v4l.org

run code in 500+ PHP versions simultaneously
<?php $str = 'CN=van der Valk\, Marco,OU=UT,OU=NL,OU=EMEA,OU=associates,OU=usersAndGroups,DC=corporate,DC=ingrammicro,DC=com'; preg_match("/CN=([\w\s\\\\,]+),/", $str, $match); List($lastname, $firstname) = explode(',', str_replace("\\", "", $match[1])); Echo $firstname ." " . $lastname;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/9RN10
function name:  (null)
number of ops:  22
compiled vars:  !0 = $str, !1 = $match, !2 = $lastname, !3 = $firstname
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, 'CN%3Dvan+der+Valk%5C%2C+Marco%2COU%3DUT%2COU%3DNL%2COU%3DEMEA%2COU%3Dassociates%2COU%3DusersAndGroups%2CDC%3Dcorporate%2CDC%3Dingrammicro%2CDC%3Dcom'
    5     1        INIT_FCALL                                                   'preg_match'
          2        SEND_VAL                                                     '%2FCN%3D%28%5B%5Cw%5Cs%5C%5C%2C%5D%2B%29%2C%2F'
          3        SEND_VAR                                                     !0
          4        SEND_REF                                                     !1
          5        DO_ICALL                                                     
    7     6        INIT_FCALL                                                   'explode'
          7        SEND_VAL                                                     '%2C'
          8        FETCH_DIM_R                                          ~6      !1, 1
          9        FRAMELESS_ICALL_3                str_replace         ~7      '%5C', ''
         10        OP_DATA                                                      ~6
         11        SEND_VAL                                                     ~7
         12        DO_ICALL                                             $8      
         13        FETCH_LIST_R                                         $9      $8, 0
         14        ASSIGN                                                       !2, $9
         15        FETCH_LIST_R                                         $11     $8, 1
         16        ASSIGN                                                       !3, $11
         17        FREE                                                         $8
    9    18        CONCAT                                               ~13     !3, '+'
         19        CONCAT                                               ~14     ~13, !2
         20        ECHO                                                         ~14
         21      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
160.66 ms | 2109 KiB | 15 Q