3v4l.org

run code in 300+ PHP versions simultaneously
<?php $s = "Foo money bar"; echo preg_replace("/(office|rank|money)/i", '<strong>' . ucfirst('$1') . '</strong>', $s);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ZTdpU
function name:  (null)
number of ops:  13
compiled vars:  !0 = $s
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'Foo+money+bar'
    3     1        INIT_FCALL                                               'preg_replace'
          2        SEND_VAL                                                 '%2F%28office%7Crank%7Cmoney%29%2Fi'
          3        INIT_FCALL                                               'ucfirst'
          4        SEND_VAL                                                 '%241'
          5        DO_ICALL                                         $2      
          6        CONCAT                                           ~3      '%3Cstrong%3E', $2
          7        CONCAT                                           ~4      ~3, '%3C%2Fstrong%3E'
          8        SEND_VAL                                                 ~4
          9        SEND_VAR                                                 !0
         10        DO_ICALL                                         $5      
         11        ECHO                                                     $5
         12      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
139.07 ms | 997 KiB | 15 Q