3v4l.org

run code in 500+ PHP versions simultaneously
<?php $likes = 'Apple, Samsung, Microsoft'; $likes = preg_replace("/,([^,]+)$/", " and $1", $likes); echo $likes;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Spa7h
function name:  (null)
number of ops:  6
compiled vars:  !0 = $likes
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                       !0, 'Apple%2C+Samsung%2C+Microsoft'
    3     1        FRAMELESS_ICALL_3                preg_replace        ~2      '%2F%2C%28%5B%5E%2C%5D%2B%29%24%2F', '+and+%241'
          2        OP_DATA                                                      !0
          3        ASSIGN                                                       !0, ~2
    4     4        ECHO                                                         !0
          5      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
155.84 ms | 2250 KiB | 13 Q