3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.87 ms | 1005 KiB | 15 Q