3v4l.org

run code in 300+ PHP versions simultaneously
<?php $pat = "[♥]+"; $sub = "heart"; echo mb_ereg_replace( $pat, $sub, "I $♥ PHP" );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ZegKg
function name:  (null)
number of ops:  12
compiled vars:  !0 = $pat, !1 = $sub, !2 = $♥
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%5B%E2%99%A5%5D%2B'
    4     1        ASSIGN                                                   !1, 'heart'
    5     2        INIT_FCALL                                               'mb_ereg_replace'
          3        SEND_VAR                                                 !0
          4        SEND_VAR                                                 !1
          5        ROPE_INIT                                     3  ~6      'I+'
          6        ROPE_ADD                                      1  ~6      ~6, !2
          7        ROPE_END                                      2  ~5      ~6, '+PHP'
          8        SEND_VAL                                                 ~5
          9        DO_ICALL                                         $8      
         10        ECHO                                                     $8
         11      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.72 ms | 1394 KiB | 15 Q