3v4l.org

run code in 300+ PHP versions simultaneously
<?php function parseCss($rawText) { $matches = array(); $selections = preg_match_all('/\/\* customize_(.+?) \*\/([a-z\-\n:; ]+?)\/\* customize_\1 \*\//m',$rawText,$matches); if (!$selections) return array(); print_R($matches); $realMatches = array(); foreach($matches[1] as $key => $val) { $elements = array(); $realMatches[$val] = array(); preg_match_all('/([^ \t\n;]+?):(.+?);/',$matches[2][$key],$elements); foreach ($elements[1] as $k => $v) { $realMatches[$val][] = array($v,trim($elements[2][$k])); } } return $realMatches; } print_r(parseCss(' /* colors * 73880b dark green * f4ffd2 light green * 69ab2b bright green (links & headers) * daf095 med green sidebar backgrounds, header nav * 50AAB5 blue for hovers.. */ /* HTML Tag Redefinition */ html, body { height: 100%; font-family:Arial, Helvetica, sans-serif; } body { padding: 0px; margin: 0px; background: #fff url(images/footer_grass.jpg) repeat-x fixed left bottom; } img { border: 0px } a { cursor:pointer } /* Page Structure / Navigation */ #page { width:800px; margin: auto; background-color:#f4ffd2; height: auto !important; height:100%; min-height:100%; position:relative; background:url(images/central_columns_bg.jpg) repeat-y top left; } #page.sidebar-left { background:url(images/central_left_columns_bg.jpg) repeat-y top left; } #page #header { position:relative; height:100px; background: url(images/header_bg.jpg) repeat-x top left #73880b; padding:15px; } #page #header #logo { color:#fff; font-size:32px; line-height: auto; padding: 0px; margin:0; cursor:pointer; position:absolute; bottom:15px; left: 15px; width:308px; overflow:visible; } #page #header #logo a { /* customize_header_logo */ color: #ffffff; /* customize_header_logo */ /* customize_header_logo_text */ font: normal bold 32px Arial; /* customize_header_logo_text */ text-decoration:none; } #page #header #logo p{ display:inline; line-height:inherit; font-size:inherit; padding:inherit; margin:inherit; color:inherit } #page #header ul.nav-header { list-style:none; margin:0px; float: right; padding:0px; z-index:2; overflow:visible; } #page #header ul.nav-header li { float:left; padding:2px 0px; margin-left:24px; margin-bottom: 0px; /* customize_header_link_text */ color:#daf095; /* customize_header_link_text */ font-size:14px; letter-spacing:1.5px; margin-top:0px } #page #header ul.nav-header li a, #page #header ul.nav-header li a:hover { text-decoration:none; color:#daf095 } #page #header ul.nav-header li.nav-selected { font-weight:bold; } /* #page #header #header-area { position:relative; height:75px; } */ #page #header #header-area { position: absolute; bottom: 15px; right: 15px; width: 462px; } #page #homeHeader { background: url(images/home_header.jpg) top left no-repeat; min-height:192px; } #page #homeHeader, #page #pageHeader { margin:0; padding:0; position:relative; } #page #central { clear:both; padding-bottom:30px; /* for footer */ } #page.no-sidebar { background-image: none !important; background-color:#f4ffd2; } /* body & sidebar */ #page #central #body { float:left; text-align:left; width:542px; padding:15px; /* customize_background */ background-color:#f4ffd2; border-color:red; /* customize_background */ } #page #central #sidebar { float:right; width:198px; padding:15px 15px 30px 15px; background: #daf095; } #page.sidebar-left #central #sidebar { float:left; width: 94px } #page.sidebar-left #central #body { float:right; width: 646px; padding: 15px; } #page.no-sidebar #body { float: none !important; width: auto !important } #page #central #sidebar p { line-height:24px } #page #central #sidebar ul.nav { list-style:none; margin-left:0px; padding:0px; padding-left:0; font-size:11px; } #page #central #sidebar ul.nav li { margin-bottom:10px; } #page #central #sidebar ul.nav a { text-decoration:none; color:#69ab2b } #page #central #sidebar ul.nav a.nav-selected { font-weight: bold } #page #central #sidebar ul.nav a:hover { text-decoration:underline } #page #central #sidebar ul.nav ul { list-style:none; margin-left:5px; padding:0px; margin-top:10px; } #page #central #sidebar ul.nav ul li { padding-left: 5px; margin: 0; border-left: 1px solid #69ab2b; } #page #central #sidebar ul.nav ul li ul li { list-style:square inside; padding-left:0; } #page #central #sidebar ul.nav ul li ul li { border:none; } #page #footer { height:10px; line-height:10px; background:url(images/footer_bg.jpg) repeat-x; clear:both; color:#daf095; font-size:10px; text-align:center; padding:10px 0 10px 0; position:absolute; bottom:0; width:100% } #page #footer a { color:#daf095; text-decoration:none; } span.sign-in {margin-left: 20px} #page #footer span.powered-by { float:right; margin-right:20px;} /* MISC STYLES & SHORTCUTS */ div.code { border: 1px solid #ddd; background: #eee; padding: 10px } div.spacer, div.ccm-spacer { clear:both; font-size:1px; line-height:1px } .noTopSpace { margin-top:0px; padding-top:0px } /* customize_miscellaneous */ /* customize_miscellaneous */'));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/DhYpe
function name:  (null)
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   22     0  E >   INIT_FCALL                                               'print_r'
          1        INIT_FCALL                                               'parsecss'
          2        SEND_VAL                                                 '%0A%2F%2A+colors+%0A+%2A+73880b+dark+green%0A+%2A+f4ffd2+light+green%0A+%2A+69ab2b+bright+green+%28links+%26+headers%29%0A+%2A+daf095+med+green+sidebar+backgrounds%2C+header+nav%0A+%2A+50AAB5+blue+for+hovers..%0A%2A%2F%0A%0A%2F%2A+HTML+Tag+Redefinition+%2A%2F%0Ahtml%2C+body+%7B%0A%09height%3A+100%25%3B%0A%09font-family%3AArial%2C+Helvetica%2C+sans-serif%3B%0A%7D%0Abody+%7B%0A%09padding%3A+0px%3B%0A%09margin%3A+0px%3B%0A%09background%3A+%23fff+url%28images%2Ffooter_grass.jpg%29+repeat-x+fixed+left+bottom%3B%0A%7D%0Aimg+%7B%0A%09border%3A+0px%0A%7D%0Aa+%7B+cursor%3Apointer+%7D%0A%2F%2A+Page+Structure+%2F+Navigation+%2A%2F%0A%23page+%7B%0A%09width%3A800px%3B%0A%09margin%3A+auto%3B%0A%09background-color%3A%23f4ffd2%3B%0A%09height%3A+auto+%21important%3B%0A%09height%3A100%25%3B%0A%09min-height%3A100%25%3B%0A%09position%3Arelative%3B%0A%09background%3Aurl%28images%2Fcentral_columns_bg.jpg%29+repeat-y+top+left%3B%0A%7D%0A%23page.sidebar-left+%7B%0A%09background%3Aurl%28images%2Fcentral_left_columns_bg.jpg%29+repeat-y+top+left%3B%0A%7D%0A%23page+%23header+%7B%0A%09position%3Arelative%3B%0A%09height%3A100px%3B%0A%09background%3A+url%28images%2Fheader_bg.jpg%29+repeat-x+top+left+%2373880b%3B%0A%09padding%3A15px%3B%0A%7D%0A%23page+%23header+%23logo+%7B%0A%09color%3A%23fff%3B%0A%09font-size%3A32px%3B%0A%09line-height%3A+auto%3B%0A%09padding%3A+0px%3B%0A%09margin%3A0%3B%0A%09cursor%3Apointer%3B%0A%09position%3Aabsolute%3B%0A%09bottom%3A15px%3B%0A%09left%3A+15px%3B%0A%09width%3A308px%3B%0A%09overflow%3Avisible%3B%0A%7D%0A%23page+%23header+%23logo+a+%7B%0A%09%2F%2A+customize_header_logo+%2A%2F+color%3A+%23ffffff%3B+%2F%2A+customize_header_logo+%2A%2F%0A%09%2F%2A+customize_header_logo_text+%2A%2F+font%3A+normal+bold+32px+Arial%3B+%2F%2A+customize_header_logo_text+%2A%2F%0A%09text-decoration%3Anone%3B%0A%7D%0A%0A%23page+%23header+%23logo+p%7B+display%3Ainline%3B+line-height%3Ainherit%3B+font-size%3Ainherit%3B+padding%3Ainherit%3B+margin%3Ainherit%3B+color%3Ainherit+%7D%0A%0A%23page+%23header+ul.nav-header+%7B%0A%09list-style%3Anone%3B%0A%09margin%3A0px%3B%0A%09float%3A+right%3B+%0A%09padding%3A0px%3B%0A%09z-index%3A2%3B%0A%09overflow%3Avisible%3B%0A%7D%0A%23page+%23header+ul.nav-header+li+%7B%0A%09float%3Aleft%3B%0A%09padding%3A2px+0px%3B%0A%09margin-left%3A24px%3B%0A%09margin-bottom%3A+0px%3B%0A%09%2F%2A+customize_header_link_text+%2A%2F+color%3A%23daf095%3B+%2F%2A+customize_header_link_text+%2A%2F%0A%09font-size%3A14px%3B%0A%09letter-spacing%3A1.5px%3B%0A%09margin-top%3A0px%0A%7D%0A%23page+%23header+ul.nav-header+li+a%2C+%23page+%23header+ul.nav-header+li+a%3Ahover+%7B%0A%09text-decoration%3Anone%3B%0A%09color%3A%23daf095%0A%7D%0A%23page+%23header+ul.nav-header+li.nav-selected+%7B%0A%09font-weight%3Abold%3B%0A%7D%0A%2F%2A%0A%23page+%23header+%23header-area+%7B%0A%09position%3Arelative%3B%0A%09height%3A75px%3B%0A%7D%0A%2A%2F%0A%23page+%23header+%23header-area+%7B%0A%09position%3A+absolute%3B%0A%09bottom%3A+15px%3B%0A%09right%3A+15px%3B%0A%09width%3A+462px%3B%0A%7D%0A%0A%23page+%23homeHeader+%7B%0A%09background%3A+url%28images%2Fhome_header.jpg%29+top+left+no-repeat%3B%0A%09min-height%3A192px%3B%0A%7D%0A%0A%23page+%23homeHeader%2C+%23page+%23pageHeader+%7B%0A%09margin%3A0%3B%0A%09padding%3A0%3B%0A%09position%3Arelative%3B%0A%7D%0A%0A%23page+%23central+%7B%0A%09clear%3Aboth%3B%0A%09padding-bottom%3A30px%3B+%2F%2A+for+footer+%2A%2F%0A%7D%0A%23page.no-sidebar+%7B%0A%09background-image%3A+none+%21important%3B%0A%09background-color%3A%23f4ffd2%3B%0A%7D%0A%2F%2A+body+%26+sidebar+%2A%2F%0A%23page+%23central+%23body+%7B%0A%09float%3Aleft%3B%0A%09text-align%3Aleft%3B%0A%09width%3A542px%3B%0A%09padding%3A15px%3B%0A%09%2F%2A+customize_background+%2A%2F%0A%09background-color%3A%23f4ffd2%3B%0A%09border-color%3Ared%3B%0A%09%2F%2A+customize_background+%2A%2F%0A%7D%0A%23page+%23central+%23sidebar+%7B%0A%09float%3Aright%3B%0A%09width%3A198px%3B%0A%09padding%3A15px+15px+30px+15px%3B%0A%09background%3A+%23daf095%3B%0A%7D%0A%23page.sidebar-left+%23central+%23sidebar+%7B%0A%09float%3Aleft%3B%0A%09width%3A+94px%0A%7D%0A%23page.sidebar-left+%23central+%23body+%7B%0A%09float%3Aright%3B%0A%09width%3A+646px%3B%0A%09padding%3A+15px%3B%0A%7D%0A%23page.no-sidebar+%23body+%7B%0A%09float%3A+none+%21important%3B%0A%09width%3A+auto+%21important%0A%7D%0A%23page+%23central+%23sidebar+p+%7B%0A%09line-height%3A24px%0A%7D%0A%23page+%23central+%23sidebar+ul.nav+%7B%0A%09list-style%3Anone%3B%0A%09margin-left%3A0px%3B%0A%09padding%3A0px%3B%0A%09padding-left%3A0%3B%0A%09font-size%3A11px%3B%0A%7D%0A%23page+%23central+%23sidebar+ul.nav+li+%7B%0A%09margin-bottom%3A10px%3B%0A%7D%0A%23page+%23central+%23sidebar+ul.nav+a+%7B%0A%09text-decoration%3Anone%3B%0A%09color%3A%2369ab2b%0A%7D%0A%23page+%23central+%23sidebar+ul.nav+a.nav-selected+%7B%0A%09font-weight%3A+bold%0A%7D%0A%23page+%23central+%23sidebar+ul.nav+a%3Ahover+%7B%0A%09text-decoration%3Aunderline%0A%7D%0A%23page+%23central+%23sidebar+ul.nav+ul+%7B%0A%09list-style%3Anone%3B%0A%09margin-left%3A5px%3B%0A%09padding%3A0px%3B%0A%09margin-top%3A10px%3B%0A%7D%0A%23page+%23central+%23sidebar+ul.nav+ul+li+%7B%0A%09padding-left%3A+5px%3B%0A%09margin%3A+0%3B%0A%09border-left%3A+1px+solid+%2369ab2b%3B%0A%7D%0A%23page+%23central+%23sidebar+ul.nav+ul+li+ul+li+%7B%0A%09list-style%3Asquare+inside%3B%0A%09padding-left%3A0%3B%0A%7D%0A%23page+%23central+%23sidebar+ul.nav+ul+li+ul+li+%7B%0A%09border%3Anone%3B%0A%7D%0A%23page+%23footer+%7B%0A%09height%3A10px%3B%0A%09line-height%3A10px%3B%0A%09background%3Aurl%28images%2Ffooter_bg.jpg%29+repeat-x%3B%0A%09clear%3Aboth%3B%0A%09color%3A%23daf095%3B%0A%09font-size%3A10px%3B%0A%09text-align%3Acenter%3B%0A%09padding%3A10px+0+10px+0%3B%0A%09position%3Aabsolute%3B%0A%09bottom%3A0%3B%0A%09width%3A100%25%0A%7D%0A%23page+%23footer+a+%7B%0A%09color%3A%23daf095%3B%0A%09text-decoration%3Anone%3B%0A%7D%0A%0Aspan.sign-in+%7Bmargin-left%3A+20px%7D%0A%23page+%23footer+span.powered-by+%7B+float%3Aright%3B+margin-right%3A20px%3B%7D%0A%0A%0A%2F%2A+MISC+STYLES+%26+SHORTCUTS+%2A%2F%0Adiv.code+%7B%0A%09border%3A+1px+solid+%23ddd%3B%0A%09background%3A+%23eee%3B%0A%09padding%3A+10px%0A%7D%0Adiv.spacer%2C+div.ccm-spacer+%7B%0A%09clear%3Aboth%3B%0A%09font-size%3A1px%3B%0A%09line-height%3A1px%0A%7D%0A.noTopSpace+%7B%0A%09margin-top%3A0px%3B%0A%09padding-top%3A0px%0A%7D%0A%0A%2F%2A+customize_miscellaneous+%2A%2F+%2F%2A+customize_miscellaneous+%2A%2F'
          3        DO_FCALL                                      0  $0      
          4        SEND_VAR                                                 $0
          5        DO_ICALL                                                 
  252     6      > RETURN                                                   1

Function parsecss:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 10, Position 2 = 11
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 11
2 jumps found. (Code = 77) Position 1 = 17, Position 2 = 46
Branch analysis from position: 17
2 jumps found. (Code = 78) Position 1 = 18, Position 2 = 46
Branch analysis from position: 18
2 jumps found. (Code = 77) Position 1 = 31, Position 2 = 44
Branch analysis from position: 31
2 jumps found. (Code = 78) Position 1 = 32, Position 2 = 44
Branch analysis from position: 32
1 jumps found. (Code = 42) Position 1 = 31
Branch analysis from position: 31
Branch analysis from position: 44
1 jumps found. (Code = 42) Position 1 = 17
Branch analysis from position: 17
Branch analysis from position: 44
Branch analysis from position: 46
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 46
filename:       /in/DhYpe
function name:  parseCss
number of ops:  49
compiled vars:  !0 = $rawText, !1 = $matches, !2 = $selections, !3 = $realMatches, !4 = $val, !5 = $key, !6 = $elements, !7 = $v, !8 = $k
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1        ASSIGN                                                   !1, <array>
    5     2        INIT_FCALL                                               'preg_match_all'
          3        SEND_VAL                                                 '%2F%5C%2F%5C%2A+customize_%28.%2B%3F%29+%5C%2A%5C%2F%28%5Ba-z%5C-%5Cn%3A%3B+%5D%2B%3F%29%5C%2F%5C%2A+customize_%5C1+%5C%2A%5C%2F%2Fm'
          4        SEND_VAR                                                 !0
          5        SEND_REF                                                 !1
          6        DO_ICALL                                         $10     
          7        ASSIGN                                                   !2, $10
    6     8        BOOL_NOT                                         ~12     !2
          9      > JMPZ                                                     ~12, ->11
         10    > > RETURN                                                   <array>
    7    11    >   INIT_FCALL                                               'print_r'
         12        SEND_VAR                                                 !1
         13        DO_ICALL                                                 
    8    14        ASSIGN                                                   !3, <array>
    9    15        FETCH_DIM_R                                      ~15     !1, 1
         16      > FE_RESET_R                                       $16     ~15, ->46
         17    > > FE_FETCH_R                                       ~17     $16, !4, ->46
         18    >   ASSIGN                                                   !5, ~17
   10    19        ASSIGN                                                   !6, <array>
   11    20        ASSIGN_DIM                                               !3, !4
         21        OP_DATA                                                  <array>
   12    22        INIT_FCALL                                               'preg_match_all'
         23        SEND_VAL                                                 '%2F%28%5B%5E+%5Ct%5Cn%3B%5D%2B%3F%29%3A%28.%2B%3F%29%3B%2F'
         24        FETCH_DIM_R                                      ~21     !1, 2
         25        FETCH_DIM_R                                      ~22     ~21, !5
         26        SEND_VAL                                                 ~22
         27        SEND_REF                                                 !6
         28        DO_ICALL                                                 
   14    29        FETCH_DIM_R                                      ~24     !6, 1
         30      > FE_RESET_R                                       $25     ~24, ->44
         31    > > FE_FETCH_R                                       ~26     $25, !7, ->44
         32    >   ASSIGN                                                   !8, ~26
   15    33        INIT_ARRAY                                       ~30     !7
         34        INIT_FCALL                                               'trim'
         35        FETCH_DIM_R                                      ~31     !6, 2
         36        FETCH_DIM_R                                      ~32     ~31, !8
         37        SEND_VAL                                                 ~32
         38        DO_ICALL                                         $33     
         39        ADD_ARRAY_ELEMENT                                ~30     $33
         40        FETCH_DIM_W                                      $28     !3, !4
         41        ASSIGN_DIM                                               $28
         42        OP_DATA                                                  ~30
   14    43      > JMP                                                      ->31
         44    >   FE_FREE                                                  $25
    9    45      > JMP                                                      ->17
         46    >   FE_FREE                                                  $16
   18    47      > RETURN                                                   !3
   19    48*     > RETURN                                                   null

End of function parsecss

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
168.33 ms | 1411 KiB | 20 Q