3v4l.org

run code in 500+ PHP versions simultaneously
<?php $x = preg_replace('/A.*?$/Ds', 'X', "A\n"); echo json_encode($x);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ea3SQ
function name:  (null)
number of ops:  8
compiled vars:  !0 = $x
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   FRAMELESS_ICALL_3                preg_replace        ~1      '%2FA.%2A%3F%24%2FDs', 'X'
          1        OP_DATA                                                      'A%0A'
          2        ASSIGN                                                       !0, ~1
    4     3        INIT_FCALL                                                   'json_encode'
          4        SEND_VAR                                                     !0
          5        DO_ICALL                                             $3      
          6        ECHO                                                         $3
          7      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
157.22 ms | 1512 KiB | 9 Q