3v4l.org

run code in 500+ PHP versions simultaneously
<?php $input = "div-item-2,4,maintype:social| heading:sdfsdf| social: 1, 2, 3 | table:Social| item:3| align:vertical| style:icon| isactive:1,8,0"; echo preg_replace('/((\||(?<!^)\G)[^,|]*),(?=.*\|)/', '$1;', $input) . PHP_EOL; $input = "div-item-0,4,maintype:menu| heading:Quick, Link| table:Menu | menuid:1| align:vertical| style:icon| isactive:1,0,0"; echo preg_replace('/((\||(?<!^)\G)[^,|]*),(?=.*\|)/', '$1;', $input) . PHP_EOL; $input = "div-item-1,4,maintype:text| heading: Name | title: Learn from here| logo:/photos/20/01.jpg| description: This is some description, so you can stay with us| isactive:1,4,0"; echo preg_replace('/((\||(?<!^)\G)[^,|]*),(?=.*\|)/', '$1;', $input) . PHP_EOL;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Rkf1N
function name:  (null)
number of ops:  16
compiled vars:  !0 = $input
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                       !0, 'div-item-2%2C4%2Cmaintype%3Asocial%7C+heading%3Asdfsdf%7C+social%3A+1%2C+2%2C+3+%7C+table%3ASocial%7C+item%3A3%7C+align%3Avertical%7C+style%3Aicon%7C+isactive%3A1%2C8%2C0'
    3     1        FRAMELESS_ICALL_3                preg_replace        ~2      '%2F%28%28%5C%7C%7C%28%3F%3C%21%5E%29%5CG%29%5B%5E%2C%7C%5D%2A%29%2C%28%3F%3D.%2A%5C%7C%29%2F', '%241%3B'
          2        OP_DATA                                                      !0
          3        CONCAT                                               ~3      ~2, '%0A'
          4        ECHO                                                         ~3
    4     5        ASSIGN                                                       !0, 'div-item-0%2C4%2Cmaintype%3Amenu%7C+heading%3AQuick%2C+Link%7C+table%3AMenu+%7C+menuid%3A1%7C+align%3Avertical%7C+style%3Aicon%7C+isactive%3A1%2C0%2C0'
    5     6        FRAMELESS_ICALL_3                preg_replace        ~5      '%2F%28%28%5C%7C%7C%28%3F%3C%21%5E%29%5CG%29%5B%5E%2C%7C%5D%2A%29%2C%28%3F%3D.%2A%5C%7C%29%2F', '%241%3B'
          7        OP_DATA                                                      !0
          8        CONCAT                                               ~6      ~5, '%0A'
          9        ECHO                                                         ~6
    6    10        ASSIGN                                                       !0, 'div-item-1%2C4%2Cmaintype%3Atext%7C+heading%3A+Name+%7C+title%3A+Learn+from+here%7C+logo%3A%2Fphotos%2F20%2F01.jpg%7C+description%3A+This+is+some+description%2C+so+you+can+stay+with+us%7C+isactive%3A1%2C4%2C0'
    7    11        FRAMELESS_ICALL_3                preg_replace        ~8      '%2F%28%28%5C%7C%7C%28%3F%3C%21%5E%29%5CG%29%5B%5E%2C%7C%5D%2A%29%2C%28%3F%3D.%2A%5C%7C%29%2F', '%241%3B'
         12        OP_DATA                                                      !0
         13        CONCAT                                               ~9      ~8, '%0A'
         14        ECHO                                                         ~9
    8    15      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
217.02 ms | 2159 KiB | 13 Q