3v4l.org

run code in 300+ PHP versions simultaneously
<?php // Everything you enter here will be executed by our servers. Try it! $str = "safsad fd sm. pfle.jpg"; echo $a = strrpos($str,"."); $str2 = substr($str,0,$a); $str3 = preg_replace("/[-, :;]/","_",$str2); echo $str3;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/M71Mr
function name:  (null)
number of ops:  21
compiled vars:  !0 = $str, !1 = $a, !2 = $str2, !3 = $str3
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'safsad++++++fd+++++sm.++++pfle.jpg'
    4     1        INIT_FCALL                                               'strrpos'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 '.'
          4        DO_ICALL                                         $5      
          5        ASSIGN                                           ~6      !1, $5
          6        ECHO                                                     ~6
    5     7        INIT_FCALL                                               'substr'
          8        SEND_VAR                                                 !0
          9        SEND_VAL                                                 0
         10        SEND_VAR                                                 !1
         11        DO_ICALL                                         $7      
         12        ASSIGN                                                   !2, $7
    6    13        INIT_FCALL                                               'preg_replace'
         14        SEND_VAL                                                 '%2F%5B-%2C+%3A%3B%5D%2F'
         15        SEND_VAL                                                 '_'
         16        SEND_VAR                                                 !2
         17        DO_ICALL                                         $9      
         18        ASSIGN                                                   !3, $9
    7    19        ECHO                                                     !3
         20      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
177.51 ms | 1395 KiB | 19 Q