3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
167.15 ms | 1394 KiB | 15 Q