3v4l.org

run code in 300+ PHP versions simultaneously
<?php $url='script.php?a=0&page=0'; $url+='asdfad'; $i=2; echo preg_replace('/page=\d+/','page='.$i,$url); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/n5tRi
function name:  (null)
number of ops:  11
compiled vars:  !0 = $url, !1 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'script.php%3Fa%3D0%26page%3D0'
    3     1        ASSIGN_OP                                     1          !0, 'asdfad'
    4     2        ASSIGN                                                   !1, 2
    5     3        INIT_FCALL                                               'preg_replace'
          4        SEND_VAL                                                 '%2Fpage%3D%5Cd%2B%2F'
          5        CONCAT                                           ~5      'page%3D', !1
          6        SEND_VAL                                                 ~5
          7        SEND_VAR                                                 !0
          8        DO_ICALL                                         $6      
          9        ECHO                                                     $6
    6    10      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.78 ms | 1394 KiB | 15 Q