3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = "The Chernobyl disaster was a catastrophic nuclear accident that occurred on 26 April 1986, in the No. 4 nuclear reactor at the Chernobyl Nuclear Power Plant, near the city of Pripyat, in the north of the Ukrainian SSR."; $pattern = '%[A-Z]\w+%'; $replacement = "****"; $newString = preg_filter($pattern, $replacement, $string); print($newString);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/JZstbn
function name:  (null)
number of ops:  11
compiled vars:  !0 = $string, !1 = $pattern, !2 = $replacement, !3 = $newString
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'The+Chernobyl+disaster+was+a+catastrophic+nuclear+accident+that+occurred+on+26+April+1986%2C+in+the+No.+4+nuclear+reactor+at+the+Chernobyl+Nuclear+Power+Plant%2C+near+the+city+of+Pripyat%2C+in+the+north+of+the+Ukrainian+SSR.'
    5     1        ASSIGN                                                   !1, '%25%5BA-Z%5D%5Cw%2B%25'
    6     2        ASSIGN                                                   !2, '%2A%2A%2A%2A'
    8     3        INIT_FCALL                                               'preg_filter'
          4        SEND_VAR                                                 !1
          5        SEND_VAR                                                 !2
          6        SEND_VAR                                                 !0
          7        DO_ICALL                                         $7      
          8        ASSIGN                                                   !3, $7
   10     9        ECHO                                                     !3
         10      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
139.46 ms | 1435 KiB | 14 Q