3v4l.org

run code in 300+ PHP versions simultaneously
<?php $content = '{{#unless val}},{{else}}!{{/unless}}'; $content = preg_replace('/\{\{#unless val\}\}/', '<?php if (0): ?>', $content); $content = preg_replace('/\{\{else\}\}/', '<?php else : ?>', $content); $content = preg_replace('/\{\{\/unless\}\}/', '<?php endif; ?>', $content); echo $content;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/3741F
function name:  (null)
number of ops:  21
compiled vars:  !0 = $content
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%7B%7B%23unless+val%7D%7D%2C%7B%7Belse%7D%7D%21%7B%7B%2Funless%7D%7D'
    5     1        INIT_FCALL                                               'preg_replace'
          2        SEND_VAL                                                 '%2F%5C%7B%5C%7B%23unless+val%5C%7D%5C%7D%2F'
          3        SEND_VAL                                                 '%3C%3Fphp+if+%280%29%3A++%3F%3E'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $2      
          6        ASSIGN                                                   !0, $2
    6     7        INIT_FCALL                                               'preg_replace'
          8        SEND_VAL                                                 '%2F%5C%7B%5C%7Belse%5C%7D%5C%7D%2F'
          9        SEND_VAL                                                 '%3C%3Fphp+else+%3A++%3F%3E'
         10        SEND_VAR                                                 !0
         11        DO_ICALL                                         $4      
         12        ASSIGN                                                   !0, $4
    7    13        INIT_FCALL                                               'preg_replace'
         14        SEND_VAL                                                 '%2F%5C%7B%5C%7B%5C%2Funless%5C%7D%5C%7D%2F'
         15        SEND_VAL                                                 '%3C%3Fphp+endif%3B+%3F%3E'
         16        SEND_VAR                                                 !0
         17        DO_ICALL                                         $6      
         18        ASSIGN                                                   !0, $6
    9    19        ECHO                                                     !0
   10    20      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
281.24 ms | 1395 KiB | 16 Q