3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.16 ms | 1394 KiB | 15 Q