3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.79 ms | 1012 KiB | 15 Q