3v4l.org

run code in 300+ 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"; $CN = strpos($str, "CN=")+3; Echo substr($str, $CN, strpos($str, '\\', $CN)-3);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/k5H26
function name:  (null)
number of ops:  20
compiled vars:  !0 = $str, !1 = $CN
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'
    4     1        INIT_FCALL                                               'strpos'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 'CN%3D'
          4        DO_ICALL                                         $3      
          5        ADD                                              ~4      $3, 3
          6        ASSIGN                                                   !1, ~4
    5     7        INIT_FCALL                                               'substr'
          8        SEND_VAR                                                 !0
          9        SEND_VAR                                                 !1
         10        INIT_FCALL                                               'strpos'
         11        SEND_VAR                                                 !0
         12        SEND_VAL                                                 '%5C'
         13        SEND_VAR                                                 !1
         14        DO_ICALL                                         $6      
         15        SUB                                              ~7      $6, 3
         16        SEND_VAL                                                 ~7
         17        DO_ICALL                                         $8      
         18        ECHO                                                     $8
         19      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
140.33 ms | 1437 KiB | 15 Q