3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo "regex!"; $term = "16656400-k"; $term = preg_replace('/-\d/', '', $term); // $term = preg_replace('/-/', '', $term); echo $term;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/SU1Xd
function name:  (null)
number of ops:  10
compiled vars:  !0 = $term
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ECHO                                                     'regex%21'
    3     1        ASSIGN                                                   !0, '16656400-k'
    4     2        INIT_FCALL                                               'preg_replace'
          3        SEND_VAL                                                 '%2F-%5Cd%2F'
          4        SEND_VAL                                                 ''
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                         $2      
          7        ASSIGN                                                   !0, $2
    6     8        ECHO                                                     !0
          9      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.93 ms | 1394 KiB | 15 Q