3v4l.org

run code in 300+ PHP versions simultaneously
<?php $url='script.php?a=0&page=0'; $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/r6hRi
function name:  (null)
number of ops:  10
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                                                   !1, 2
    4     2        INIT_FCALL                                               'preg_replace'
          3        SEND_VAL                                                 '%2Fpage%3D%5Cd%2B%2F'
          4        CONCAT                                           ~4      'page%3D', !1
          5        SEND_VAL                                                 ~4
          6        SEND_VAR                                                 !0
          7        DO_ICALL                                         $5      
          8        ECHO                                                     $5
    5     9      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
181.12 ms | 1393 KiB | 15 Q