3v4l.org

run code in 300+ PHP versions simultaneously
<?php $content = <<<TEXT (n["createcCommentVNode"])("",!0)],64)})),256))])):Object (n["createCommentVNode"])("", !0)])]), Object(n["createELementVNode"])("div" ,me,[Object(n["createELementVNode"])("div",be,[X.config.EntryFormWithoutTime ?(Object(n["openBlock"])(),Object(n["createBlock"])(te,{key:0,onUpdated:e .onUpdated,"is-new":"",modelValue:R.newEntry,"onUpdate:modelValue":t[0]|| (t[0]=function(e){return R.newEntry=e})},null,8,["onUpdated","modelValue"] )):(Object(n["openBlock"])(),Object(n["createBlock"])(xe,{key:1,onUpdated:e .onUpdated,"is-new":"",modelValue:R.newEntry,"onUpdate:modelValue":t[1]|| (t[1]=function(e){return R.newEntry=e})},null,8,["onUpdated","modelValue"] ))])])],64)}a("498a"),a("acl1f"),a("5319"),a("a434");var ge={client:"Rail Partners",showWelcomeMessage:!1,logo:"https: //1wee.webx.host/images /RP_Logo_Black.svg",LogoWidth:124,LogoMargin:"10px 0 10px 0" ,navBackgroundColour:"rgb(36, 142, 120)",navShowWave:!1,colourScheme:"blue" ,bodyBackgroundImage:!1,bgColour:"#FFFFFF",primaryColour:"#AD9DF4",url :"https://1wee.webx.host",enableAcademy:!0,enableScheduler:!0 ,homepageDispLayVehicLeChart:!1,calendarDispLayNameOn1ly:!0 ,caLendarMonthyDefaultSort:"name",EntryFormWithoutTime:!0 ,caLendarAnnualLeaveCatId:25,calendarRemainingTimeLeftShownInHours:!0 ,notificationEmailId:26,userProfile:{profileImgId:3,width:400,height:400 ,quality:100}},fe=a("a18a"),ke=a.n(fe),ve={class:"uk-text-center uk-width -large uk-align-center"},ye=Object(n["createELementVNode"])("img",{class:"uk TEXT; $settings['new_primary_colour_ccs'] = '#777777'; // test color $appPats = [null]; // just to enter the loop for demo foreach($appPats as $path){ $styleSettings = [ 'primary_colour' => [ 'reg' => "~\bprimaryColour:\s?['\"][a-z0-9 ,._+;()'@!?&#:\/-]+['\"]~i", 'string' => 'primaryColour:"' . $settings['new_primary_colour_ccs'] . '"', 'value' => $settings['new_primary_colour_ccs'] ] ]; //$content = file_get_contents($path); foreach ($styleSettings as $style) { $content = preg_replace($style['reg'], $style['string'], $content, -1, $count); if ($count) { echo "Replaced with {$style['value']} $count times\n\n\n"; } } echo $content; //file_put_contents($path, $content); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 5, Position 2 = 39
Branch analysis from position: 5
2 jumps found. (Code = 78) Position 1 = 6, Position 2 = 39
Branch analysis from position: 6
2 jumps found. (Code = 77) Position 1 = 16, Position 2 = 36
Branch analysis from position: 16
2 jumps found. (Code = 78) Position 1 = 17, Position 2 = 36
Branch analysis from position: 17
2 jumps found. (Code = 43) Position 1 = 28, Position 2 = 35
Branch analysis from position: 28
1 jumps found. (Code = 42) Position 1 = 16
Branch analysis from position: 16
Branch analysis from position: 35
Branch analysis from position: 36
1 jumps found. (Code = 42) Position 1 = 5
Branch analysis from position: 5
Branch analysis from position: 36
Branch analysis from position: 39
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 39
filename:       /in/BmDKk
function name:  (null)
number of ops:  41
compiled vars:  !0 = $content, !1 = $settings, !2 = $appPats, !3 = $path, !4 = $styleSettings, !5 = $style, !6 = $count
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%28n%5B%22createcCommentVNode%22%5D%29%28%22%22%2C%210%29%5D%2C64%29%7D%29%29%2C256%29%29%5D%29%29%3AObject%0A%28n%5B%22createCommentVNode%22%5D%29%28%22%22%2C+%210%29%5D%29%5D%29%2C+Object%28n%5B%22createELementVNode%22%5D%29%28%22div%22%0A%2Cme%2C%5BObject%28n%5B%22createELementVNode%22%5D%29%28%22div%22%2Cbe%2C%5BX.config.EntryFormWithoutTime%0A%3F%28Object%28n%5B%22openBlock%22%5D%29%28%29%2CObject%28n%5B%22createBlock%22%5D%29%28te%2C%7Bkey%3A0%2ConUpdated%3Ae%0A.onUpdated%2C%22is-new%22%3A%22%22%2CmodelValue%3AR.newEntry%2C%22onUpdate%3AmodelValue%22%3At%5B0%5D%7C%7C%0A%28t%5B0%5D%3Dfunction%28e%29%7Breturn+R.newEntry%3De%7D%29%7D%2Cnull%2C8%2C%5B%22onUpdated%22%2C%22modelValue%22%5D%0A%29%29%3A%28Object%28n%5B%22openBlock%22%5D%29%28%29%2CObject%28n%5B%22createBlock%22%5D%29%28xe%2C%7Bkey%3A1%2ConUpdated%3Ae%0A.onUpdated%2C%22is-new%22%3A%22%22%2CmodelValue%3AR.newEntry%2C%22onUpdate%3AmodelValue%22%3At%5B1%5D%7C%7C%0A%28t%5B1%5D%3Dfunction%28e%29%7Breturn+R.newEntry%3De%7D%29%7D%2Cnull%2C8%2C%5B%22onUpdated%22%2C%22modelValue%22%5D%0A%29%29%5D%29%5D%29%5D%2C64%29%7Da%28%22498a%22%29%2Ca%28%22acl1f%22%29%2Ca%28%225319%22%29%2Ca%28%22a434%22%29%3Bvar+ge%3D%7Bclient%3A%22Rail%0APartners%22%2CshowWelcomeMessage%3A%211%2Clogo%3A%22https%3A+%2F%2F1wee.webx.host%2Fimages%0A%2FRP_Logo_Black.svg%22%2CLogoWidth%3A124%2CLogoMargin%3A%2210px+0+10px+0%22%0A%2CnavBackgroundColour%3A%22rgb%2836%2C+142%2C+120%29%22%2CnavShowWave%3A%211%2CcolourScheme%3A%22blue%22%0A%2CbodyBackgroundImage%3A%211%2CbgColour%3A%22%23FFFFFF%22%2CprimaryColour%3A%22%23AD9DF4%22%2Curl%0A%3A%22https%3A%2F%2F1wee.webx.host%22%2CenableAcademy%3A%210%2CenableScheduler%3A%210%0A%2ChomepageDispLayVehicLeChart%3A%211%2CcalendarDispLayNameOn1ly%3A%210%0A%2CcaLendarMonthyDefaultSort%3A%22name%22%2CEntryFormWithoutTime%3A%210%0A%2CcaLendarAnnualLeaveCatId%3A25%2CcalendarRemainingTimeLeftShownInHours%3A%210%0A%2CnotificationEmailId%3A26%2CuserProfile%3A%7BprofileImgId%3A3%2Cwidth%3A400%2Cheight%3A400%0A%2Cquality%3A100%7D%7D%2Cfe%3Da%28%22a18a%22%29%2Cke%3Da.n%28fe%29%2Cve%3D%7Bclass%3A%22uk-text-center+uk-width%0A-large+uk-align-center%22%7D%2Cye%3DObject%28n%5B%22createELementVNode%22%5D%29%28%22img%22%2C%7Bclass%3A%22uk'
   27     1        ASSIGN_DIM                                               !1, 'new_primary_colour_ccs'
          2        OP_DATA                                                  '%23777777'
   28     3        ASSIGN                                                   !2, <array>
   30     4      > FE_RESET_R                                       $10     !2, ->39
          5    > > FE_FETCH_R                                               $10, !3, ->39
   33     6    >   INIT_ARRAY                                       ~11     '%7E%5CbprimaryColour%3A%5Cs%3F%5B%27%22%5D%5Ba-z0-9+%2C._%2B%3B%28%29%27%40%21%3F%26%23%3A%5C%2F-%5D%2B%5B%27%22%5D%7Ei', 'reg'
   34     7        FETCH_DIM_R                                      ~12     !1, 'new_primary_colour_ccs'
          8        CONCAT                                           ~13     'primaryColour%3A%22', ~12
          9        CONCAT                                           ~14     ~13, '%22'
         10        ADD_ARRAY_ELEMENT                                ~11     ~14, 'string'
   35    11        FETCH_DIM_R                                      ~15     !1, 'new_primary_colour_ccs'
         12        ADD_ARRAY_ELEMENT                                ~11     ~15, 'value'
         13        INIT_ARRAY                                       ~16     ~11, 'primary_colour'
   31    14        ASSIGN                                                   !4, ~16
   40    15      > FE_RESET_R                                       $18     !4, ->36
         16    > > FE_FETCH_R                                               $18, !5, ->36
   41    17    >   INIT_FCALL                                               'preg_replace'
         18        FETCH_DIM_R                                      ~19     !5, 'reg'
         19        SEND_VAL                                                 ~19
         20        FETCH_DIM_R                                      ~20     !5, 'string'
         21        SEND_VAL                                                 ~20
         22        SEND_VAR                                                 !0
         23        SEND_VAL                                                 -1
         24        SEND_REF                                                 !6
         25        DO_ICALL                                         $21     
         26        ASSIGN                                                   !0, $21
   42    27      > JMPZ                                                     !6, ->35
   43    28    >   ROPE_INIT                                     5  ~25     'Replaced+with+'
         29        FETCH_DIM_R                                      ~23     !5, 'value'
         30        ROPE_ADD                                      1  ~25     ~25, ~23
         31        ROPE_ADD                                      2  ~25     ~25, '+'
         32        ROPE_ADD                                      3  ~25     ~25, !6
         33        ROPE_END                                      4  ~24     ~25, '+times%0A%0A%0A'
         34        ECHO                                                     ~24
   40    35    > > JMP                                                      ->16
         36    >   FE_FREE                                                  $18
   46    37        ECHO                                                     !0
   30    38      > JMP                                                      ->5
         39    >   FE_FREE                                                  $10
   48    40      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.24 ms | 1015 KiB | 14 Q