3v4l.org

run code in 300+ PHP versions simultaneously
<?php function fox( $a) { return $a . 'fox!'; } function dog( $b) { return $b . 'dog!'; } $a = 'A'; $b = 'B'; $string = 'The quick brown {{fox($a);}} jumped over the lazy {{dog($b);}}.'; $regex = '/{{([^}]+)+}}/e'; $result = preg_replace( $regex, '$1', $string); var_dump( $result);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/GOi2l
function name:  (null)
number of ops:  14
compiled vars:  !0 = $a, !1 = $b, !2 = $string, !3 = $regex, !4 = $result
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   ASSIGN                                                   !0, 'A'
          1        ASSIGN                                                   !1, 'B'
    6     2        ASSIGN                                                   !2, 'The+quick+brown+%7B%7Bfox%28%24a%29%3B%7D%7D+jumped+over+the+lazy+%7B%7Bdog%28%24b%29%3B%7D%7D.'
    7     3        ASSIGN                                                   !3, '%2F%7B%7B%28%5B%5E%7D%5D%2B%29%2B%7D%7D%2Fe'
    8     4        INIT_FCALL                                               'preg_replace'
          5        SEND_VAR                                                 !3
          6        SEND_VAL                                                 '%241'
          7        SEND_VAR                                                 !2
          8        DO_ICALL                                         $9      
          9        ASSIGN                                                   !4, $9
   10    10        INIT_FCALL                                               'var_dump'
         11        SEND_VAR                                                 !4
         12        DO_ICALL                                                 
         13      > RETURN                                                   1

Function fox:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/GOi2l
function name:  fox
number of ops:  4
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV                                             !0      
          1        CONCAT                                           ~1      !0, 'fox%21'
          2      > RETURN                                                   ~1
          3*     > RETURN                                                   null

End of function fox

Function dog:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/GOi2l
function name:  dog
number of ops:  4
compiled vars:  !0 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        CONCAT                                           ~1      !0, 'dog%21'
          2      > RETURN                                                   ~1
          3*     > RETURN                                                   null

End of function dog

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.34 ms | 1396 KiB | 17 Q