3v4l.org

run code in 300+ PHP versions simultaneously
<?php $mystring = "seminar_juridic_sergiu_22_01_2013_2"; //get juridic out of the string if it exists $uline_pos = strpos($mystring,'_'); $str_no_prefix=substr($mystring,$length+1); $uline_pos = strpos($str_no_prefix,'_'); $final_string = substr($str_no_prefix,0,$uline_pos); echo $final_string;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/INV4R
function name:  (null)
number of ops:  25
compiled vars:  !0 = $mystring, !1 = $uline_pos, !2 = $str_no_prefix, !3 = $length, !4 = $final_string
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'seminar_juridic_sergiu_22_01_2013_2'
    5     1        INIT_FCALL                                               'strpos'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 '_'
          4        DO_ICALL                                         $6      
          5        ASSIGN                                                   !1, $6
    6     6        INIT_FCALL                                               'substr'
          7        SEND_VAR                                                 !0
          8        ADD                                              ~8      !3, 1
          9        SEND_VAL                                                 ~8
         10        DO_ICALL                                         $9      
         11        ASSIGN                                                   !2, $9
    7    12        INIT_FCALL                                               'strpos'
         13        SEND_VAR                                                 !2
         14        SEND_VAL                                                 '_'
         15        DO_ICALL                                         $11     
         16        ASSIGN                                                   !1, $11
    8    17        INIT_FCALL                                               'substr'
         18        SEND_VAR                                                 !2
         19        SEND_VAL                                                 0
         20        SEND_VAR                                                 !1
         21        DO_ICALL                                         $13     
         22        ASSIGN                                                   !4, $13
   10    23        ECHO                                                     !4
         24      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
194.25 ms | 1395 KiB | 17 Q