3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
142.77 ms | 1386 KiB | 15 Q